Extending a Basis
How to grow an independent set into a full basis, how to shrink a spanning set down to one — and the four subspaces every matrix carries with it
§1Quick Recall
Lecture 16 gave us the general definition of a vector space and showed that subspaces, spans, independence, basis, and dimension all carry over from $\mathbb{R}^n$ to matrices, polynomials, and functions without a single new proof. Today we ask a very practical question that the earlier lectures never quite settled:
- •Independent: the only combination $a_1\mathbf{v}_1+\cdots+a_k\mathbf{v}_k=\mathbf{0}$ is the trivial one, $a_1=\cdots=a_k=0$.
- •Spans $V$: every vector of $V$ is some linear combination of the set.
- •Basis: independent and spans — the two properties meeting in the middle, with no waste and nothing missing.
§2Lemma 6.4.1 — The Independent Lemma
Let $\{\mathbf{v}_1, \mathbf{v}_2, \ldots, \mathbf{v}_k\}$ be an independent set of vectors in a vector space $V$. If $\mathbf{u} \in V$ but $\mathbf{u} \notin \operatorname{span}\{\mathbf{v}_1,\mathbf{v}_2,\ldots,\mathbf{v}_k\}$, then $\{\mathbf{u}, \mathbf{v}_1, \mathbf{v}_2, \ldots, \mathbf{v}_k\}$ is also independent.
§3Finite- vs. Infinite-Dimensional Spaces
A vector space $V$ is called finite dimensional if it is spanned by a finite set of vectors. Otherwise, $V$ is called infinite dimensional.
Notice this is purely a statement about existence: does even one finite spanning list exist, no matter how large? If yes, the space is finite dimensional — even $\{\mathbf{0}\}$ qualifies, since the single vector $\mathbf{0}$ by itself spans it ($\operatorname{span}\{\mathbf{0}\}=\{\mathbf{0}\}$), so the zero vector space $\{\mathbf{0}\}$ is finite dimensional, with $\dim\{\mathbf{0}\}=0$ (the empty set is its basis).
- •Finite dimensional: $\mathbb{R}^n$ (basis $\{\mathbf{e}_1,\ldots,\mathbf{e}_n\}$, size $n$), $P_n$ (basis $\{1,x,\ldots,x^n\}$, size $n{+}1$), $M_{mn}$ (basis the matrix units, size $mn$) — each has a finite list that spans everything.
- •Infinite dimensional: $P$, the space of all polynomials (Lecture 16, §15, and Example 6.4.3 below), and $F[a,b]$, the space of all functions on an interval — no finite list can ever span them, because you can always produce a polynomial or function of higher degree/complexity than anything your finite list can reach.
§4Lemma 6.4.2 — Enlarging to a Basis
Let $V$ be a finite dimensional vector space. If $U$ is any subspace of $V$, then any independent subset of $U$ can be enlarged to a finite basis of $U$.
§5Theorem 6.4.1
Let $V$ be a finite dimensional vector space spanned by $m$ vectors.
- •1. $V$ has a finite basis, and $\dim V \leq m$.
- •2. Every independent set of vectors in $V$ can be enlarged to a basis of $V$ by adding vectors from any fixed basis of $V$.
- •3. If $U$ is a subspace of $V$, then: (a) $U$ is finite dimensional and $\dim U \leq \dim V$; (b) every basis of $U$ is part of a basis of $V$.
Part 1. If $m$ vectors already span $V$, no independent set inside $V$ can ever contain more than $m$ vectors — extra vectors beyond what's needed to span would necessarily create redundancy. So the "enlarging" process of Lemma 6.4.2, started from the empty set, must stabilize at some basis with at most $m$ vectors: a finite basis exists, and $\dim V\leq m$.
Part 2. This sharpens Lemma 6.4.2: you don't need to search all of $V$ for vectors to add — it's enough to check a single fixed basis you already know, and add whichever of its vectors are not yet in the span of your independent set. This is exactly the strategy Examples 6.4.1 and 6.4.2 below use: reach for the standard basis and test its vectors one at a time.
Part 3. A subspace can never have "more room" than the space containing it — (a) says this precisely: $U$ is automatically finite dimensional too, with $\dim U\leq\dim V$. And (b) says the coordinate system you build for $U$ is never wasted: it always extends to a full coordinate system for all of $V$, by the same enlarging process.
§6Enlarging a Basis in M₂₂
Enlarge the independent set $D = \left\{ \begin{bmatrix}1&1\\1&0\end{bmatrix}, \begin{bmatrix}0&1\\1&1\end{bmatrix}, \begin{bmatrix}1&0\\1&1\end{bmatrix} \right\}$ to a basis of $M_{22}$.
§7Enlarging a Basis in P₃
Find a basis of $P_3$ containing the independent set $\{1+x,\; 1+x^2\}$.
§8P Is Infinite Dimensional
Show that the space $P$ of all polynomials is infinite dimensional.
§9Theorem 6.4.2
Let $U$ and $W$ be subspaces of the finite dimensional space $V$.
- •1. If $U \subseteq W$, then $\dim U \leq \dim W$.
- •2. If $U \subseteq W$ and $\dim U = \dim W$, then $U = W$.
Part 2 is the sharp, surprising consequence: take any basis of $U$ — it is an independent subset of $W$ too (since $U\subseteq W$), with exactly $\dim U=\dim W$ vectors. By Theorem 6.4.1(2), this basis of $U$ could in principle be enlarged to a basis of $W$ by adding more vectors from $W$ — but there is no room left, since it already has $\dim W$ vectors and a basis of $W$ has exactly that many. So no vectors need to be added: the basis of $U$ already spans $W$, which forces $U=W$. In words: a subspace that fills up all the available dimension of a larger space must in fact be the whole space.
§10A Basis for {p(x) : p(a) = 0}
If $a$ is a number, let $W$ denote the subspace of all polynomials in $P_n$ that have $a$ as a root: $W = \{p(x) \text{ in } P_n : p(a) = 0\}$. Show that $\{(x-a),\, (x-a)^2,\, \ldots,\, (x-a)^n\}$ is a basis of $W$.
§11Lemma 6.4.3 — The Dependent Lemma
A set $D = \{\mathbf{v}_1, \mathbf{v}_2, \ldots, \mathbf{v}_k\}$ of vectors in a vector space $V$ is dependent if and only if some vector in $D$ is a linear combination of the others.
§12Shrinking a Spanning Set of P₃
Find a basis of $P_3$ in the spanning set $S = \{1,\; x+x^2,\; 2x-3x^2,\; 1+3x-2x^2,\; x^3\}$.
§13Row Space of a Matrix
We now turn from abstract vector spaces to the four subspaces that every matrix carries with it — the natural home of everything we did with Gaussian elimination back in Week 1, now seen through the lens of dimension.
For an $m\times n$ matrix $A$, the row space of $A$, written $\operatorname{row}(A)$, is the subspace of $\mathbb{R}^n$ spanned by the rows of $A$ (treated as vectors in $\mathbb{R}^n$).
Prove: if $B$ is obtained from $A$ by adding a multiple of one row to another, then $\operatorname{row}(A) = \operatorname{row}(B)$.
Find a basis for the row space of $A = \begin{bmatrix} 1&2&0&1 \\ 2&4&1&0 \\ 0&0&1&-2 \end{bmatrix}$, and state $\operatorname{rank}(A)$.
§14Column Space of a Matrix
For an $m\times n$ matrix $A$, the column space of $A$, written $\operatorname{col}(A)$, is the subspace of $\mathbb{R}^m$ spanned by the columns of $A$.
Prove that $\operatorname{col}(A) = \{A\mathbf{x} : \mathbf{x}\in\mathbb{R}^n\}$, and that this set is a subspace of $\mathbb{R}^m$.
Find a basis for $\operatorname{col}(A)$, for the same $A = \begin{bmatrix} 1&2&0&1 \\ 2&4&1&0 \\ 0&0&1&-2 \end{bmatrix}$ used above.
§15Null Space of a Matrix
For an $m\times n$ matrix $A$, the null space of $A$, written $\operatorname{null}(A)$, is the solution set of the homogeneous system $A\mathbf{x}=\mathbf{0}$: $\operatorname{null}(A) = \{\mathbf{x}\in\mathbb{R}^n : A\mathbf{x}=\mathbf{0}\}$, a subspace of $\mathbb{R}^n$.
Prove that $\operatorname{null}(A)$ is a subspace of $\mathbb{R}^n$.
Find a basis for $\operatorname{null}(A)$, again for $A = \begin{bmatrix} 1&2&0&1 \\ 2&4&1&0 \\ 0&0&1&-2 \end{bmatrix}$.
§16The Rank–Nullity Theorem
For an $m\times n$ matrix $A$: $$\operatorname{rank}(A) + \operatorname{nullity}(A) = n,$$ where $\operatorname{rank}(A)=\dim\operatorname{row}(A)=\dim\operatorname{col}(A)$ and $\operatorname{nullity}(A)=\dim\operatorname{null}(A)$.
Verify the Rank–Nullity Theorem for $A = \begin{bmatrix} 1&2&0&1 \\ 2&4&1&0 \\ 0&0&1&-2 \end{bmatrix}$, and then use the theorem directly on a new matrix.
§17Looking Ahead
§18Exercises
Four problems to practice on your own, in the same spirit as today's examples. Hints only — try each one properly before reading further.
Enlarge the independent set $\{1-x,\; x^2\}$ to a basis of $P_2$.
The set $\{(1,1,0),\,(0,1,1),\,(1,2,1),\,(1,0,-1)\}$ spans $\mathbb{R}^3$. Find a basis inside it.
Let $A = \begin{bmatrix} 1 & -1 & 2 \\ 2 & -2 & 5 \end{bmatrix}$. Find bases for $\operatorname{row}(A)$, $\operatorname{col}(A)$, and $\operatorname{null}(A)$, and verify the Rank–Nullity Theorem.
Let $U=\operatorname{null}(A)$ for a $4\times4$ matrix $A$ with $\operatorname{rank}(A)=4$. Explain, using Theorem 6.4.2, why $U=\{\mathbf{0}\}$.
Two lemmas — add what's missing, discard what's redundant — turn any independent or spanning set into a basis. The same two ideas, aimed at a matrix, produce its row space, column space, and null space.
Every computation today came down to the same move: row-reduce, then read the answer off the echelon form. What changes is only which piece of the echelon form you read — the nonzero rows for $\operatorname{row}(A)$, the original pivot columns for $\operatorname{col}(A)$, or the free-variable solutions for $\operatorname{null}(A)$. The Rank–Nullity Theorem is the receipt that these three counts always add up correctly.