datarekha

Rank, Nullity & Solution Sets

Stack a clutch of arrows as a matrix's columns and the count of independent directions has a name — rank. Its partner nullity counts the free directions, and the one identity rank + nullity = columns settles, at a glance, whether Ax = b has one solution, infinitely many, or none.

9 min read Intermediate GATE DA Lesson 22 of 122

What you'll learn

  • Rank = number of independent rows/columns = number of pivots
  • Nullity = dimension of the null space (solutions of Ax = 0) = free variables
  • The rank-nullity theorem: rank + nullity = number of columns (n)
  • Classifying Ax = b as unique, infinitely many, or none via rank

Before you start

The last lesson asked how many independent directions a clutch of arrows holds. Stack those arrows as the columns of a matrix and that same count earns a name — and it turns out to answer, at a single glance, the question we ground through elimination two lessons ago: does Ax = b have one solution, infinitely many, or none? The shortcut is to count.

Two counts: rank and nullity

The rank of a matrix is the number of genuinely independent rows it holds — equally, the number of pivots elimination eventually produces. A row that is a combination of the others is redundant and adds nothing to the count.

Its partner is the nullity — the number of free directions, the dimension of the null space (the set of x solving Ax = 0). If only x = 0 works, the nullity is 0; each independent direction you can slide along and stay at zero adds one. Put plainly, nullity is just how many free variables the system has.

The rank-nullity theorem

For any m × n matrix A — that is, n columns — the two counts always add up to the number of columns:

rank (pivots)nullity (free vars)0n = number of COLUMNSrank + nullity = n
The columns split cleanly: pivot columns make the rank, free columns make the nullity.

The reason it is exact: each of the n columns is either a pivot column (counted by rank) or a free column (counted by nullity) — there is no third kind. And that one equation classifies Ax = b. Writing r for the rank of A and assuming the system is consistent (b is actually reachable, so [A | b] has the same rank as A — no 0 = nonzero row):

  • One solution when r = n (full column rank): no free variables, so a single point.
  • Infinitely many when consistent with r < n: there are n − r free variables, a whole family.
  • No solution when inconsistent: rank[A | b] > rank A, a contradiction row.

A consequence drops straight out. A wide matrix (more columns than rows, m < n) can have rank at most m, so r ≤ m < n, forcing nullity = n − r > 0. More unknowns than equations can never pin down a single point.

A worked example, traced

Watch dependent rows collapse. In A, every row is a multiple of [1 2 3]:

A = [ 1  2  3 ]   R2 → R2 − 2R1,  R3 → R3 − 3R1   [ 1  2  3 ]
    [ 2  4  6 ]  ──────────────────────────────►  [ 0  0  0 ]
    [ 3  6  9 ]                                     [ 0  0  0 ]

One pivot survives, so rank A = 1 — the three rows held only one independent direction. Now a matrix with a genuine second direction:

B = [ 1  2  3 ]              echelon              [ 1  2  3 ]
    [ 0  1  4 ]   ──────────────────────────────► [ 0  1  4 ]
    [ 2  5  10]                                     [ 0  0  0 ]

Two pivots, so rank B = 2. With n = 3 columns the theorem hands you the nullity with no extra work:

nullity = n − rank = 3 − 2 = 1

So Bx = 0 has a one-parameter family of solutions — set the single free variable to t and every solution is a multiple of one direction. And a 2-equation, 3-unknown system has a 2 × 3 matrix, so rank ≤ 2 < 3: its nullity is at least 1, meaning it can never have a unique answer — only infinitely many (if consistent) or none.

A question to carry forward

For a square matrix, “full rank” is the line between a unique solution and trouble. It would be handy to test that with a single number, computed once, rather than reducing the whole matrix every time. Here is the thread onward: is there one number attached to a square matrix that is non-zero exactly when its rank is full — when its columns are independent and Ax = b has a unique answer?

In one breath

  • Rank = independent rows/columns = number of pivots; nullity = dimension of the null space (Ax=0) = number of free variables.
  • Rank-nullity theorem: rank + nullity = n, where n is the number of COLUMNS (every column is a pivot or a free column).
  • Classify Ax=b (consistent): r = nunique; r < ninfinitely many (n−r free vars); inconsistent (rank[A|b] > rank A) → none.
  • A wide matrix (m < n) has nullity > 0, so Ax = 0 always has non-zero solutions — more unknowns than equations never gives a unique point.
  • Nullity is almost always n − rank straight from the theorem.

Practice

Quick check

0/6
Q1Recall: in rank + nullity = n, what does n count?
Q2Trace: a 4-by-4 matrix has rank 3. What is its nullity?numerical answer — type a number
Q3Trace: find the rank of [[1, 2, 3], [2, 4, 6], [1, 1, 1]].numerical answer — type a number
Q4Apply: a consistent system Ax = b has a 5-column matrix A with rank 5. How many solutions?
Q5Apply: which statements about Ax = b are TRUE? (select all that apply)select all that apply
Q6Create: you are handed a 3-by-5 matrix and asked the maximum possible rank and the minimum possible nullity. Give both with reasoning.

Sign in to track your progress

Completed lessons, your XP, level, and streak save to your account — it's free and takes a few seconds.

Practice this in an interview

All questions

Related lessons

Explore further

Skip to content