Rank–Nullity Theorem
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 matrix :
where is the number of columns, , and .
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: , , .
Apply the theorem:
So the null space has two free parameters; it's a 2-dimensional subspace of .
Explicit example
Consider
- Pivot columns: 1 and 3. Rank = 2. ✓
- Free-variable columns: 2 and 4. Let .
From RREF:
General null-space vector:
The null space is spanned by those 2 vectors — confirming . ✓
Why the theorem is true
Row reduce 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.
Implications
-
Solution structure. The solution set of (when consistent) is an affine subspace of dimension . It's a single point iff .
-
Injectivity. The linear map is one-to-one ⟺ ⟺ (full column rank).
-
Surjectivity. The map is onto ⟺ (full row rank).
-
Invertibility (square case). is invertible ⟺ rank = ⟺ nullity = .
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 instead of . The theorem says rank + nullity = # columns, not # rows.
- Confusing null space with the zero vector. Null space is the set of vectors that sends to zero; it always contains (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 (columns) and rank independently. A bar splits into "pivots" and "free" with lengths equal to rank and nullity. Identity is shown algebraically and as bar lengths summing.
Interactive Visualization
Parameters
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.