Mathematics.

linear transformations

Rank and Nullity

Linear Algebra35 minDifficulty5 out of 10

You should know: linear transformation

Overview

The rank of a matrix (or linear transformation) is the dimension of its column space — the number of independent directions its output can reach. The nullity is the dimension of its null space (kernel) — the dimension of the set of inputs that get crushed to zero. These two numbers are linked by the rank-nullity theorem, one of the most useful bookkeeping identities in linear algebra: rank plus nullity always equals the number of columns (the input dimension). Rank measures how much information a transformation preserves; nullity measures how much it destroys.

Intuition

Think of a linear transformation as a machine that flattens or preserves space. If it squashes some directions completely to zero (the null space), it necessarily loses that many dimensions from what it can output (the rank), because the total number of input dimensions is fixed. A transformation from 3D to anywhere that has a 1-dimensional null space (it collapses one line to the origin) can only produce a 2-dimensional image — you can't get back dimensions the transformation destroyed. The rank-nullity theorem is just precise accounting: dimensions destroyed plus dimensions preserved must equal the dimensions you started with.

Formal Definition

Definition

For an m×n matrix A representing a linear map T: ℝⁿ → ℝᵐ:

rank(A)=dim(col(A))=dim(im(T))\operatorname{rank}(A) = \dim(\operatorname{col}(A)) = \dim(\operatorname{im}(T))
Rank
nullity(A)=dim(null(A))=dim({x:Ax=0})\operatorname{nullity}(A) = \dim(\operatorname{null}(A)) = \dim(\{x : Ax = 0\})
Nullity
rank(A)+nullity(A)=n\operatorname{rank}(A) + \operatorname{nullity}(A) = n
Rank-nullity theorem

Worked Examples

  1. Row reduce: R2 -> R2 - 2R1 gives a row of zeros, so only 1 independent row/column.

    (1224)(1200)\begin{pmatrix}1 & 2\\ 2 & 4\end{pmatrix} \to \begin{pmatrix}1 & 2\\ 0 & 0\end{pmatrix}
  2. Rank is the number of pivot columns (1). By rank-nullity with n=2 columns, nullity = 2 - 1 = 1.

    rank(A)=1,nullity(A)=21=1\operatorname{rank}(A) = 1, \quad \operatorname{nullity}(A) = 2 - 1 = 1

Answer: rank(A) = 1, nullity(A) = 1.

Practice Problems

Difficulty 4/10

A 4×5 matrix has rank 3. What is its nullity?

Difficulty 5/10

Find rank and nullity of B = [[2, 4, 0], [1, 2, 0], [0, 0, 3]].

Difficulty 6/10

A system of 4 linear equations in 6 unknowns (Ax = 0) has coefficient matrix of rank 4. How many free parameters does the general solution have, and what does this mean physically for, say, a robot arm's joint-velocity constraints?

Quiz

The rank-nullity theorem states that for an m×n matrix A:
If an n×n matrix A has nullity 0, then A is:
The nullity of a matrix measures:

Summary

  • Rank is the dimension of the column space (output); nullity is the dimension of the null space (inputs sent to zero).
  • Rank-nullity theorem: rank(A) + nullity(A) = n, the number of columns of A.
  • An n×n matrix is invertible exactly when its nullity is 0, equivalently when its rank is n.

References