Search the complete library

What do you want to learn or calculate?

Quick linksAll calculatorsMath subjectsPractice questionsFormula library
← Linear Algebra formulas

Rank-nullity theorem

Split the input dimension into visible output directions and null-space directions.

Linear Algebra · Vector spaces
$$\operatorname{rank}(A)+\operatorname{nullity}(A)=n$$

Rank-nullity theorem is one of 1 vector spaces formula in the linear algebra section of this library, and it is used at university level.

Why rank-nullity theorem works

Row reduce the matrix and every column becomes one of two kinds. A pivot column contributes a genuinely new output direction, and a free column contributes a variable you can set however you like, which builds a direction that gets sent to zero. Every column is exactly one kind, so the two counts have to add up to the number of columns.

What each symbol means

$n$ is number of columns of $A$.

Rank-nullity theorem: when it holds

$A$ represents a linear map from an $n$-dimensional domain.

When it stops applying

The statement is about a linear map, so it says nothing about a nonlinear transformation, and it needs the input space to be finite-dimensional for n to be a number at all. Within those conditions it never breaks.

Rank-nullity theorem: a worked example

A $3$-column matrix of rank $2$ has nullity $1$.

The mistake to avoid

What people do: Students plug in the number of rows for n when the matrix is not square.

Why it goes wrong: The theorem describes what happens to the inputs, and the inputs are counted by columns. Using rows gives the wrong total whenever the matrix is taller or wider than it is square.

Do this instead: Count the columns. For [[1, 2, 3], [2, 4, 6]] there are 3 columns, the rank is 1 because the second row is double the first, so the nullity is 2 even though the matrix has only 2 rows.

Rank-nullity theorem: step by step

  1. Name the unknown, and the unit the answer has to come out in.
  2. Match the symbols to your values. $n$ is number of columns of $A$.
  3. Check the conditions before substituting. $A$ represents a linear map from an $n$-dimensional domain.
  4. Substitute, keep exact values to the last line, then test the sign, size, and unit against a rough estimate — the check that catches most linear algebra slips.

Where this formula fits

Subject
Linear Algebra formulas — 17 entries in this library
Topic
Vector spaces
Level
University

Formulas are easiest to keep when they sit inside a method rather than on a list. Use the links below to see where rank-nullity theorem comes from, to check a calculation against a tool, and to practise it until you can recall it without looking.

Questions about rank-nullity theorem

Is n the number of rows or columns?

Columns, always. A useful memory hook is that each column corresponds to one input variable, and the theorem splits the input variables into pivot ones and free ones.

What does nullity 0 mean?

That the only vector sent to zero is the zero vector, so no two different inputs collide. For a square matrix that also means the determinant is nonzero and the system has one unique solution.

Can the rank be larger than the number of rows?

No. The rank cannot exceed either dimension, so it is capped by the smaller of the row and column counts. A 2 by 5 matrix can have rank at most 2, forcing a nullity of at least 3.

How do I find the rank by hand?

Row reduce until the matrix is in echelon form and count the pivots, one per nonzero row. Then read the nullity off as the number of columns without a pivot, with no extra work.

Stuck on a problem?

Work a rank-nullity theorem problem step by step

Type your own problem, or upload a photo of it. You get the method, the answer, and a check you can repeat yourself.