Tutorials › Linear Algebra › Diagnostic Problems on Fundamental Subspaces

Fundamental Subspaces and Rank · Tutorial 369 of 1000

Diagnostic Problems on Fundamental Subspaces

Learn a reliable workflow for finding all four fundamental subspaces and checking their dimensions and basis vectors.

Intermediate 9 min read

What You'll Learn

  • Find column-space bases from pivot columns of the original matrix
  • Find row-space bases from the nonzero rows of the RREF
  • Parametrize null-space solutions using free variables
  • Compute the left null space by solving the transposed system
  • Check dimensions against the rank and rank-nullity
  • Verify proposed basis vectors directly

A Four-Subspace Diagnostic

For a matrix \(\mathbf{A}\in\mathbb{R}^{m\times n}\), four subspaces capture different aspects of the same linear system. The column space describes which right-hand sides can be produced by \(\mathbf{A}\mathbf{x}\); the null space describes the solutions of \(\mathbf{A}\mathbf{x}=\mathbf{0}\). The row space records the independent equations, while the left null space consists of vectors that annihilate every column. A useful diagnostic is not just to calculate one of these spaces, but to find all four and check that their dimensions and vectors agree with the matrix.

Definition: For \(\mathbf{A}\in\mathbb{R}^{m\times n}\), the column space is \(\operatorname{Col}\mathbf{A}\subseteq\mathbb{R}^m\), the span of its columns. The row space is \(\operatorname{Row}\mathbf{A}\subseteq\mathbb{R}^n\), the span of the transposes of its rows. The null space is \(\operatorname{Nul}\mathbf{A}=\{\mathbf{x}\in\mathbb{R}^n:\mathbf{A}\mathbf{x}=\mathbf{0}\}\). The left null space is \(\operatorname{Nul}\mathbf{A}^{\top}=\{\mathbf{y}\in\mathbb{R}^m:\mathbf{A}^{\top}\mathbf{y}=\mathbf{0}\}\).

In each problem, first find the RREF and count its pivots; call that number \(r\). Use the pivot-column indices to select columns from the original matrix for a basis of \(\operatorname{Col}\mathbf{A}\). The nonzero rows of the RREF give a basis of \(\operatorname{Row}\mathbf{A}\). Solve \(\mathbf{A}\mathbf{x}=\mathbf{0}\) for the null space, and solve \(\mathbf{A}^{\top}\mathbf{y}=\mathbf{0}\) for the left null space. The last two calculations are related, but their vectors have different numbers of entries.

Why the Standard Basis Choices Work

These basis rules follow from row reduction, but the column-space rule needs particular care: row operations generally change the columns themselves. The fact that the pivot columns of the original matrix work follows because row reduction applies an invertible operation to every column at once.

Theorem: Let \(\mathbf{A}\in\mathbb{R}^{m\times n}\), and let \(\mathbf{R}=\operatorname{rref}(\mathbf{A})\) have \(r\) pivots. The pivot columns of the original matrix \(\mathbf{A}\) form a basis for \(\operatorname{Col}\mathbf{A}\), and the transposes of the nonzero rows of \(\mathbf{R}\) form a basis for \(\operatorname{Row}\mathbf{A}\).

Proof. Row reduction consists of reversible elementary row operations, so \(\mathbf{R}=\mathbf{E}\mathbf{A}\) for an invertible matrix \(\mathbf{E}\). Write the columns of \(\mathbf{A}\) and \(\mathbf{R}\) as \(\mathbf{a}_j\) and \(\mathbf{r}_j\); then \(\mathbf{r}_j=\mathbf{E}\mathbf{a}_j\). In RREF, each nonpivot column is a linear combination of the pivot columns, as can be read from its entries in the pivot rows. Thus \(\mathbf{r}_j=\sum_k c_k\mathbf{r}_{p_k}\) for pivot indices \(p_k\). Multiplying by \(\mathbf{E}^{-1}\) gives \(\mathbf{a}_j=\sum_k c_k\mathbf{a}_{p_k}\), so the original pivot columns span \(\operatorname{Col}\mathbf{A}\). If a combination of the original pivot columns is zero, applying \(\mathbf{E}\) gives the same combination of the pivot columns of \(\mathbf{R}\). Those columns are independent: their entries in the distinct pivot rows form the identity pattern, so each coefficient must be zero. Hence the original pivot columns are a basis. For the row-space claim, each elementary row operation replaces rows by linear combinations of rows, and its inverse does the same; therefore row operations preserve row space. The nonzero rows of \(\mathbf{R}\) span it. They are independent because in a linear combination of those rows, the entry in each row’s pivot column is exactly that row’s coefficient. A zero combination therefore has every coefficient zero. \(\square\)

Theorem: For \(\mathbf{A}\in\mathbb{R}^{m\times n}\) of rank \(r\), the four dimensions are \(\dim(\operatorname{Col}\mathbf{A})=r\), \(\dim(\operatorname{Row}\mathbf{A})=r\), \(\dim(\operatorname{Nul}\mathbf{A})=n-r\), and \(\dim(\operatorname{Nul}\mathbf{A}^{\top})=m-r\).

Proof. The pivot-basis result shows that the column space and row space each have dimension \(r\). In the homogeneous system \(\mathbf{A}\mathbf{x}=\mathbf{0}\), there are \(n\) variables and \(r\) pivot variables, so there are \(n-r\) free variables. Giving the free variables arbitrary values determines the pivot variables, and setting one free variable at a time to \(1\), with the others \(0\), gives \(n-r\) independent vectors spanning the solutions. Thus the nullity is \(n-r\). Apply the same free-variable argument to \(\mathbf{A}^{\top}\), which has \(m\) variables. Its rank is \(r\): the row space of \(\mathbf{A}^{\top}\) is the span of the transposes of the columns of \(\mathbf{A}\), so its dimension is \(\dim(\operatorname{Col}\mathbf{A})=r\). Hence \(\dim(\operatorname{Nul}\mathbf{A}^{\top})=m-r\). \(\square\)

One further check is orthogonality. For \(\mathbf{x}\in\mathbb{R}^n\), \(\mathbf{A}\mathbf{x}=\mathbf{0}\) exactly when the dot product of \(\mathbf{x}\) with every row of \(\mathbf{A}\) is zero. Thus \(\operatorname{Nul}\mathbf{A}=(\operatorname{Row}\mathbf{A})^\perp\). Likewise, \(\mathbf{A}^{\top}\mathbf{y}=\mathbf{0}\) exactly when \(\mathbf{y}\) is orthogonal to every column of \(\mathbf{A}\), so \(\operatorname{Nul}\mathbf{A}^{\top}=(\operatorname{Col}\mathbf{A})^\perp\). These statements follow directly from the matrix-vector product, and they provide a useful check on which ambient space each null space belongs to.

Worked Problem: A \(3\times4\) Matrix

Worked Example: Two Free Variables and a Nontrivial Left Null Space

Find bases for all four fundamental subspaces of

$$ \mathbf{A}= \begin{bmatrix} 1&2&0&1\\ 2&4&1&3\\ 1&2&1&2 \end{bmatrix}. $$

Subtract \(2R_1\) from \(R_2\), then subtract \(R_1\) from \(R_3\). Next subtract the new \(R_2\) from \(R_3\):

$$ \begin{bmatrix} 1&2&0&1\\ 2&4&1&3\\ 1&2&1&2 \end{bmatrix} \sim \begin{bmatrix} 1&2&0&1\\ 0&0&1&1\\ 0&0&1&1 \end{bmatrix} \sim \begin{bmatrix} 1&2&0&1\\ 0&0&1&1\\ 0&0&0&0 \end{bmatrix} =\mathbf{R}. $$

This is RREF, with pivots in columns 1 and 3, so \(r=2\). The column-space basis must use those columns from the original matrix. The row-space basis comes from the two nonzero rows of \(\mathbf{R}\):

$$ \operatorname{Col}\mathbf{A} =\operatorname{span}\left\{ \begin{bmatrix}1\\2\\1\end{bmatrix}, \begin{bmatrix}0\\1\\1\end{bmatrix} \right\}, \qquad \operatorname{Row}\mathbf{A} =\operatorname{span}\left\{ \begin{bmatrix}1\\2\\0\\1\end{bmatrix}, \begin{bmatrix}0\\0\\1\\1\end{bmatrix} \right\}. $$

For the null space, the RREF equations are \(x_1+2x_2+x_4=0\) and \(x_3+x_4=0\). Set \(x_2=s\) and \(x_4=t\). Then \(x_1=-2s-t\), \(x_3=-t\), and

$$ \mathbf{x} =s\begin{bmatrix}-2\\1\\0\\0\end{bmatrix} +t\begin{bmatrix}-1\\0\\-1\\1\end{bmatrix}, \qquad \operatorname{Nul}\mathbf{A} =\operatorname{span}\left\{ \begin{bmatrix}-2\\1\\0\\0\end{bmatrix}, \begin{bmatrix}-1\\0\\-1\\1\end{bmatrix} \right\}. $$

For the left null space, solve \(\mathbf{A}^{\top}\mathbf{y}=\mathbf{0}\), where \(\mathbf{y}=(y_1,y_2,y_3)^\top\). The equations from columns 1 and 3 are \(y_1+2y_2+y_3=0\) and \(y_2+y_3=0\). The equation from column 2 is twice the first equation, and the equation from column 4 is the sum of the equations from columns 1 and 3, so neither adds a new condition. Taking \(y_2=q\) gives \(y_3=-q\) and \(y_1=-q\), so

$$ \operatorname{Nul}\mathbf{A}^{\top} =\operatorname{span}\left\{ \begin{bmatrix}-1\\1\\-1\end{bmatrix} \right\}. $$

Checks: Multiplying \(\mathbf{A}\) by the two null-space basis vectors gives \(\mathbf{0}\): their row-by-row products are \((-2+2,\,-4+4,\,-2+2)=(0,0,0)\) and \((-1+1,\,-2-1+3,\,-1-1+2)=(0,0,0)\). Also, \(\mathbf{A}^{\top}(-1,1,-1)^\top=\mathbf{0}\), since the four column dot products are \( -1+2-1=0\), \(-2+2=0\), \(1-1=0\), and \(-1+3-2=0\). The dimensions are \(2,2,2,1\); in particular, \(r+\operatorname{nullity}\mathbf{A}=2+2=4=n\), and \(r+\operatorname{nullity}\mathbf{A}^{\top}=2+1=3=m\).

Worked Problem: A \(4\times3\) Matrix

Worked Example: Full Column Rank but a Nonzero Left Null Space

Find all four subspaces for

$$ \mathbf{B}= \begin{bmatrix} 1&0&1\\ 0&1&1\\ 1&1&2\\ 2&-1&3 \end{bmatrix}. $$

Apply \(R_3\to R_3-R_1-R_2\) and \(R_4\to R_4-2R_1+R_2\), giving rows \((0,0,0)\) and \((0,0,2)\) in the last two positions. Swap rows 3 and 4, scale the new row 3 by \(\tfrac12\), then clear the third-column entries above it:

$$ \begin{bmatrix} 1&0&1\\0&1&1\\1&1&2\\2&-1&3 \end{bmatrix} \sim \begin{bmatrix} 1&0&1\\0&1&1\\0&0&0\\0&0&2 \end{bmatrix} \sim \begin{bmatrix} 1&0&1\\0&1&1\\0&0&1\\0&0&0 \end{bmatrix} \sim \begin{bmatrix} 1&0&0\\0&1&0\\0&0&1\\0&0&0 \end{bmatrix} =\operatorname{rref}(\mathbf{B}). $$

All three columns are pivot columns. Therefore the three original columns form a basis for \(\operatorname{Col}\mathbf{B}\). The nonzero rows of the RREF give a basis for the row space:

$$ \operatorname{Col}\mathbf{B} =\operatorname{span}\left\{ \begin{bmatrix}1\\0\\1\\2\end{bmatrix}, \begin{bmatrix}0\\1\\1\\-1\end{bmatrix}, \begin{bmatrix}1\\1\\2\\3\end{bmatrix} \right\}, \qquad \operatorname{Row}\mathbf{B}=\mathbb{R}^3. $$

Since every variable is a pivot variable, the homogeneous system has only \(\mathbf{x}=\mathbf{0}\), so \(\operatorname{Nul}\mathbf{B}=\{\mathbf{0}\}\). To find the left null space, the vector \((-1,-1,1,0)^\top\) gives the row relation \(-R_1-R_2+R_3=\mathbf{0}\). Equivalently, direct multiplication gives \(\mathbf{B}^{\top}(-1,-1,1,0)^\top=(0,0,0)^\top\). Hence the left null space is spanned by that vector.

Check: The row relation is valid because \((1,1,2)=(1,0,1)+(0,1,1)\), which is a relation among the rows of \(\mathbf{B}\). More directly, the complete row combination is \(-(1,0,1)-(0,1,1)+(1,1,2)=(0,0,0)\) for the first three rows, with coefficient \(0\) on row 4. The dimensions are \(3,3,0,1\), and \(3+0=n\), \(3+1=m\).

Worked Problem: A Rank-One \(2\times3\) Matrix

Worked Example: A Rank-One Matrix with Two Free Variables

For

$$ \mathbf{C}= \begin{bmatrix} 2&-1&3\\ 4&-2&6 \end{bmatrix}, $$

subtract \(2R_1\) from \(R_2\), then scale \(R_1\) by \(\tfrac12\):

$$ \begin{bmatrix}2&-1&3\\4&-2&6\end{bmatrix} \sim \begin{bmatrix}2&-1&3\\0&0&0\end{bmatrix} \sim \begin{bmatrix}1&-\tfrac12&\tfrac32\\0&0&0\end{bmatrix} =\operatorname{rref}(\mathbf{C}). $$

There is one pivot, in column 1. Thus \(\operatorname{Col}\mathbf{C}\) is spanned by the first original column \((2,4)^\top\), and the row space is spanned by \((1,-\tfrac12,\tfrac32)^\top\). The null equation is \(x_1-\tfrac12x_2+\tfrac32x_3=0\). Set \(x_2=s\), \(x_3=t\); then \(x_1=\tfrac12s-\tfrac32t\), so an integer-scaled basis is

$$ \operatorname{Nul}\mathbf{C} =\operatorname{span}\left\{ \begin{bmatrix}1\\2\\0\end{bmatrix}, \begin{bmatrix}-3\\0\\2\end{bmatrix} \right\}. $$

For the left null space, the two rows of \(\mathbf{C}\) are dependent: row 2 is twice row 1. Thus \((-2,1)^\top\) is a left null vector, and its span is \(\operatorname{Nul}\mathbf{C}^{\top}\).

Check: \(\mathbf{C}(1,2,0)^\top=(2-2,4-4)^\top=(0,0)^\top\), and \(\mathbf{C}(-3,0,2)^\top=(-6+6,-12+12)^\top=(0,0)^\top\). Also, \(\mathbf{C}^{\top}(-2,1)^\top=\mathbf{0}\), because \(-2(2,-1,3)^\top+(4,-2,6)^\top=(0,0,0)^\top\). The four dimensions are \(1,1,2,1\), with \(1+2=3\) and \(1+1=2\).

Common Pitfall: Pivot Columns of Which Matrix?

A frequent error is to take pivot columns from the RREF as a basis for the original column space. Row operations preserve row space and the solutions of a homogeneous system, but they do not generally preserve column space. In the first example, column 1 of the RREF is \((1,0,0)^\top\). It is not in \(\operatorname{Col}\mathbf{A}\): if it were \(\alpha(1,2,1)^\top+\beta(0,1,1)^\top\), the first and third entries would force \(\alpha=1\) and \(\beta=-1\), but the second entry would then be \(2-1=1\), not \(0\). The correction is to use the RREF only to identify pivot-column indices, then take those columns from the original matrix.

A second check is to keep the ambient dimensions visible. For an \(m\times n\) matrix, column-space and left-null vectors have \(m\) entries; row-space and null-space vectors have \(n\) entries. Finally, if there are \(r\) pivots, the dimension checks must read

$$ \dim(\operatorname{Col}\mathbf{A})+\dim(\operatorname{Nul}\mathbf{A})=r+(n-r)=n, \qquad \dim(\operatorname{Row}\mathbf{A})+\dim(\operatorname{Nul}\mathbf{A}^{\top})=r+(m-r)=m. $$

These checks catch a wrong number of free variables or a left-null calculation performed with the wrong matrix. They do not replace direct substitution: each proposed null vector should still be multiplied by the relevant matrix, and each proposed row relation should be verified.

Check Your Understanding

For each problem, identify pivot columns and verify the resulting dimensions against the matrix shape.

  1. For \(\begin{bmatrix}1&2&1\\2&4&2\end{bmatrix}\), find bases for all four fundamental subspaces.
  2. Explain why the nonzero rows of \(\operatorname{rref}(\mathbf{A})\) give a row-space basis, but its pivot columns need not give a column-space basis for \(\mathbf{A}\).
  3. A \(5\times3\) matrix has rank \(2\). What are the dimensions of its four fundamental subspaces?
  4. For \(\begin{bmatrix}1&0\\0&1\\1&1\end{bmatrix}\), find a basis for the left null space and verify it by multiplication.
  5. State the ambient space of each of the four fundamental subspaces for an \(m\times n\) matrix.

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon