Linear Algebra
Advanced

Rank-Nullity Theorem

Relates rank and null space dimension to columns.

Formula

rank(A)+nullity(A)=n\text{rank}(A) + \text{nullity}(A) = n

Live Calculator

Members

Variables

nNumber of columns

Example

Fundamental theorem of linear maps

How it works

For a matrix A with n columns, every column either contributes an independent direction to the column space or it is redundant because it depends on the others. The rank counts how many independent directions remain, while the nullity counts how many independent ways the columns can combine to give the zero vector; together they must account for all n input directions. This works because the domain of the linear map x \mapsto Ax splits into directions that are killed by A and directions that survive as independent outputs.

When to use it

Use this when you know either the rank or the dimension of the solution space to Ax = 0 and need the other one. It is especially useful in proving how many free variables a linear system has, checking matrix dimensions, and analyzing linear transformations between finite-dimensional vector spaces.

Worked example, step by step

Let A be a 3 x 5 matrix with A = [ [1, 0, 2, 1, 3], [0, 1, 1, 2, 1], [1, 1, 3, 3, 4] ]. Step 1: Notice that the third row is the sum of the first two rows, so the rows are not all independent. Step 2: The first two rows are independent, and the three columns formed by columns 1, 2, and 4 are enough to generate the others, so rank(A) = 2. Step 3: The matrix has n = 5 columns, so apply rank-nullity: rank(A) + nullity(A) = n 2 + nullity(A) = 5 Step 4: Solve for nullity(A): nullity(A) = 5 - 2 = 3 Final answer: the null space of A has dimension 3, so there are 3 free variables in Ax = 0.

Common mistakes to avoid

  • using the number of rows instead of the number of columns in the formula
  • confusing rank with nullity, especially when interpreting free variables
  • applying the theorem to an infinite-dimensional space without checking the finite-dimensional assumption

Did You Know?

The rank-nullity theorem is a conservation law: dimensions lost by a transformation reappear exactly in its null space.

Share this formula

Reviewed & maintained by the FormulaWon editorial teamLast reviewed September 2026