Skip to content

The four fundamental subspaces

Follow a rank-one matrix from its input plane to its output plane, and meet the four subspaces every matrix carries, their sizes and their right angles.

Helps to know first
This topic

First, the picture

A matrix carries one plane onto another. Watch which part of each point arrives, and which part vanishes.

Where a matrix sends everything

A = [1 2; 3 6]: the input plane, and the output plane.

Where things start, and where they land. Each plane is split by two lines at a right angle.

row-line part
(1, 2)
null-line part
(2, −1)
lands on
–
0.00 / 6.50 s
Describe this picture

Two planes side by side (one above the other on a phone) for the matrix A=[1236]\mathbf{A}=\begin{bmatrix}1&2\\3&6\end{bmatrix}. The input plane shows two lines through the origin at a right angle, marked: the row line, in the direction (1,2)(1,2), and the null line, in the direction (2,−1)(2,-1). The output plane shows the column line, direction (1,3)(1,3), and the left null line, direction (3,−1)(3,-1), also at a right angle. The input point x=(3,1)\mathbf{x}=(3,1) is drawn as its two parts, tip to tail: (1,2)(1,2) along the row line and (2,−1)(2,-1) along the null line. Then 25 grid points travel from the input plane to the output plane, each to A\mathbf{A} times itself, and all of them land on the column line; x\mathbf{x} lands on (5,15)(5,15), marked with an arrow along the column line: the part along the row line lands on the column line, and the part along the null line vanishes. Readouts give the two parts and the landing point. One control, once the clip has finished: drag the input point, or move it with the arrow keys in steps of half a unit.

Two planes

The matrix at the top of the page is

A=[1236].\mathbf{A}=\begin{bmatrix}1&2\\3&6\end{bmatrix}.

Its second column is twice the first, so every output is a multiple of (1,3)(1,3): Ax=x1(1,3)+x2(2,6)=(x1+2x2) (1,3)\mathbf{A}\mathbf{x}=x_1(1,3)+x_2(2,6)=(x_1+2x_2)\,(1,3). The whole input plane lands on one line. Its rank is 1.

So two things happen to an input. Some of it arrives on the line of (1,3)(1,3), and some of it is lost. This page sorts out exactly which part is which. The answer uses four subspaces, two on each side of the matrix.

Column space and null space

You have met two of them. The column space C(A)C(\mathbf{A}), from Vector spaces and subspaces, is every output: here the line of (1,3)(1,3), on the output side. The null space N(A)N(\mathbf{A}), from The null space, is every input sent to zero: here the line of (2,−1)(2,-1), on the input side, since A(2,−1)=(2−2,  6−6)=(0,0)\mathbf{A}(2,-1)=(2-2,\;6-6)=(0,0).

For an m×nm\times n matrix of rank rr, the column space has dimension rr and lives in Rm\mathbb{R}^m. The null space has dimension n−rn-r and lives in Rn\mathbb{R}^n.

Row space and left null space

The other two come from the rows. The row space is the span of the rows. The rows of A⊤\mathbf{A}^\top, the transpose from Transposes and permutations, are the columns of A\mathbf{A} and the other way round, so the row space is the column space of the transpose, C(A⊤)C(\mathbf{A}^\top). Here the rows are (1,2)(1,2) and (3,6)(3,6), and (3,6)=3 (1,2)(3,6)=3\,(1,2), so the row space is the line of (1,2)(1,2), on the input side.

The left null space is the null space of the transpose, N(A⊤)N(\mathbf{A}^\top): the vectors y\mathbf{y} with A⊤y=0\mathbf{A}^\top\mathbf{y}=\mathbf{0}. Transpose both sides and this says y⊤A=0⊤\mathbf{y}^\top\mathbf{A}=\mathbf{0}^\top: the entries of y\mathbf{y} are weights that combine the rows of A\mathbf{A} into zero. Here 3⋅row 1−row 2=03\cdot\text{row 1}-\text{row 2}=\mathbf{0}, so the left null space is the line of (3,−1)(3,-1), on the output side. The name comes from y\mathbf{y} standing on the left of A\mathbf{A}.

Watch out

The row space is not the column space. Here the rows point along (1,2)(1,2) and the columns along (1,3)(1,3): two different lines, in two different planes. The row space lives with the inputs, and the column space with the outputs.

Right angles

Look at the input plane in the picture. The row line and the null line cross at a right angle. That always happens, and the reason is one line long. Ax=0\mathbf{A}\mathbf{x}=\mathbf{0} says that every row of A\mathbf{A}, dotted with x\mathbf{x}, gives 0. By Length and the dot product, that makes x\mathbf{x} perpendicular to every row, and so to every combination of rows. In symbols, with ⊥\perp for “perpendicular to”:

C(A⊤)⊥N(A).C(\mathbf{A}^\top)\perp N(\mathbf{A}).

The same argument on the transpose puts the other pair at a right angle, on the output side:

C(A)⊥N(A⊤).C(\mathbf{A})\perp N(\mathbf{A}^\top).

Here (1,2)⋅(2,−1)=2−2=0(1,2)\cdot(2,-1)=2-2=0 and (1,3)⋅(3,−1)=3−3=0(1,3)\cdot(3,-1)=3-3=0.

The trip across

Now follow one input. Every point of the input plane splits into a part on the row line and a part on the null line, which I write x=xrow+xnull\mathbf{x}=\mathbf{x}_\text{row}+\mathbf{x}_\text{null}. The point (3,1)(3,1) is

(3,1)=(1,2)+(2,−1).(3,1)=(1,2)+(2,-1).

The matrix sends the null part to zero and the row part onto the column line:

A(3,1)=A(1,2)+A(2,−1)=(5,15)+(0,0)=(5,15).\begin{aligned} \mathbf{A}(3,1)&=\mathbf{A}(1,2)+\mathbf{A}(2,-1)\\ &=(5,15)+(0,0)=(5,15). \end{aligned}

Drag the input point in the picture and watch its two parts. Slide it along the null line and the image does not move at all. Slide it along the row line and the image runs along the column line. Two different points of the row line never land on the same output, so the matrix carries the row space onto the column space one to one. Everything that is lost is the null part.

Dimensions add up

The row space has the same dimension as the column space: rr. Elimination only mixes rows, so it never changes their span, and the rows with pivots in the reduced form are a basis of the row space. There are rr of them. So for an m×nm\times n matrix of rank rr:

SubspaceSymbolLives inDimension
column spaceC(A)C(\mathbf{A})Rm\mathbb{R}^m, outputsrr
left null spaceN(A⊤)N(\mathbf{A}^\top)Rm\mathbb{R}^m, outputsm−rm-r
row spaceC(A⊤)C(\mathbf{A}^\top)Rn\mathbb{R}^n, inputsrr
null spaceN(A)N(\mathbf{A})Rn\mathbb{R}^n, inputsn−rn-r

On each side the two dimensions add up to the whole space: r+(n−r)=nr+(n-r)=n for the inputs and r+(m−r)=mr+(m-r)=m for the outputs. For the matrix at the top, m=n=2m=n=2 and r=1r=1, so every one of the four is a line.

Worked example

1. The 2×42\times4 matrix of the null space page. A=[12132438]\mathbf{A}=\begin{bmatrix}1&2&1&3\\2&4&3&8\end{bmatrix} has m=2m=2, n=4n=4, r=2r=2. Row space: dimension 2. Null space: 4−2=24-2=2, the two special solutions. Column space: 2, so all of R2\mathbb{R}^2. Left null space: 2−2=02-2=0, only 0\mathbf{0}, since the two rows are independent.

2. A 3×23\times2 matrix. B=[100111]\mathbf{B}=\begin{bmatrix}1&0\\0&1\\1&1\end{bmatrix} has m=3m=3, n=2n=2, r=2r=2. Row space: 2, all of R2\mathbb{R}^2. Null space: 0. Column space: 2, the plane b3=b1+b2b_3=b_1+b_2. Left null space: 3−2=13-2=1, the line of (1,1,−1)(1,1,-1), since

B⊤[11−1]=[1+0−10+1−1]=[00].\mathbf{B}^\top\begin{bmatrix}1\\1\\-1\end{bmatrix}=\begin{bmatrix}1+0-1\\0+1-1\end{bmatrix}=\begin{bmatrix}0\\0\end{bmatrix}.

It is perpendicular to both columns: (1,0,1)⋅(1,1,−1)=0(1,0,1)\cdot(1,1,-1)=0 and (0,1,1)⋅(1,1,−1)=0(0,1,1)\cdot(1,1,-1)=0.

3. Counting. A 3×43\times4 matrix of rank 2 has a row space of dimension 2. A 5×35\times3 matrix of rank 3 has a left null space of dimension 5−3=25-3=2.

Predict before you drag: where does (3,1)(3,1) land? At (5,15)(5,15), the same place as (1,2)(1,2).

Where you’ll meet this

Checking measurements. Suppose three sensors report b1b_1, b2b_2 and b3b_3, and the physics says b3=b1+b2b_3=b_1+b_2, as for B\mathbf{B} above. Every possible clean reading lies in C(B)C(\mathbf{B}), so it is perpendicular to the left null vector (1,1,−1)(1,1,-1): b1+b2−b3=0b_1+b_2-b_3=0. A reading that fails this check holds an error. Left null vectors are the checks that consistent data must pass.

The best answer when there is none. When Ax=b\mathbf{A}\mathbf{x}=\mathbf{b} has no solution, the closest output leaves an error that is perpendicular to the column space, so the error lies in the left null space. That is the idea behind least squares, the method that fits a line to scattered data.

Rank-one images. A rank-one matrix of pixel values is one column times one row: every row of the image is a multiple of the same row. Such an image is a plaid: horizontal bands times vertical bands, and a photo can be built up as a sum of a few rank-one pieces.

Reference card

QuantityFormulaNotes
Column spaceC(A)C(\mathbf{A}), dimension rroutputs, in Rm\mathbb{R}^m
Null spaceN(A)N(\mathbf{A}), dimension n−rn-rinputs sent to 0\mathbf{0}, in Rn\mathbb{R}^n
Row spaceC(A⊤)C(\mathbf{A}^\top), dimension rrspan of the rows, in Rn\mathbb{R}^n
Left null spaceN(A⊤)N(\mathbf{A}^\top), dimension m−rm-ry⊤A=0⊤\mathbf{y}^\top\mathbf{A}=\mathbf{0}^\top, in Rm\mathbb{R}^m
InputsC(A⊤)⊥N(A)C(\mathbf{A}^\top)\perp N(\mathbf{A})r+(n−r)=nr+(n-r)=n
OutputsC(A)⊥N(A⊤)C(\mathbf{A})\perp N(\mathbf{A}^\top)r+(m−r)=mr+(m-r)=m
The tripx=xrow+xnull\mathbf{x}=\mathbf{x}_\text{row}+\mathbf{x}_\text{null}, Ax=Axrow\mathbf{A}\mathbf{x}=\mathbf{A}\mathbf{x}_\text{row}the row space maps one to one onto the column space

Keep reading with a free account.

By creating an account you accept the terms of use.

Sign in

Already have an account? Use the service you signed up with.

Or keep reading: get new lessons by email

Are you 13 or over?

Accounts and email updates are for people aged 13 or over. We keep only your answer, never your date of birth.

End of the lesson

Where to go next.

Phasorium

Account

Sign inKeep your place on any device

Subjects

Site

Look