Two numbers that name a map
Back in Linear Maps we built the two subspaces that come free with any linear :
- the kernel — everything that gets crushed to zero,
- the image — everything you can actually hit.
Give each of them a number. The rank is the dimension of the image:
The nullity is the dimension of the kernel:
If you've run Gaussian elimination on the matrix of , you already know these numbers in disguise. After you row-reduce, the pivot columns count the rank — each pivot is one independent direction the map can produce. The free variables count the nullity — each free variable is one independent direction you can wander in the kernel without leaving zero. Rank is "how much survives." Nullity is "how much dies."
The theorem
Here it is, clean and load-bearing.
Rank–Nullity Theorem. Let be linear with . Then
Read it as a conservation law. The domain hands the map dimensions of freedom. The map sorts each one into exactly one of two bins: crushed (it's in the kernel) or survives (it shows up in the image). No dimension gets duplicated into both bins, and none vanishes into some third place that isn't accounted for. The total is conserved. That's the whole emotional content — now let's earn it.
The proof: extend a kernel basis
This is the cleanest proof in the stratum, so pay the hell attention, you magnificent idiot.
Start inside the kernel. It's a subspace of , so it has a basis. Say and pick a basis
for . These are independent vectors living in . Now extend them to a basis of all of — a basis-extension theorem from Basis & Dimension guarantees you can throw in extra vectors
that together span and stay independent. Since this is a basis of and , we have .
Claim: the images form a basis of . If that's true, then , and
So everything rides on the claim. Two parts.
They span the image. Take any output . Write in the full basis: . Apply . The are in the kernel, so and they all drop out:
Every image vector is a combination of the . They span.
They're independent. Suppose . By linearity , so . But the kernel is spanned by the , so for some scalars. Rearranged, — a dependence among the full basis of . A basis is independent, so every coefficient is zero; in particular every . Independent.
Both parts hold, the claim is true, the theorem is proved. Every dimension of either fell into the kernel (the ) or got carried alive into the image (the ). Nothing else can happen — that's the whole damn thing.
The trophy wall: the Invertible Matrix Theorem
Now aim it at a square matrix , an matrix viewed as a map . Watch a pile of conditions you've met across the whole matrices stratum collapse into one — it's fucking gorgeous.
If then , so is injective (kernel-is-zero ⟺ injective, proved in Linear Maps). By rank–nullity, , so the image is all of — is surjective too. For a square matrix, injective and surjective arrive together or not at all. That handcuff is rank–nullity doing the work.
Bolt on the facts from Determinants and Matrix Inverses and you get the trophy. For an matrix , the following are all the same statement wearing different clothes:
Add: injective ⟺ surjective ⟺ has a unique solution for every . One object, eight masks. The Federation of Boring Textbook Authors makes you memorize this as a list and charges you forty dollars for the privilege. I want you to see it as one fact: a square map that loses no dimensions loses nothing at all.
Reading at a glance
Rank also lets you predict the entire solution set of without grinding it out. Let be with rank .
- Free variables: there are of them (that's the nullity). If , no free variables — at most one solution. If and a solution exists, the solution set is a shifted copy of the -dimensional kernel: infinitely many.
- Consistency: has a solution exactly when . If the image is all of , so it's solvable for every .
Rank is the single number that controls "how many solutions" before you compute even one of them. My lab runs on this insight. You should too.
TLDR before the gauntlet
Rank counts what survives, nullity counts what dies, and the two always sum to the dimension of the domain because a linear map can only crush or carry — it can't invent shit. Go do the damn exercises.