Rank–Nullity Theorem

April 13, 2026

Problem

For a 3×4 matrix with rank 2, find the nullity. Explain the theorem and verify with an explicit example.

Explanation

The theorem

For any m×nm \times n matrix AA: rank(A)+nullity(A)=n\operatorname{rank}(A) + \operatorname{nullity}(A) = n

where nn is the number of columns, rank(A)=dimCol(A)\operatorname{rank}(A) = \dim \operatorname{Col}(A), and nullity(A)=dimNull(A)\operatorname{nullity}(A) = \dim \operatorname{Null}(A).

In words: every column is either a pivot column (counted in rank) or a free-variable column (counted in nullity). There's no third category.

Step-by-step: given 3×4, rank = 2

Setup: m=3m = 3, n=4n = 4, rank(A)=2\operatorname{rank}(A) = 2.

Apply the theorem: 2+nullity(A)=42 + \operatorname{nullity}(A) = 4 nullity(A)=42=2\operatorname{nullity}(A) = 4 - 2 = \boxed{2}

So the null space has two free parameters; it's a 2-dimensional subspace of R4\mathbb{R}^4.

Explicit example

Consider A=(120300110000)(already in RREF)A = \begin{pmatrix} 1 & 2 & 0 & 3 \\ 0 & 0 & 1 & -1 \\ 0 & 0 & 0 & 0 \end{pmatrix} \quad \text{(already in RREF)}

  • Pivot columns: 1 and 3. Rank = 2. ✓
  • Free-variable columns: 2 and 4. Let x2=s,x4=tx_2 = s, x_4 = t.

From RREF:

  • x1+2s+3t=0    x1=2s3tx_1 + 2s + 3t = 0 \implies x_1 = -2s - 3t
  • x3t=0    x3=tx_3 - t = 0 \implies x_3 = t

General null-space vector: x=(2s3tstt)=s(2100)+t(3011)\mathbf{x} = \begin{pmatrix} -2s - 3t \\ s \\ t \\ t \end{pmatrix} = s \begin{pmatrix} -2 \\ 1 \\ 0 \\ 0 \end{pmatrix} + t \begin{pmatrix} -3 \\ 0 \\ 1 \\ 1 \end{pmatrix}

The null space is spanned by those 2 vectors — confirming nullity(A)=2\operatorname{nullity}(A) = 2. ✓

Why the theorem is true

Row reduce AA to RREF. Every column is classified:

  • A pivot column contributes 1 to the rank.
  • A free column contributes one basis vector to the null space.

Every column is in exactly one category. Total columns = rank + nullity. \square

Implications

  1. Solution structure. The solution set of Ax=bA \mathbf{x} = \mathbf{b} (when consistent) is an affine subspace of dimension nullity(A)=nrank(A)\operatorname{nullity}(A) = n - \operatorname{rank}(A). It's a single point iff nullity(A)=0\operatorname{nullity}(A) = 0.

  2. Injectivity. The linear map xAx\mathbf{x} \mapsto A \mathbf{x} is one-to-onenullity(A)=0\operatorname{nullity}(A) = 0rank(A)=n\operatorname{rank}(A) = n (full column rank).

  3. Surjectivity. The map is onto Rm\mathbb{R}^mrank(A)=m\operatorname{rank}(A) = m (full row rank).

  4. Invertibility (square case). AA is invertible ⟺ rank = nn ⟺ nullity = 00.

Dimension counting in applications

  • Network flow: number of independent currents = number of nodes − 1 (rank-nullity in a graph's incidence matrix).
  • Least squares: pseudo-inverse exists because rank tells us how much data we can fit.
  • PCA: rank limits the dimensionality of the data's principal components.

Common mistakes

  • Using mm instead of nn. The theorem says rank + nullity = # columns, not # rows.
  • Confusing null space with the zero vector. Null space is the set of vectors that AA sends to zero; it always contains 0\mathbf{0} (trivially) but may contain more.
  • Thinking nullity can be negative. It can't; it's a dimension.

Try it in the visualization

A slider controls nn (columns) and rank independently. A bar splits into "pivots" and "free" with lengths equal to rank and nullity. Identity rank+nullity=n\operatorname{rank} + \operatorname{nullity} = n is shown algebraically and as bar lengths summing.

Interactive Visualization

Parameters

4.00
2.00
3.00
Your turn

Got your own math or physics problem?

Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.

Sign Up Free to Try It30 free visualizations every day