Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Fundamental Subspaces






The Complete Structural Portrait of a Matrix

Every matrix defines four subspaces — two in the domain and two in the codomain — whose dimensions and orthogonality relationships form a complete picture of the linear map. The rank governs all four dimensions, and the four subspaces together account for every vector in both spaces.



Overview

An m×nm \times n matrix AA gives rise to four subspaces:

The column space Col(A)\text{Col}(A) and the left null space Null(AT)\text{Null}(A^T) live in Rm\mathbb{R}^m.

The row space Row(A)\text{Row}(A) and the null space Null(A)\text{Null}(A) live in Rn\mathbb{R}^n.

A single integer — the rank rr — controls the dimension of all four. The column space and row space each have dimension rr:

Row Rank Equals Column Rank
dim⁡(Row A)=dim⁡(Col A)=rank(A)\dim(\text{Row}\,A) = \dim(\text{Col}\,A) = \text{rank}(A)
Learn more about this formula: Row Rank Equals Column Rank →


The null space has dimension n−rn - r. The left null space has dimension m−rm - r. These four numbers add up correctly: r+(n−r)=nr + (n - r) = n in the domain, and r+(m−r)=mr + (m - r) = m in the codomain.

The four subspaces are not independent of each other. They pair off into orthogonal complements — the row space and null space are perpendicular in Rn\mathbb{R}^n, while the column space and left null space are perpendicular in Rm\mathbb{R}^m. This structure is the definitive description of what the map x↦Ax\mathbf{x} \mapsto A\mathbf{x} does.
DownloadPNG2×PDF
Before you read
Four subspaces from one matrix
Every m×nm \times n matrix AA of rank rr carries four subspaces: two live in Rn\mathbb{R}^n, two in Rm\mathbb{R}^m.
The four fundamental subspacesof an m × n matrix of rank r
Column spaceCol⁡(A)\operatorname{Col}(A)
Lives inRm\mathbb{R}^m
Dimensionrr
Row spaceRow⁡(A)\operatorname{Row}(A)
Lives inRn\mathbb{R}^n
Dimensionrr
Null spaceNull⁡(A)\operatorname{Null}(A)
Lives inRn\mathbb{R}^n
Dimensionn−rn - r
Left null spaceNull⁡(AT)\operatorname{Null}(A^T)
Lives inRm\mathbb{R}^m
Dimensionm−rm - r
Takeaway
They come in complementary pairs
The row space and the null space of AA complete each other in Rn\mathbb{R}^n; the column space and the null space of ATA^T complete each other in Rm\mathbb{R}^m.
The four fundamental subspaces·/linear-algebra/vector-spaces/fundamental-spacesLearn Math Class

Notation for the Four Subspaces

Notation

Notation for the Four Subspaces

Operator names that vary by author, one subspace that never got a mark of its own, and the barred arrow that points at elements instead of spaces.
Span\text{Span} and its braces — span notation; ATA^{T} and (aij)(a_{ij}) — matrix notation; dim⁡\dim — the dimension page.
Col(A)\text{Col}(A) · Row(A)\text{Row}(A) · Null(A)\text{Null}(A)
The column space, row space, and null space of A
Word-fragment operators, each defined in its own section below. The names vary by author more than almost any notation on this site: Strang writes C(A)C(A), N(A)N(A); others col⁡A\operatorname{col} A, null⁡A\operatorname{null} A; the transformations tribe says im⁡\operatorname{im} and ker⁡\ker for the same two spaces.
Casesker⁡A=Null(A)\ker A = \text{Null}(A) and im⁡A=Col(A)\operatorname{im} A = \text{Col}(A) exactly — the kernel and image vocabulary, one concept wearing map-clothing instead of matrix-clothing.
Also writtenR(A)R(A) — and here the naming wars draw blood: some texts mean the range (column space), others the row space. Same letter, two of the four subspaces; only the surrounding text decides.
Do not confuseFunctions of AA. Col(A)\text{Col}(A) returns a subspace, not a number or matrix — these operators change species, like det⁡\det but landing on sets.
Null(AT)\text{Null}(A^{T})
The left null space — written through the transpose
The one fundamental subspace that never received a mark of its own: it is always spelled via another space's notation. The name “left” comes from its other spelling — solutions of yTA=0T\mathbf{y}^{T}A = \mathbf{0}^{T}, where y\mathbf{y} multiplies AA from the left.
CasesBoth spellings appear in The Left Null Space below; the transpose form wins in computations (reuse the null-space algorithm on ATA^{T}), the left-multiplication form explains the name.
Also writtencoker⁡A\operatorname{coker} A — the cokernel, in advanced texts; the everyday literature simply lives with the compound notation.
Do not confuseA new operation. Nothing new is happening — it is the ordinary null space of the ordinary transpose; the compound name is bookkeeping, not machinery.
x↦Ax\mathbf{x} \mapsto A\mathbf{x}
x maps to A x
The barred arrow acts on elements: it shows what happens to one input. Its bare cousin acts on spaces: T:Rn→RmT: \mathbb{R}^n \to \mathbb{R}^m declares domain and codomain. One sentence can legally use both — T:Rn→RmT: \mathbb{R}^n \to \mathbb{R}^m, x↦Ax\mathbf{x} \mapsto A\mathbf{x} — and the bar is the entire difference.
CasesThe device defines a map without naming it — the Overview above uses exactly this to describe what AA does. Standard throughout function notation, where x↦x2x \mapsto x^2 builds a function with no letter spent.
Also writtenT(x)=AxT(\mathbf{x}) = A\mathbf{x} — the named, equation-style spelling; bulkier, but survives being referenced later.
Do not confuseThe plain arrow. Writing x→Ax\mathbf{x} \to A\mathbf{x} misuses the space-level arrow on elements — and collides with the limit arrow on top; the bar exists to keep all three apart.

The Column Space

The column space of AA is the span of the columns of AA:

The Column Space
Col(A)={Ax:x∈Rn}=Span{a1,a2,…,an}\text{Col}(A) = \{A\mathbf{x} : \mathbf{x} \in \mathbb{R}^n\} = \text{Span}\{\mathbf{a}_1, \mathbf{a}_2, \dots, \mathbf{a}_n\}

It is the set of all possible outputs of the linear transformation x↦Ax\mathbf{x} \mapsto A\mathbf{x}, and it lives in Rm\mathbb{R}^m. Its dimension is r=rank(A)r = \text{rank}(A).

THEOREM
The column space answers the solvability question: Ax=bA\mathbf{x} = \mathbf{b} has a solution if and only if b∈Col(A)\mathbf{b} \in \text{Col}(A).

Vectors outside the column space are unreachable — no input x\mathbf{x} can produce them.

To find a basis for the column space, row reduce AA and identify the pivot columns. The corresponding columns of the original matrix AA form the basis. The echelon form identifies which columns are independent, but the original columns are the actual vectors in Rm\mathbb{R}^m that span the column space.

Worked Example


The Column Space
A=(132−1265−1−1−303)A = \begin{pmatrix} 1 & 3 & 2 & -1 \\ 2 & 6 & 5 & -1 \\ -1 & -3 & 0 & 3 \end{pmatrix}

Row reduction gives pivots in columns 11 and 33. The column space basis consists of the first and third columns of the original AA:

The Column Space
{(12−1),(250)}\left\{\begin{pmatrix} 1 \\ 2 \\ -1 \end{pmatrix}, \begin{pmatrix} 2 \\ 5 \\ 0 \end{pmatrix}\right\}

The column space is a two-dimensional subspace (a plane through the origin) in R3\mathbb{R}^3. The rank is 22.
A3×3121243364→basis of C(A)3×2112334
Pivot columns marked as a basis for the column space

The pivot columns have been picked out of the original matrix — the original, not the reduced one, since elimination changes the columns while preserving which of them are independent. Those columns are a basis for everything the matrix can output. Cycle through the other three spaces on the four fundamental subspaces visualizer.

Taking the pivot columns from the reduced matrix instead is the single most common error here, and it produces the right count with the wrong vectors.

The Row Space

The row space of AA is the span of the rows, viewed as vectors in Rn\mathbb{R}^n:

The Row Space
Row(A)=Col(AT)\text{Row}(A) = \text{Col}(A^T)

It lives in Rn\mathbb{R}^n and has dimension rr — the same as the column space, despite the two subspaces living in different ambient spaces.

To find a basis for the row space, row reduce AA and take the nonzero rows of the echelon form. Unlike the column space, the echelon form's rows are used directly — not the original rows. This is valid because elementary row operations replace rows with linear combinations of existing rows, preserving the row space. The nonzero rows of the echelon form are independent (the staircase pattern of pivots guarantees this) and span the same space as the original rows.

Continuing the Example


The echelon form of the matrix above has two nonzero rows. These rows (as vectors in R4\mathbb{R}^4) form a basis for the row space. The row space is a two-dimensional subspace of R4\mathbb{R}^4.

A key fact that distinguishes the row space from the column space: row reduction preserves the row space but changes the column space. The pivot columns of the echelon form are not a basis for the column space of the original matrix — only the corresponding columns of AA are.
R3×3120001000→basis of C(Aᵀ), as rows2×3120001
The row space from R

The same rank-2 matrix as the column-space frame, now read by rows. Row reduction does not change the row space, so the nonzero rows of the reduced form R are a basis for it — two of them, because the rank is 2. The row space lives in the domain, R3, alongside the null space. See all four subspaces of this matrix on the four fundamental subspaces visualizer.

Row operations change the columns but never the row space, which is why R can be read for it directly.

The Null Space

The null space of AA is the set of all vectors that AA maps to zero:

The Null Space
Null(A)={x∈Rn:Ax=0}\text{Null}(A) = \{\mathbf{x} \in \mathbb{R}^n : A\mathbf{x} = \mathbf{0}\}

It lives in Rn\mathbb{R}^n and has dimension n−rn - r, where rr is the rank. This dimension is the nullity, and the identity r+(n−r)=nr + (n - r) = n is the rank-nullity theorem.

The null space measures the failure of injectivity.

RULE
If Null(A)={0}\text{Null}(A) = \{\mathbf{0}\}, the map is injective — different inputs produce different outputs.

If the null space is nontrivial, the map collapses some directions to zero, and distinct inputs can produce the same output: if Ax1=Ax2A\mathbf{x}_1 = A\mathbf{x}_2, then x1−x2∈Null(A)\mathbf{x}_1 - \mathbf{x}_2 \in \text{Null}(A).

To find a basis, reduce AA to RREF and identify the free variables. Each free variable is set to 11 (with the others at 00), and the corresponding solution is one basis vector for the null space.

Continuing the Example


The 3×43 \times 4 matrix has rank 22, so the null space has dimension 4−2=24 - 2 = 2. Two free variables produce two basis vectors. The null space is a two-dimensional subspace of R4\mathbb{R}^4 — a plane through the origin in four-dimensional space.

Pitfall: Keeping the signs from the reduced form
Reading x1=3x2−3x4x_1 = 3x_2 - 3x_4 off the row x1+3x2−3x4=0x_1 + 3x_2 - 3x_4 = 0 gives (3,1,0,0)(3, 1, 0, 0), and AA sends it to (6,12,−6)(6, 12, -6), not 0\mathbf{0}. Moving the terms across flips the signs, x1=−3x2+3x4x_1 = -3x_2 + 3x_4, which gives (−3,1,0,0)(-3, 1, 0, 0).

In the example, the reduced form of AA has the nonzero rows (1,3,0,−3)(1, 3, 0, -3) and (0,0,1,1)(0, 0, 1, 1), with pivots in columns 11 and 33, so x2x_2 and x4x_4 are the free variables. Each nonzero row is an equation linking one pivot variable to the free ones, and it is solved for that pivot variable before any values are chosen. The two choices x2=1,x4=0x_2 = 1, x_4 = 0 and x2=0,x4=1x_2 = 0, x_4 = 1 then produce the two basis vectors.
R3×3120001000→A3×3121243364basis of N(A)3×12−10=03×1000
One special solution per free column

Each free variable has been set to one in turn, with the others at zero, and the pivot variables solved to match. The resulting vectors are independent by construction and span everything the matrix sends to zero. Generate them for your own matrix on the four fundamental subspaces visualizer.

A matrix with no free columns has only the zero vector in its null space, which for a square matrix is the invertible case seen from this side.

The Left Null Space

The left null space is the null space of the transpose:

The Left Null Space
Null(AT)={y∈Rm:ATy=0}\text{Null}(A^T) = \{\mathbf{y} \in \mathbb{R}^m : A^T\mathbf{y} = \mathbf{0}\}

Equivalently, it consists of all vectors y\mathbf{y} satisfying yTA=0T\mathbf{y}^T A = \mathbf{0}^T — hence the name "left" null space, since y\mathbf{y} multiplies AA from the left.

It lives in Rm\mathbb{R}^m and has dimension m−rm - r.

The left null space measures the failure of surjectivity.

RULE
If Null(AT)={0}\text{Null}(A^T) = \{\mathbf{0}\}, the column space is all of Rm\mathbb{R}^m and Ax=bA\mathbf{x} = \mathbf{b} has a solution for every b\mathbf{b}.

If the left null space is nontrivial, there are directions in Rm\mathbb{R}^m that the column space misses.

Fact: One vector proves there is no solution
When yTb≠0\mathbf{y}^T \mathbf{b} \neq 0, the combined equation reads 0=yTb0 = \mathbf{y}^T \mathbf{b}, which is false, so no x\mathbf{x} solves Ax=bA\mathbf{x} = \mathbf{b}. Every unsolvable system has such a y\mathbf{y}, for example the left-null-space part of b\mathbf{b}, so a claim of no solution can always be checked by multiplication alone.

A vector y\mathbf{y} in the left null space can also be read as a list of weights for the mm equations of Ax=bA\mathbf{x} = \mathbf{b}. Multiplying the ii-th equation by yiy_i and adding all of them gives the combined equation yTAx=yTb\mathbf{y}^T A\mathbf{x} = \mathbf{y}^T \mathbf{b}. Because yTA=0T\mathbf{y}^T A = \mathbf{0}^T, every unknown cancels on the left, and only the right-hand side is left to decide whether the combined equation can hold.

To find a basis, solve ATy=0A^T\mathbf{y} = \mathbf{0} by row reducing ATA^T. Alternatively, row reduce [A∣Im][A \mid I_m] — the identity block tracks the row operations, and its rows beside the zero rows of the reduced AA reveal the left null space.

Continuing the Example


The matrix is 3×43 \times 4 with rank 22, so the left null space has dimension 3−2=13 - 2 = 1. It is a line through the origin in R3\mathbb{R}^3 — a single vector (up to scaling) that is orthogonal to every column of AA.
Aᵀ3×3123246134→rref(Aᵀ)3×3101011000→basis of N(Aᵀ)3×111−1·03×1000
The left null space from Aᵀ

Transpose A and reduce: the free column of rref(AT) gives the special solution L, and ATL = 0 confirms it. With rank 2 in a 3-row matrix the left null space has dimension 3 − 2 = 1. It lives in the codomain, beside the column space, and every vector in it is perpendicular to every column. Compare the four subspaces on the four fundamental subspaces visualizer.

The left null space is the null space of Aᵀ, so every tool used for the null space applies to it unchanged.

Dimension Accounting

The four dimensions are not independent — they are locked together by the rank:

Four Fundamental Subspaces Dimensions
dim⁡(Col A)=rdim⁡(Row A)=rdim⁡(Null A)=n−rdim⁡(Null AT)=m−r\begin{aligned} \dim(\text{Col}\,A) &= r & \dim(\text{Row}\,A) &= r \\ \dim(\text{Null}\,A) &= n - r & \dim(\text{Null}\,A^T) &= m - r \end{aligned}
Learn more about this formula: Four Fundamental Subspaces Dimensions →


In the domain Rn\mathbb{R}^n:

Dimension Accounting
dim⁡(Row(A))+dim⁡(Null(A))=r+(n−r)=n\dim(\text{Row}(A)) + \dim(\text{Null}(A)) = r + (n - r) = n

In the codomain Rm\mathbb{R}^m:

Dimension Accounting
dim⁡(Col(A))+dim⁡(Null(AT))=r+(m−r)=m\dim(\text{Col}(A)) + \dim(\text{Null}(A^T)) = r + (m - r) = m

Pitfall: Swapping the row and column counts
For a 2×52 \times 5 matrix of rank 22, swapping the sizes gives dim⁡(Null A)=2−2=0\dim(\text{Null}\,A) = 2 - 2 = 0, as if AA were one-to-one. The null space lies in R5\mathbb{R}^5, so dim⁡(Null A)=5−2=3\dim(\text{Null}\,A) = 5 - 2 = 3, and dim⁡(Null AT)=2−2=0\dim(\text{Null}\,A^T) = 2 - 2 = 0.

The first equation is the rank-nullity theorem. The second is its transpose analogue. Together they say that the four subspaces account for every dimension of both the domain and the codomain — nothing is missing and nothing is double-counted.

For the running example (3×43 \times 4 matrix, rank 22): the row space and null space have dimensions 22 and 22, summing to 4=n4 = n. The column space and left null space have dimensions 22 and 11, summing to 3=m3 = m.

Row space and null space split the domain, column space and left null space split the codomain, with nothing left over.

Orthogonal Complements

The four subspaces pair off into orthogonal complements.

THEOREM
In Rn\mathbb{R}^n, the row space and the null space are orthogonal complements.

Every vector in the null space is perpendicular to every row of AA, because Ax=0A\mathbf{x} = \mathbf{0} means the dot product of x\mathbf{x} with each row is zero. Every vector in Rn\mathbb{R}^n decomposes uniquely as the sum of a row-space component and a null-space component, and these two components are perpendicular.

Pitfall: Pairing the null space with the column space
Taking Col(A)\text{Col}(A) as the partner of Null(A)\text{Null}(A) fails for A=(0100)A = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}, where both are the line through (1,0)(1, 0) and are not perpendicular. The partner of Null(A)\text{Null}(A) is Row(A)\text{Row}(A), the line through (0,1)(0, 1).

In Rm\mathbb{R}^m, the column space and the left null space are orthogonal complements. Every vector in Null(AT)\text{Null}(A^T) is perpendicular to every column of AA (since ATy=0A^T\mathbf{y} = \mathbf{0} means y\mathbf{y} dots to zero with each column). Every vector in Rm\mathbb{R}^m decomposes uniquely as a column-space component plus a left-null-space component.

These orthogonality relationships are not incidental — they are the structural backbone of projection, least squares, and the singular value decomposition. Projecting b\mathbf{b} onto the column space means splitting b\mathbf{b} into its column-space component (the best approximation Ax^A\hat{\mathbf{x}}) and its left-null-space component (the residual b−Ax^\mathbf{b} - A\hat{\mathbf{x}}).
Ambient space Complementary pair Dimensions sum Orthogonality Running 3×4 example (r = 2)
ℝⁿ (domain) Row(A) & Null(A) r + (n − r) = n
(rank-nullity theorem)
Row(A) ⊥ Null(A) 2 + 2 = 4
ℝᵐ (codomain) Col(A) & Null(Aᵀ) r + (m − r) = m
(transpose analogue)
Col(A) ⊥ Null(Aᵀ) 2 + 1 = 3
rows of R2×3120001N(A)3×12−10=02×100andC(A)ᵀ2×3123134N(Aᵀ)3×111−1=02×100
The two orthogonality pairings, side by side

Row space against null space, column space against left null space — each pair meets at right angles and each pair accounts for a whole space between them. Every vector splits uniquely into a part in one and a part in the other, which is what makes these complements rather than merely perpendicular. Check the dot products yourself on the four fundamental subspaces visualizer.

These two right angles are what later let any vector be decomposed into a solvable part and an unreachable one.

The Big Picture

The four fundamental subspaces can be arranged in a single diagram with the domain Rn\mathbb{R}^n on one side and the codomain Rm\mathbb{R}^m on the other.

THEOREM
The matrix AA maps the row space onto the column space. This restriction is a bijection — every vector in the row space has a unique image in the column space, and every vector in the column space comes from exactly one row-space vector.

The rank rr is the dimension of both spaces, and this bijection is the "useful part" of the map.

The matrix AA sends the entire null space to 0\mathbf{0}. These are the directions that the map annihilates — the information that is lost.

Combining these two facts: every vector x∈Rn\mathbf{x} \in \mathbb{R}^n decomposes as x=xr+xn\mathbf{x} = \mathbf{x}_r + \mathbf{x}_n where xr\mathbf{x}_r is in the row space and xn\mathbf{x}_n is in the null space. Then Ax=Axr+Axn=AxrA\mathbf{x} = A\mathbf{x}_r + A\mathbf{x}_n = A\mathbf{x}_r. The null-space component is destroyed, and the row-space component maps bijectively to the column space.

On the codomain side, the column space is what the map can reach, and the left null space is what remains unreachable. Every vector b∈Rm\mathbf{b} \in \mathbb{R}^m decomposes as b=bc+bℓ\mathbf{b} = \mathbf{b}_c + \mathbf{b}_\ell where bc∈Col(A)\mathbf{b}_c \in \text{Col}(A) and bℓ∈Null(AT)\mathbf{b}_\ell \in \text{Null}(A^T). The system Ax=bA\mathbf{x} = \mathbf{b} is solvable if and only if bℓ=0\mathbf{b}_\ell = \mathbf{0}.

This four-subspace decomposition summarizes the entire geometry of the linear map in one picture: what gets mapped where, what gets collapsed, and what is left unreachable.

Examples Across Matrix Types

The four-subspace structure varies dramatically with the properties of the matrix.

For a full-rank square matrix (r=n=mr = n = m): the column space and row space are both all of Rn\mathbb{R}^n. The null space and left null space are both {0}\{\mathbf{0}\}. The map is a bijection — nothing is lost and nothing is missed. This is the case where AA is invertible.

For a rank-11 matrix (r=1r = 1): the column space is a line in Rm\mathbb{R}^m, and the row space is a line in Rn\mathbb{R}^n. Every input maps to a scalar multiple of a single vector. The null space has dimension n−1n - 1 — an entire hyperplane is collapsed to zero. The left null space has dimension m−1m - 1. Almost everything on both sides belongs to the null spaces; only one direction survives the map.

For a projection matrix (A2=AA^2 = A, A=ATA = A^T): the column space and the row space coincide. The null space is the orthogonal complement of the column space. The map fixes every vector in the column space and kills every vector in the null space — it projects Rn\mathbb{R}^n onto a subspace.

For the zero matrix (r=0r = 0): the column space and row space are both {0}\{\mathbf{0}\}. The null space is all of Rn\mathbb{R}^n and the left null space is all of Rm\mathbb{R}^m. Every vector is sent to zero.
Vector spaces · worked cases

The four subspaces, by matrix type

Three matrices with the same four subspaces computed for each. The point is the pattern across them — how much of each space collapses as the rank falls.

3cases
TypeConditionCol(A)Row(A)Null(A)Null(Aᵀ)
Nothing collapses
Invertible square§ 9r=n=mr = n = mall of Rn\mathbb{R}^nall of Rn\mathbb{R}^n{0}\{\mathbf{0}\}{0}\{\mathbf{0}\}
Almost everything collapses
Rank one§ 9A=uvTA = \mathbf{u}\mathbf{v}^{\mathsf{T}}, r=1r = 1the line through u\mathbf{u}the line through v\mathbf{v}hyperplane, dim⁡=n−1\dim = n - 1hyperplane, dim⁡=m−1\dim = m - 1
Collapse split evenly
Symmetric projection§ 9A2=AA^2 = A, A=ATA = A^{\mathsf{T}}the target subspace SSthe same as Col⁡(A)\operatorname{Col}(A)S⊥S^{\perp}the same as Null⁡(A)\operatorname{Null}(A)
Rank is the only variable. At r=nr = n nothing is lost and both null spaces are trivial; at r=1r = 1 almost everything is lost and the null spaces are hyperplanes. Every row obeys r+nullity=nr + \text{nullity} = n on the domain side and r+left nullity=mr + \text{left nullity} = m on the codomain side — the dimension accounting with three sets of numbers substituted in.
The four subspaces, by matrix type·/linear-algebra/vector-spaces/fundamental-spacesLearn Math Class
The third row is the one that does something the others do not. Symmetry makes Row⁡(A)=Col⁡(A)\operatorname{Row}(A) = \operatorname{Col}(A) and Null⁡(AT)=Null⁡(A)\operatorname{Null}(A^{\mathsf{T}}) = \operatorname{Null}(A), so the four subspaces become two — and the two that remain are orthogonal complements of each other. That is exactly the decomposition Rn=S⊕S⊥\mathbb{R}^n = S \oplus S^{\perp} a projection performs, read off the subspace structure rather than from the projection formula.

Summary: The Four-Subspace Reference Card

The four subspaces are the structural fingerprint of a matrix — two living in the domain, two in the codomain, with all four dimensions controlled by the single rank rr. Together with the dimension accounting and orthogonality structure above, this card describes everything about what the linear map x↦Ax\mathbf{x} \mapsto A\mathbf{x} does. The table below collects each subspace alongside its ambient space, its dimension in terms of rr, nn, and mm, its defining set notation, and the row-reduction recipe for finding a basis.
Vector spaces · reference card

The four fundamental subspaces

Two live in Rn\mathbb{R}^n and two in Rm\mathbb{R}^m, and within each pair they are orthogonal complements. Every entry gives its dimension and how to compute a basis — all four come out of the same row reduction.

6subspaces
In the domain — ℝⁿ2
1
dimension rr — the rank
Row⁡(A)=Col⁡(AT)\operatorname{Row}(A) = \operatorname{Col}(A^{\mathsf{T}})
Span of the rows. Row-reduce AA and take the nonzero rows of the echelon form — row operations preserve the row space exactly, which is why the reduced rows still span it. Note the contrast with the column space, where the echelon form must not be used.
2
dimension n−rn - r — the nullity
Null⁡(A)={x:Ax=0}\operatorname{Null}(A) = \{\mathbf{x} : A\mathbf{x} = \mathbf{0}\}
Everything the matrix sends to zero. Reduce to RREF and set each free variable to 11 in turn, the others to 00 — one basis vector per free variable, which is where the count n−rn - r comes from.
In the codomain — ℝᵐ2
3
dimension rr — the rank
Col⁡(A)={Ax:x∈Rn}\operatorname{Col}(A) = \{A\mathbf{x} : \mathbf{x} \in \mathbb{R}^n\}
The reachable outputs. Row-reduce to find which columns hold pivots, then take those columns of the original matrix AA — not of the echelon form. Row operations change the column space, so the reduced columns span something else entirely. This is the single most common error on the page.
4
dimension m−rm - r
Null⁡(AT)={y:ATy=0}\operatorname{Null}(A^{\mathsf{T}}) = \{\mathbf{y} : A^{\mathsf{T}}\mathbf{y} = \mathbf{0}\}
The directions no output ever reaches. Row-reduce ATA^{\mathsf{T}}, or augment as [A∣Im][A \mid I_m] to get the combining coefficients as well. Named "left" because ATy=0A^{\mathsf{T}}\mathbf{y} = \mathbf{0} is the same as yTA=0T\mathbf{y}^{\mathsf{T}}A = \mathbf{0}^{\mathsf{T}}.
What ties the pairs together2
5
r+(n−r)=nr + (n - r) = n
The row space and null space are orthogonal complements in Rn\mathbb{R}^n, so their dimensions sum to nn and they meet only at the origin. Every vector in the domain splits uniquely into a part each.
6
r+(m−r)=mr + (m - r) = m
The same accounting on the other side: column space and left null space are orthogonal complements in Rm\mathbb{R}^m. The shared rr is what makes the two splits one theorem rather than two.
One reduction of AA yields all four bases. The pairing is what makes the picture close: Row⁡(A)\operatorname{Row}(A) and Null⁡(A)\operatorname{Null}(A) split the domain, Col⁡(A)\operatorname{Col}(A) and Null⁡(AT)\operatorname{Null}(A^{\mathsf{T}}) split the codomain, and the two dimensions they share is the rank — which is why row rank equals column rank.
The four fundamental subspaces·/linear-algebra/vector-spaces/fundamental-spacesLearn Math Class

Common Pitfalls

Four mistakes account for many wrong answers about the four subspaces. Three are marked with a box where they happen in the sections above, and the first, taking the pivot columns from the reduced matrix, is pointed out in the column-space section. Here each is worked through in full, with the wrong and the right working side by side.

Taking the pivot columns from the reduced matrix

A basis for the column space is read from the columns of the reduced form instead of the original matrix. Row operations change the column space, so the reduced columns usually span a different subspace, even though there are the right number of them.

Wrong working: for the running example, the reduced form is
R=(130−300110000)R = \begin{pmatrix} 1 & 3 & 0 & -3 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 0 \end{pmatrix}

with pivots in columns 11 and 33. Its pivot columns are (1,0,0)(1, 0, 0) and (0,1,0)(0, 1, 0), so Col(A)\text{Col}(A) is taken to be the plane of vectors whose third entry is 00.

Right working: the pivot positions say which columns to keep, and the vectors are taken from AA itself: (1,2,−1)(1, 2, -1) and (2,5,0)(2, 5, 0), columns 11 and 33 of AA. The other two columns are combinations of these: column 22 is 3(1,2,−1)=(3,6,−3)3(1, 2, -1) = (3, 6, -3), and column 44 is −3(1,2,−1)+(2,5,0)=(−1,−1,3)-3(1, 2, -1) + (2, 5, 0) = (-1, -1, 3).

Why it happens: for the row space the reduced form is used directly, and the same habit is carried over to the columns. The dimension comes out right either way, so the count gives no warning.

How to check: every column of AA must lie in the proposed space. Column 11 of AA is (1,2,−1)(1, 2, -1), whose third entry is −1-1, so it is not in the plane spanned by (1,0,0)(1, 0, 0) and (0,1,0)(0, 1, 0).

Keeping the signs from the reduced form

When the null-space basis is built, the coefficients of the free variables are copied from the reduced form as they stand. Each row of RR is an equation with 00 on the right, and moving the free terms to the other side changes their signs.

Wrong working: from the rows x1+3x2−3x4=0x_1 + 3x_2 - 3x_4 = 0 and x3+x4=0x_3 + x_4 = 0, write x1=3x2−3x4x_1 = 3x_2 - 3x_4 and x3=x4x_3 = x_4. Setting x2=1,x4=0x_2 = 1, x_4 = 0 and then x2=0,x4=1x_2 = 0, x_4 = 1 gives (3,1,0,0)(3, 1, 0, 0) and (−3,0,1,1)(-3, 0, 1, 1).

Right working: solving for the pivot variables gives x1=−3x2+3x4x_1 = -3x_2 + 3x_4 and x3=−x4x_3 = -x_4. The same two choices give
(−3,1,0,0)and(3,0,−1,1)(-3, 1, 0, 0) \quad \text{and} \quad (3, 0, -1, 1)


Why it happens: the row (1,3,0,−3)(1, 3, 0, -3) lists the coefficients on the left-hand side, and reading them off as the solution skips the step of moving terms across the equals sign.

How to check: multiply each basis vector by AA; every product must be the zero vector. Here A(3,1,0,0)=(6,12,−6)A(3, 1, 0, 0) = (6, 12, -6) and A(−3,0,1,1)=(−2,−2,6)A(-3, 0, 1, 1) = (-2, -2, 6), while A(−3,1,0,0)A(-3, 1, 0, 0) and A(3,0,−1,1)A(3, 0, -1, 1) are both 0\mathbf{0}.

Swapping the row and column counts

The nullity is computed as m−rm - r and the left nullity as n−rn - r. The null space lives in the domain Rn\mathbb{R}^n, whose dimension is the number of columns, and the left null space lives in Rm\mathbb{R}^m, whose dimension is the number of rows.

Wrong working: take the 2×52 \times 5 matrix
A=(1012001103)A = \begin{pmatrix} 1 & 0 & 1 & 2 & 0 \\ 0 & 1 & 1 & 0 & 3 \end{pmatrix}

of rank 22. Then dim⁡(Null A)=2−2=0\dim(\text{Null}\,A) = 2 - 2 = 0 and dim⁡(Null AT)=5−2=3\dim(\text{Null}\,A^T) = 5 - 2 = 3, which would make the map one-to-one.

Right working: dim⁡(Null A)=5−2=3\dim(\text{Null}\,A) = 5 - 2 = 3 and dim⁡(Null AT)=2−2=0\dim(\text{Null}\,A^T) = 2 - 2 = 0. The free variables are x3,x4,x5x_3, x_4, x_5, and they give the null-space basis (−1,−1,1,0,0)(-1, -1, 1, 0, 0), (−2,0,0,1,0)(-2, 0, 0, 1, 0), (0,−3,0,0,1)(0, -3, 0, 0, 1).

Why it happens: mm comes first in "m×nm \times n", and the two formulas n−rn - r and m−rm - r look alike, so they are easy to exchange.

How to check: count the entries of the vectors. A solution of Ax=0A\mathbf{x} = \mathbf{0} has one entry per column, here five, and a matrix with 22 rows has at most 22 pivots among its 55 columns, which leaves at least 33 free variables. The two sums r+(n−r)=nr + (n - r) = n and r+(m−r)=mr + (m - r) = m must also come out right.

Pairing the null space with the column space

Null(A)\text{Null}(A) is taken to be the orthogonal complement of Col(A)\text{Col}(A). The true pairs are the row space with the null space in Rn\mathbb{R}^n, and the column space with the left null space in Rm\mathbb{R}^m.

Wrong working: for A=(0100)A = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}, the equation Ax=0A\mathbf{x} = \mathbf{0} says x2=0x_2 = 0, so Null(A)\text{Null}(A) is the line through (1,0)(1, 0). The columns are (0,0)(0, 0) and (1,0)(1, 0), so Col(A)\text{Col}(A) is the same line. Calling them orthogonal complements fails at once: (1,0)⋅(1,0)=1(1, 0) \cdot (1, 0) = 1, not 00.

Right working: the rows of AA are (0,1)(0, 1) and (0,0)(0, 0), so Row(A)\text{Row}(A) is the line through (0,1)(0, 1), and (0,1)⋅(1,0)=0(0, 1) \cdot (1, 0) = 0. Its dimension and that of the null space add to 1+1=21 + 1 = 2. On the other side, ATy=(0,y1)A^T\mathbf{y} = (0, y_1), so Null(AT)\text{Null}(A^T) is the line through (0,1)(0, 1), perpendicular to Col(A)\text{Col}(A).

Why it happens: the column space and the null space are the two subspaces met first and used most, and both are named after AA itself rather than ATA^T, so they are remembered as a pair.

How to check: partners must live in the same space. For the 3×43 \times 4 running example, Null(A)\text{Null}(A) lies in R4\mathbb{R}^4 and Col(A)\text{Col}(A) in R3\mathbb{R}^3, so they cannot be complements at all. A second test is the dot product: a null-space vector dotted with any row of AA gives 00, because that is what Ax=0A\mathbf{x} = \mathbf{0} says.

Four Fundamental Subspaces FAQ

Is ker⁡A\ker A different from the null space?

+
They are the same subspace under two names. Kernel and image belong to the vocabulary of maps, null space and column space to the vocabulary of matrices, and ker⁡A=Null(A)\ker A = \text{Null}(A) exactly, as does im⁡A=Col(A)\operatorname{im} A = \text{Col}(A). Which pair you meet depends on whether the author is thinking of AA as a transformation or as an array.Read more →

Is the left null space a new kind of operation?

+
No, nothing new happens. It is the ordinary null space of the ordinary transpose, and the compound name is bookkeeping rather than machinery. In practice the transpose spelling wins, since it lets you reuse the null-space algorithm unchanged on ATA^{T}, while the left-multiplication spelling is what explains where the name came from.Read more →

What is the difference between ↦\mapsto and →\to?

+
The barred arrow acts on elements and the plain arrow on spaces, so A:Rn→RmA : \mathbb{R}^n \to \mathbb{R}^m declares the map while x↦Ax\mathbf{x} \mapsto A\mathbf{x} says what it does to each vector. Writing x→Ax\mathbf{x} \to A\mathbf{x} misuses the space-level arrow, and also collides with the arrow used for limits.Read more →