📚 Linear Algebra, Interactive Edition
⇩ Download ▾

2.8 Rank and Nullity

Two subspaces have been shadowing the whole chapter. One is what a matrix can reach โ€” the span of its columns, which section 2.4 called its reach and which is properly named the column space. The other is what a matrix destroys: the set of inputs sent to 0, called the null space. Both are subspaces, but not for the same reason. The column space is literally a span, so it inherits the chapter's usual argument. The null space is defined by a condition, {๐ฑ:A๐ฑ=0}, and passes the test because the condition survives adding and scaling: if A๐ฑ=0 and A๐ฒ=0 then A(๐ฑ+๐ฒ)=0, and likewise for multiples.

This section takes one matrix and measures both at once. Let

A = ( 1 2 3 0 1 1 1 1 2 )

Its columns are ๐œ1=(1,0,1), ๐œ2=(2,1,1) and ๐œ3=(3,1,2), and the third is the sum of the first two โ€” a dependency of exactly the kind the last three sections have been training you to spot. So the third column contributes nothing new, the column space is the plane spanned by ๐œ1 and ๐œ2, and that plane works out to z=xโˆ’y. Check it on the columns: 1โˆ’0=1 and 2โˆ’1=1, both matching their third coordinates.

A semi-transparent tilted plane through the origin, holding three arrows that all lie flat in it: a red one to (1, 0, 1), a blue one to (2, 1, 1), and a dashed violet one to (3, 1, 2), which is visibly the diagonal of the parallelogram the first two make. A separate amber line runs through the origin in the direction (-1, -1, 1), clearly not lying in the plane and clearly not perpendicular to it either. A green arrow slides up and down that amber line as a slider is dragged, and a black dot sits at the origin, marking the single output that every position of the green arrow is sent to. The plane is two-dimensional and the amber line one-dimensional, and those two counts add to the matrix's three columns - though the two live in different places, the plane among the outputs and the line among the inputs, so the picture shows a sum of dimensions rather than one space cut in two.Explore in 3D (opens in a new tab)
The column space of A โ€” the plane z=xโˆ’y โ€” carrying all three columns: red ๐œ1, blue ๐œ2, and the dashed violet ๐œ3, which is the diagonal of the parallelogram the other two make. The amber line through the origin is the null space, in the direction (โˆ’1,โˆ’1,1), and the green arrow slides along it as a is dragged. The black dot at the origin is where every one of those green arrows is sent.

Explore the figure

  1. Confirm the dependency by eye. The dashed violet arrow is not a new direction: it ends where you arrive by travelling along the red arrow and then along the blue one. Three columns, but only two directions' worth of reach.
  2. Look at the amber line. It passes through the origin but does not lie in the plane โ€” it leaves the sheet, which is why it is a genuinely different subspace and not a line you could have drawn inside the column space.
  3. Drag a from โˆ’2 to 2. The green input arrow grows, shrinks, and reverses, and at every setting A sends it to the black dot at the origin. An entire line of distinct inputs collapses to one output.
  4. Now check something the picture invites you to get wrong: is the amber line perpendicular to the plane? Orbit until you can judge the angle. It is not โ€” the plane's normal direction is (โˆ’1,1,1) and the amber line runs along (โˆ’1,โˆ’1,1), which is a different direction. The null space is not the perpendicular complement of the column space; what it is perpendicular to is named at the end of this section.

Counting what survives and what dies

Both measurements come from one reduction.

[101011000]
One reduction, both numbers โœ“ Computed ยท mojocas 0.1.0 โœ“ Agrees with the text One reduction, both numbers, computed exactly by mojocas 0.1.0, and confirmed to agree with the result stated in the text.

The reduced form of A. Two pivots, in columns one and two; one column without a pivot, the third. The pivot count is the rank, and it counts independent columns โ€” two, matching the plane. The pivot-free count is the number of free variables in A๐ฑ=0, which is the nullity โ€” one, matching the line. The bottom row of zeros is the third equation announcing that it followed from the other two all along.

Read the null space off the reduced matrix directly. The reduced rows say x1+x3=0 and x2+x3=0, so with x3=t free we get x1=โˆ’t and x2=โˆ’t: every solution is t(โˆ’1,โˆ’1,1). That is a line through the origin, its single basis vector is (โˆ’1,โˆ’1,1), and its dimension โ€” the nullity โ€” is 1.

Now put the two numbers side by side. The rank is 2, the nullity is 1, and A has 3 columns:

rank A + nullity A = 2 + 1 = 3

This is the rank theorem, and it is not a coincidence of this example. Every column of A either holds a pivot or does not. The columns sitting in pivot positions โ€” here ๐œ1 and ๐œ2 of the original A, not the reduced matrix's columns โ€” are a basis of the column space, so they are counted by the rank. The pivot-free positions pick out which variables are free in A๐ฑ=0 โ€” here the third, x3 โ€” and each free variable contributes one direction to the null space, so those positions are counted by the nullity. Every column is counted once by one of the two, so the two counts add to the number of columns. There is nothing deeper to it than that bookkeeping โ€” but the bookkeeping is forced, which is what makes it a theorem.

The geometric reading is a conservation law. The input space has three dimensions to spend. Whatever the matrix crushes to zero is spent on the null space, and what is left over is what survives into the output. Crush more and you reach less; reach more and you crush less. You cannot have both.

0
The determinant agrees โœ“ Computed ยท mojocas 0.1.0 โœ“ Agrees with the text The determinant agrees, computed exactly by mojocas 0.1.0, and confirmed to agree with the result stated in the text.

The determinant of A is zero โ€” the test that section 2.5 met as the vanishing factor hโˆ’1. A nonzero determinant would mean three independent columns, rank 3, nullity 0, and no collapse at all. Here the collapse is real, and the determinant is how you detect it without drawing anything.

One warning, which is the content of exploration step 4. The null space is not generally perpendicular to the column space; (โˆ’1,โˆ’1,1) and the plane's normal (โˆ’1,1,1) are plainly different directions. What the null space is perpendicular to is the row space, the span of the rows โ€” and that is easy to verify here, since (โˆ’1,โˆ’1,1) dotted with each of (1,2,3), (0,1,1) and (1,1,2) gives โˆ’1โˆ’2+3=0, 0โˆ’1+1=0 and โˆ’1โˆ’1+2=0. That is no accident either: A๐ฑ=0 says that ๐ฑ has zero dot product with every row. Chapter 6 builds on this.

An original work of XYZ Homework, built around interactive XYZ 3D figures. Its chapter sequence is aligned to Interactive Linear Algebra (Margalit & Rabinoff, Georgia Tech, GNU FDL); this work is original, copies nothing from it, and is not affiliated with or endorsed by its authors. License: CC-BY-NC-SA-4.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or ADA Title II. Every page is built against an automated accessibility gate, and the published editions will meet ADA Title II requirements when they release in late September 2026. If something is unusable, please tell us.