Rank & Nullity (Matrices)
Rank counts the independent directions a matrix produces (its pivots), while nullity counts the directions it collapses. The Rank–Nullity Theorem ties them together: for an matrix, .
Before you start — give these a try
Attempting first primes your brain for the lesson — even if you miss. Nothing is graded or saved; it's just a warm-up.
Find the rank of
Find the nullity of
What you’ll be able to do
- Define the rank and nullity of a matrix in terms of its reduced row echelon form (RREF).
- Compute the rank and nullity of a small matrix by row reduction, counting pivot and free columns.
- State and apply the Rank–Nullity Theorem to recover a missing quantity.
- Explain why .
- Decide which rank/nullity combinations are possible for a matrix of a given size.
In your course
· MATH2015 · Linear Algebra & Probability- Definition 4.7Rank (max independent columns) and nullity
- Theorem 4.5Image, kernel, rank and nullity of a matrix mapFor with columns : , , , .
- Remark 4.4Rank–nullity in matrix formIf is , then .
- Theorem 4.6 / Corollary 4.1Row rank = column rank, so
Rank, intuitively: how many independent directions survive
Think of an matrix as a machine that takes an input vector and produces an output . Here is the number of rows and is the number of columns.
The output is always a combination of the columns of : where is the -th column and is the -th entry of .
- The set of all outputs is the column space .
- The rank of is the dimension of that column space: the number of genuinely independent directions the matrix can reach.
If some columns are redundant (a column is a combination of the others), they add no new direction, so the rank is smaller than . Rank measures how much "spread" the matrix has in its output.
RREF, pivots, and free columns
To measure rank concretely we use row reduction. Every matrix can be brought by elementary row operations to a unique reduced row echelon form (RREF), which looks like a staircase of leading s.
- A pivot is a leading in a nonzero row of the RREF; the column it sits in is a pivot column.
- A free column is a column of the RREF with no pivot in it.
Two facts make this useful:
- Row operations do not change the row space, so the number of nonzero rows in RREF equals .
- Row operations preserve the dependence relations among columns, so a column of is independent of the earlier ones exactly when it becomes a pivot column.
Consequently the number of pivots is the fundamental count: it equals both the number of independent rows and the number of independent columns.
Formal definitions: four counts that agree
Let be an matrix and let be its RREF.
Rank.
Null space. The null space is . When you solve , each free column corresponds to a free variable you can choose arbitrarily.
Nullity.
So rank counts the pivot columns and nullity counts the free columns. Since every one of the columns is either a pivot column or a free column (never both, never neither), the two counts must add up to .
The Rank–Nullity Theorem and how to use it
Because each of the columns is either a pivot column or a free column, we get the central identity:
Reading it two ways.
- Know the matrix size and the rank? Then with no extra work.
- Know the nullity instead? Then .
Useful bounds. Rank cannot exceed the number of rows or columns, so A square matrix is invertible exactly when , i.e. when (the only solution of is ).
Warning. The on the right-hand side is the number of columns, not rows. A common mistake is to add rank and nullity to the number of rows.
For any matrix , , where is the number of columns of .
For any matrix , . This common value is and equals the number of pivots in the RREF of .
Worked examples
Find the rank and nullity of the matrix
- 1
First note the size: has rows and columns. By Rank–Nullity we will have , so once we find the rank the nullity is automatic.
- 2
Use the first row as a pivot row and clear column 1 below it. Replace with : . Replace with : . The matrix becomes
- 3
Column 2 has no available pivot (all remaining entries below the first row are there), so move to column 3. Scale by to get a leading : . Then eliminate the in with — but more directly using the un-scaled row gives . After clearing, .
- 4
Finally clear column 3 above the pivot: . The RREF is
- 5
Count pivots: there is a leading in column 1 and in column 3 — that is pivots. Hence . The pivot columns are ; the free columns are , which is columns, so .
- 6
Check with the theorem: . ✓
Find the rank and nullity of
Find the rank and nullity of