Skip to content

The four fundamental subspaces

7 min read

Short answer

An m×nm\times n matrix of rank rr carries four subspaces: the column space and left null space in Rm\mathbb{R}^m, and the row space and null space in Rn\mathbb{R}^n. Their dimensions are rr, m−rm-r, rr and n−rn-r, and each pair in the same space is orthogonal and fills it up.

In R^n (inputs) compared with In R^m (outputs)In R^n (inputs)Row space: dim rNull space: dim n − rThey are perpendicularTogether they fill R^nIn R^m (outputs)Column space: dim rLeft null space: dim m− rThey are perpendicularTogether they fill R^m
Each side of the picture splits into a pair of perpendicular subspaces whose dimensions add up to the size of the space.

Meet the four

  • Column space C(A)⊆RmC(A)\subseteq\mathbb{R}^m: all combinations of the columns, i.e. all possible outputs. Dimension rr.
  • Null space N(A)⊆RnN(A)\subseteq\mathbb{R}^n: inputs sent to zero. Dimension n−rn-r (rank-nullity).
  • Row space C(AT)⊆RnC(A^T)\subseteq\mathbb{R}^n: all combinations of the rows. Dimension rr too, because row rank equals column rank.
  • Left null space N(AT)⊆RmN(A^T)\subseteq\mathbb{R}^m: vectors y\mathbf{y} with ATy=0A^T\mathbf{y}=\mathbf{0}, equivalently yTA=0T\mathbf{y}^TA=\mathbf{0}^T. Dimension m−rm-r.

Applying rank-nullity to ATA^T (which has mm columns and rank rr) gives the last dimension.

Why they pair up orthogonally

Ax=0A\mathbf{x}=\mathbf{0} says every row of AA has dot product 00 with x\mathbf{x}. So every null vector is perpendicular to every row, hence to the whole row space. Dimensions finish the job: the row space has dimension rr, the null space n−rn-r, and they sum to nn, so they are orthogonal complements and every x∈Rn\mathbf{x}\in\mathbb{R}^n splits uniquely as a row-space part plus a null-space part.

The same argument applied to ATA^T shows the column space and left null space are orthogonal complements in Rm\mathbb{R}^m.

The picture that explains solving and fitting

The row-space part of an input is the only part that affects the output; the null-space part is invisible to AA. So AA is a one-to-one map from the rr-dimensional row space onto the rr-dimensional column space.

This explains least squares: if b\mathbf{b} is not in the column space, split b\mathbf{b} into a column-space part and a left-null-space part. The first can be matched exactly; the second is the unavoidable error, and it is perpendicular to the column space.

Worked example

Find bases for the four subspaces of A=(122436)A=\begin{pmatrix}1&2\\2&4\\3&6\end{pmatrix} and check the orthogonality relations.

Every row is a multiple of (1,2)(1,2), so the rank is r=1r=1 (m=3m=3, n=2n=2).

  • Column space: spanned by (1,2,3)(1,2,3) (dimension 1).
  • Row space: spanned by (1,2)(1,2) (dimension 1).
  • Null space: x+2y=0x+2y=0, spanned by (−2,1)(-2,1) (dimension n−r=1n-r=1).
  • Left null space: y1+2y2+3y3=0y_1+2y_2+3y_3=0, a plane (dimension m−r=2m-r=2) with basis (−2,1,0)(-2,1,0) and (−3,0,1)(-3,0,1).

Checks: (1,2)⋅(−2,1)=0(1,2)\cdot(-2,1)=0 ✓; (1,2,3)⋅(−2,1,0)=0(1,2,3)\cdot(-2,1,0)=0 ✓ and (1,2,3)⋅(−3,0,1)=0(1,2,3)\cdot(-3,0,1)=0 ✓.

Try it yourself

A 3×33\times3 matrix has rank 2. What are the dimensions of its four subspaces?

Show the answer

Column space 2, row space 2, null space 3−2=13-2=1, left null space 3−2=13-2=1.

Keep going with practice

Vidi's linear algebra course revisits these subspaces whenever you solve or fit a system.