01 / 20

Rank & Nullity

Discover how the dimension of the column space and the dimension of the null space of a matrix are linked by a single elegant theorem.

Linear Algebra

What Is the Rank of a Matrix?

The rank of a matrix \(A\) is the number of linearly independent columns (or equivalently, rows). It tells you the dimension of the column space \(\text{Col}(A)\).

Full rank
\(\text{rank}(A) = \min(m,n)\): every column (or row) is independent.
Rank-deficient
\(\text{rank}(A) < \min(m,n)\): some columns are redundant.

What Is the Nullity of a Matrix?

The nullity of a matrix \(A\) is the dimension of its null space \(\text{Nul}(A)\): the set of all vectors \(\mathbf{x}\) such that \(A\mathbf{x} = \mathbf{0}\).

Nullity = 0
Only \(\mathbf{x} = \mathbf{0}\) solves \(A\mathbf{x} = \mathbf{0}\): the columns are independent.
Nullity > 0
Infinitely many solutions exist: some directions are "lost" in the mapping.

Visualizing Rank and Nullity

Domain \(\mathbb{R}^n\)
Codomain \(\mathbb{R}^m\)
\(\text{Nul}(A)\)
\(\text{Col}(A)\)
\(A\)
\(\mathbf{0}\)
pivot cols
(rank)
free vars (nullity)

The Rank-Nullity Theorem

For any \(m \times n\) matrix \(A\):

Here \(n\) is the number of columns of \(A\). Every column is either a pivot column (contributing to rank) or leads to a free variable (contributing to nullity).

rank(A) = pivot columns nullity(A) = free vars total = n columns

Finding Rank via Row Reduction

To find the rank, row-reduce \(A\) to row echelon form (REF). The number of non-zero rows (equivalently, pivot positions) equals the rank.

\(A =\) 1 2 3 2 4 7 3 6 10 → REF 1 2 3 0 0 1 0 0 0 ← pivot row 1 ← pivot row 2 ← zero row Pivots: 2 \(\text{rank}(A) =\) 2 Free variables: 1 \(\text{nullity}(A) =\) 1 Check: \(2 + 1 = 3 = n\) ✓

Rank vs Nullity: Key Distinction

Rank Nullity
Measures Dimension of Col(A) Dimension of Nul(A)
Counts Pivot columns Free variables
Meaning Independent outputs Directions mapped to \(\mathbf{0}\)
If maximal If \(\text{rank}(A)=n\), any solution to \(A\mathbf{x}=\mathbf{b}\) is unique. Every column is free (\(\text{rank}(A) = 0\))
If zero \(A = \mathbf{0}\) (zero matrix) Columns are independent

How to Find Rank and Nullity

1
Write the matrix \(A\) and note \(n\), the number of columns.
2
Row-reduce to REF (or RREF). Use elementary row operations: swap, scale, add multiples.
3
Count pivot positions. That count is \(\text{rank}(A)\).
4
Compute nullity: \(\text{nullity}(A) = n - \text{rank}(A)\).
5
Verify: check that \(\text{rank} + \text{nullity} = n\).

Example 1: A 2 × 3 Matrix

Find the rank and nullity of \(A = \begin{bmatrix} 1 & 3 & 5 \\ 2 & 6 & 10 \end{bmatrix}\).

Step: Row-reduce 1 3 5 2 6 10 → \(R_2-2R_1\) 1 3 5 0 0 0 1 pivot \(\text{rank}(A) = 1\) \(\text{nullity}(A) = 3 - 1 = 2\) Verify: \(1 + 2 = 3 = n\) ✓

Example 2: A 3 × 4 Matrix

Find the rank and nullity of \(B = \begin{bmatrix} 1 & 0 & 2 & 1 \\ 0 & 1 & -1 & 3 \\ 2 & 1 & 3 & 5 \end{bmatrix}\).

Row-reduce: 1 0 2 1 0 1 −1 3 2 1 3 5 → 1 0 2 1 0 1 −1 3 0 0 0 0 ← pivot ← pivot ← zero \(\text{rank}(B) = 2\) \(\text{nullity}(B) = 4 - 2 = 2\) Verify: \(2 + 2 = 4 = n\) ✓ \(R_3 = 2R_1 + R_2\), so it's dependent

Example 3: Full-Rank Square Matrix

Find the rank and nullity of \(C = \begin{bmatrix} 1 & 2 \\ 3 & 7 \end{bmatrix}\).

1 2 3 7 → \(R_2-3R_1\) 1 2 0 1 ← pivot ← pivot \(\text{rank}(C) = 2\) (full rank!) \(\text{nullity}(C) = 2 - 2 = 0\) \(2 + 0 = 2 = n\) ✓ C is invertible (\(\text{nullity} = 0\))

What Rank & Nullity Tell Us About Solutions

Consider the system \(A\mathbf{x} = \mathbf{b}\) where \(A\) is \(m \times n\):

Nullity = 0
At most one solution for each \(\mathbf{b}\). If a solution exists, it is unique.
Nullity > 0
If a solution exists, there are infinitely many (a whole affine subspace of dimension = nullity).

Rank, Nullity, and Invertibility

For an \(n \times n\) square matrix \(A\), these are all equivalent:

1
\(A\) is invertible (\(A^{-1}\) exists).
2
\(\text{rank}(A) = n\) (full rank).
3
\(\text{nullity}(A) = 0\) (trivial null space).
4
\(\det(A) \neq 0\).
5
\(A\mathbf{x} = \mathbf{b}\) has a unique solution for every \(\mathbf{b}\).

Rank of \(A\) equals Rank of \(A^T\)

A remarkable fact: the row rank and column rank of any matrix are always equal. This means:

The number of linearly independent rows always equals the number of linearly independent columns. However, nullity can differ:

\(A\) is \(m \times n\)
\(\text{nullity}(A) = n - \text{rank}(A)\)
\(A^T\) is \(n \times m\)
\(\text{nullity}(A^T) = m - \text{rank}(A)\)

Common Mistakes

✕ Using rows instead of columns
Rank-nullity uses \(n\) = number of columns, not rows. Writing \(\text{rank} + \text{nullity} = m\) is wrong.
✕ Counting zero rows as pivots
Only non-zero rows in REF have pivots. A row of all zeros does not contribute to rank.
✕ Forgetting to fully reduce
Stopping too early can hide dependencies. Always reduce until you clearly see all pivot positions.

Summary of Key Facts

Fact Formula / Rule
Rank-Nullity Theorem \(\text{rank}(A) + \text{nullity}(A) = n\)
Rank Number of pivots in REF
Nullity Number of free variables = \(n - \text{rank}\)
Invertible \(n \times n\) \(\text{rank}(A) = n\), \(\text{nullity}(A) = 0\)
Row rank = Column rank \(\text{rank}(A) = \text{rank}(A^T)\)
Unique solution \(\text{nullity}(A) = 0\)
Infinite solutions \(\text{nullity}(A) > 0\) (and consistent)

Question 1 of 5

If \(A\) is a \(3 \times 5\) matrix with \(\text{rank}(A) = 3\), what is \(\text{nullity}(A)\)?

Question 2 of 5

A \(4 \times 4\) matrix \(B\) has \(\text{nullity}(B) = 0\). Which statement is true?

Question 3 of 5

After row-reducing a \(5 \times 6\) matrix, you find 3 pivot positions. How many free variables are there?

Question 4 of 5

If \(A\) is a \(2 \times 4\) matrix, what is the maximum possible rank of \(A\)?

Question 5 of 5

The Rank-Nullity Theorem states that \(\text{rank}(A) + \text{nullity}(A)\) equals which quantity?