Linear Algebra › Section B · Matrix algebra › Topic B.8

Subspaces, column space, and null space

Lines and planes through the origin behave like smaller copies of space itself: you can add vectors in them and scale them without ever leaving. Every matrix carries two such sets, one of reachable outputs and one of inputs it sends to zero, and a few well-chosen vectors describe each completely.

Sets that are closed

A plane through the origin in \(\mathbb{R}^3\) has a useful property: add two vectors in the plane and the sum stays in the plane; stretch a vector in the plane and it stays there too. A plane that misses the origin has neither property. Sets that keep all their linear combinations inside themselves are called subspaces. They organise the rest of linear algebra, because the solution sets and output sets of matrices are exactly sets of this kind.

Definition of a subspace

A subspace of \(\mathbb{R}^n\) is a set \(H\) of vectors in \(\mathbb{R}^n\) with three properties. 1. The zero vector is in \(H\). 2. If \(\mathbf{u}\) and \(\mathbf{v}\) are in \(H\), so is \(\mathbf{u} + \mathbf{v}\). 3. If \(\mathbf{u}\) is in \(H\) and \(c\) is any scalar, \(c\mathbf{u}\) is in \(H\). Together these say \(H\) is closed under linear combinations. The whole of \(\mathbb{R}^n\) is a subspace, and so is the set containing only \(\mathbf{0}\), the zero subspace. Any span, \(\text{Span}\{\mathbf{v}_1, \dots, \mathbf{v}_p\}\), is a subspace, since sums and multiples of combinations are again combinations.

Worked example: testing three sets

1. The plane of all \((x, y, z)\) with \(x - 2y + z = 0\). It contains \(\mathbf{0}\). If two vectors satisfy the equation, adding the two equations shows their sum does, and multiplying by \(c\) shows \(c\mathbf{u}\) does. It is a subspace. 2. The line \(x + y = 1\) in \(\mathbb{R}^2\). The origin gives \(0 + 0 \ne 1\), so it fails property 1 and is not a subspace. 3. The first quadrant, all \((x, y)\) with \(x \ge 0\) and \(y \ge 0\). It contains \(\mathbf{0}\) and is closed under addition, but \((1, 2)\) is in it while \(-1(1, 2) = (-1, -2)\) is not. Property 3 fails, so it is not a subspace.

The column space

The column space of an \(m \times n\) matrix \(A\), written \(\text{Col}\,A\), is the set of all linear combinations of its columns. As a span, it is a subspace of \(\mathbb{R}^m\). Since \(A\mathbf{x}\) is exactly a combination of the columns with weights from \(\mathbf{x}\), \(\text{Col}\,A\) is the set of all outputs \(A\mathbf{x}\). So a vector \(\mathbf{b}\) is in \(\text{Col}\,A\) exactly when \(A\mathbf{x} = \mathbf{b}\) is consistent, which you test by row reducing \([A \ \mathbf{b}]\). For an \(n \times n\) matrix, \(\text{Col}\,A = \mathbb{R}^n\) is one more statement of the invertible matrix theorem.

The null space

The null space of \(A\), written \(\text{Nul}\,A\), is the set of all solutions of \(A\mathbf{x} = \mathbf{0}\). It lies in \(\mathbb{R}^n\), where \(n\) is the number of columns. It is a subspace: \(A\mathbf{0} = \mathbf{0}\); if \(A\mathbf{u} = \mathbf{0}\) and \(A\mathbf{v} = \mathbf{0}\), then \(A(\mathbf{u} + \mathbf{v}) = \mathbf{0} + \mathbf{0} = \mathbf{0}\); and \(A(c\mathbf{u}) = cA\mathbf{u} = \mathbf{0}\). Testing whether a given vector is in \(\text{Nul}\,A\) is easy, since you just multiply by \(A\). By contrast, the solutions of \(A\mathbf{x} = \mathbf{b}\) with \(\mathbf{b} \ne \mathbf{0}\) never form a subspace, because \(\mathbf{0}\) is not a solution.

Two different kinds of description

The two spaces are described in opposite ways. \(\text{Col}\,A\) is described explicitly, as combinations of known vectors, so writing down members is easy but testing a given vector needs a row reduction. \(\text{Nul}\,A\) is described implicitly, by the equations \(A\mathbf{x} = \mathbf{0}\), so testing a vector is easy but listing members needs a row reduction. They also live in different places when \(m \ne n\): \(\text{Col}\,A\) in \(\mathbb{R}^m\) and \(\text{Nul}\,A\) in \(\mathbb{R}^n\). A third space, the row space spanned by the rows of \(A\), also lies in \(\mathbb{R}^n\); it returns in "Rank and the rank-nullity theorem".

Bases

A basis for a subspace \(H\) is a linearly independent set of vectors in \(H\) that spans \(H\). Spanning means nothing is missing; independence means nothing is wasted, since no vector in the set is a combination of the others. The columns \(\mathbf{e}_1, \dots, \mathbf{e}_n\) of \(I_n\) form the standard basis of \(\mathbb{R}^n\). More generally, the columns of any invertible \(n \times n\) matrix form a basis of \(\mathbb{R}^n\), by the invertible matrix theorem. A subspace other than the zero subspace has many bases, but as "Dimension and rank" shows, they all have the same number of vectors.

Finding bases for Nul A and Col A

For \(\text{Nul}\,A\), reduce \(A\) to reduced echelon form, write the basic variables in terms of the free variables, and split the general solution into one vector per free variable. Those vectors span \(\text{Nul}\,A\), and they are automatically independent, because each has a 1 in its own free-variable position where the others have 0. For \(\text{Col}\,A\), the pivot columns of \(A\) itself form a basis. Row operations change the columns, but they do not change which combinations of the columns equal \(\mathbf{0}\). In the echelon form every non-pivot column is clearly a combination of the pivot columns, so the same is true in \(A\).

Worked example: bases for both spaces

Let \(A\) have rows (1, 3, −1, 2), (2, 6, 0, 2) and (−1, −3, 3, −4). 1. Reduce:

A \sim \begin{bmatrix} 1 & 3 & 0 & 1 \\ 0 & 0 & 1 & -1 \\ 0 & 0 & 0 & 0 \end{bmatrix}

with pivots in columns 1 and 3. 2. Free variables \(x_2\), \(x_4\): \(x_1 = -3x_2 - x_4\) and \(x_3 = x_4\), so \(\text{Nul}\,A\) has basis \((-3, 1, 0, 0)\) and \((-1, 0, 1, 1)\). 3. Check:

A(-1, 0, 1, 1) = (-1 - 1 + 2, -2 + 0 + 2, 1 + 3 - 4) = \mathbf{0}

4. \(\text{Col}\,A\) has basis \(\mathbf{a}_1 = (1, 2, -1)\) and \(\mathbf{a}_3 = (-1, 0, 3)\), a plane in \(\mathbb{R}^3\). 5. Is \(\mathbf{b} = (0, 2, 2)\) in it? Yes: \(\mathbf{a}_1 + \mathbf{a}_3 = (0, 2, 2)\).

Common mistakes to avoid

First, using the pivot columns of the echelon form as a basis for \(\text{Col}\,A\). In the example, every column of the echelon form has last entry 0, yet \(\mathbf{a}_3\) does not, so the spans differ. Second, putting \(\text{Nul}\,A\) in the wrong space: its vectors have one entry per column of \(A\). Third, calling a line or plane that misses the origin a subspace. Fourth, checking only addition and forgetting scalar multiples, which is how the first quadrant fools people. Fifth, listing a spanning set with redundant vectors as a basis.

Key takeaways

A subspace of Rⁿ contains 0 and is closed under addition and scalar multiplication; every span is one. Col A, the span of the columns of an m × n matrix, is a subspace of Rᵐ and is the set of b for which Ax = b is consistent. Nul A, the solution set of Ax = 0, is a subspace of Rⁿ. A basis is a linearly independent spanning set. The vectors from the parametric solution of Ax = 0, one per free variable, form a basis of Nul A. The pivot columns of the original A, not of its echelon form, form a basis of Col A.

Flashcards

Flashcard

Subspace of Rⁿ

Contains 0 and is closed under addition and scalar multiplication

Closed under linear combinations.

Test your understanding

Question 1 of 5

Which of these sets is a subspace of R²?

Question 2 of 5

A is a 5 × 7 matrix. In which spaces do Col A and Nul A lie?

Question 3 of 5

A has columns a₁, a₂, a₃, a₄, and its echelon form has pivots in columns 1, 2 and 4. Which set is a basis for Col A?

Question 4 of 5

The reduced echelon form of A has rows (1, 0, 2, 0), (0, 1, −3, 0), (0, 0, 0, 1). Which vector is a basis for Nul A?

Question 5 of 5

A has columns (1, 2, −1), (3, 6, −3), (−1, 0, 3). How do you decide whether b = (0, 2, 2) is in Col A?

← Previous topicNext topic →