Theorem (Steinitz exchange lemma)
Let $S, T \subseteq V$ be finite subsets in a vector space $V$. Suppose $S$ is linearly independent and $T$ spans $V$. Then
-
$|S| \leq |T|$; and
-
there exists a subset $T'\subseteq T$ such that $|T'| = |T| - |S|$ and $S\cup T'$ spans $V$. (This means you can remove $|S|$ elements from $T$, replace them with $S$, and obtain a set that still spans $V$.)