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(RowA)=dim(ColA)=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 nrn - r. The left null space has dimension mrm - r. These four numbers add up correctly: r+(nr)=nr + (n - r) = n in the domain, and r+(mr)=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 xAx\mathbf{x} \mapsto A\mathbf{x} does.

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 colA\operatorname{col} A, nullA\operatorname{null} A; the transformations tribe says im\operatorname{im} and ker\ker for the same two spaces.
CaseskerA=Null(A)\ker A = \text{Null}(A) and imA=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 writtencokerA\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.
xAx\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:RnRmT: \mathbb{R}^n \to \mathbb{R}^m declares domain and codomain. One sentence can legally use both — T:RnRmT: \mathbb{R}^n \to \mathbb{R}^m, xAx\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 xx2x \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 xAx\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:

Col(A)={Ax:xRn}=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 xAx\mathbf{x} \mapsto A\mathbf{x}, and it lives in Rm\mathbb{R}^m. Its dimension is r=rank(A)r = \text{rank}(A).

The column space answers the solvability question: Ax=bA\mathbf{x} = \mathbf{b} has a solution if and only if bCol(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


A=(132126501303)A = \begin{pmatrix} 1 & 3 & 2 & -1 \\ 2 & 6 & 5 & 0 \\ -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:

{(121),(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×3121243364basis 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:

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.

The Null Space

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

Null(A)={xRn: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 nrn - r, where rr is the rank. This dimension is the nullity, and the identity r+(nr)=nr + (n - r) = n is the rank-nullity theorem.

The null space measures the failure of injectivity. 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 x1x2Null(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 42=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.
R3×3120001000A3×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 is the invertible case seen from this side.

The Left Null Space

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

Null(AT)={yRm: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 mrm - r.

The left null space measures the failure of surjectivity. 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.

To find a basis, solve ATy=0A^T\mathbf{y} = \mathbf{0} by row reducing ATA^T. Alternatively, row reduce [ATIm][A^T \mid I_m] — the identity block tracks the row operations, and the bottom portion of the result reveals the left null space.

Continuing the Example


The matrix is 3×43 \times 4 with rank 22, so the left null space has dimension 32=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.

Dimension Accounting

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

Four Fundamental Subspaces Dimensions
dim(ColA)=rdim(RowA)=rdim(NullA)=nrdim(NullAT)=mr\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:

dim(Row(A))+dim(Null(A))=r+(nr)=n\dim(\text{Row}(A)) + \dim(\text{Null}(A)) = r + (n - r) = n


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

dim(Col(A))+dim(Null(AT))=r+(mr)=m\dim(\text{Col}(A)) + \dim(\text{Null}(A^T)) = r + (m - r) = m


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.

Orthogonal Complements

The four subspaces pair off into orthogonal complements.

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.

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 bAx^\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 A2×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.

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 xRn\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 bRm\mathbf{b} \in \mathbb{R}^m decomposes as b=bc+b\mathbf{b} = \mathbf{b}_c + \mathbf{b}_\ell where bcCol(A)\mathbf{b}_c \in \text{Col}(A) and bNull(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 n1n - 1 — an entire hyperplane is collapsed to zero. The left null space has dimension m1m - 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=n1\dim = n - 1hyperplane, dim=m1\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)SS^{\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=SS\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 xAx\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 nrn - 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 nrn - r comes from.
In the codomain — ℝᵐ2
3
dimension rr — the rank
Col(A)={Ax:xRn}\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 mrm - 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 [ATIm][A^{\mathsf{T}} \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+(nr)=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+(mr)=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

Four Fundamental Subspaces FAQ

Is kerA\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 kerA=Null(A)\ker A = \text{Null}(A) exactly, as does imA=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:RnRmA : \mathbb{R}^n \to \mathbb{R}^m declares the map while xAx\mathbf{x} \mapsto A\mathbf{x} says what it does to each vector. Writing xAx\mathbf{x} \to A\mathbf{x} misuses the space-level arrow, and also collides with the arrow used for limits.Read more →