Back to the on-screen lesson ·
Rank plus nullity is the number of columns, proved by counting pivot and free columns, and what that forces about wide, tall and square matrices.
Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.
By the end of this lesson you will be able to state the rank-nullity theorem with the dimension of the domain on the right-hand side and explain why the codomain does not appear, prove it by partitioning the columns into pivot and free, compute any one of rank, nullity and column count from the other two, give the dimensions of all four fundamental subspaces from a shape and a rank, and say what a wide, a tall or a square shape forces about a system before any entry is read.
You can reduce a matrix, count its pivot columns to get the rank, and count its free columns to get a basis of the null space. This lesson adds nothing to either procedure. It points out that the two counts are counts of the same set of columns, sorted into two heaps, and then spends the rest of the time on what follows.
The rank of a matrix is the dimension of its column space, equivalently the number of pivots in its reduced form. Its nullity is the dimension of its null space, equivalently the number of free columns. A matrix is wide when it has more columns than rows and tall when it has more rows than columns. A linear map is injective when only the zero vector goes to zero, and surjective when its image is the whole codomain.
Theorem. For any $m \times n$ matrix $A$, $\operatorname{rank} A + \operatorname{nullity} A = n$.
Proof. Reduce $A$. Every column of the reduced form either contains a pivot or does not. The pivot columns number $\operatorname{rank} A$, by definition. The free columns each contribute one special solution, and those special solutions are a basis of the null space — they are independent, because each has a $1$ in a position where the others have $0$, and they span it, because writing the pivot variables in terms of the free ones expresses every solution as a combination of them. So the free columns number $\operatorname{nullity} A$. There are $n$ columns and each is counted exactly once. $\square$
The content is the last sentence. Nothing is computed anywhere in the argument; a set is split into two parts and the parts are added back up.
In the language of maps, for $T : V \to W$ linear,
$$\dim \ker T + \dim \operatorname{im} T = \dim V.$$
The dimension of $W$ is absent, and its absence is the thing to remember. The theorem is an accounting of what goes in: each input direction is either crushed to zero or survives into the image, and no direction does both or neither.
What it forces. Since $\operatorname{rank} A \le \min(m, n)$:
Another way: picture
Plot rank across and nullity up. Every matrix with $n$ columns lands on the segment from $(0, n)$ to $(n, 0)$ — a straight line of gradient $-1$ — and no matrix with $n$ columns lands anywhere else. Moving one step right along it means one more pivot, and it costs exactly one step down, because the column that gained the pivot is the column that stopped being free. The extreme points are the zero matrix at $(0, n)$ and a matrix of full column rank at $(n, 0)$.
Another way: steps
The commonest misstatement of this theorem puts the number of rows on the right-hand side, and the quickest cure is an example where the two differ wildly.
Let $T : \mathbb{R}^2 \to \mathbb{R}^{100}$ send $(x, y)$ to $(x, y, 0, 0, \dots, 0)$. The kernel is $\{0\}$, so the nullity is $0$; the image is a plane, so the rank is $2$. And $0 + 2 = 2 = \dim \mathbb{R}^2$. The number $100$ appears nowhere, and it could have been a million without changing a thing.
The reason is structural. The theorem is proved by partitioning the columns of the matrix, and there is one column per dimension of the domain. The rows are not partitioned by anything; they are just where the pivots have to fit, which is why the row count bounds the rank without ever being equal to a sum of dimensions.
There is a companion statement at the other end, and it is about the transpose: $\operatorname{rank} A + \dim N(A^{\mathsf{T}}) = m$. Same theorem, applied to $A^{\mathsf{T}}$, whose column count is $m$. Together the two account for all four fundamental subspaces: $r + (n - r) = n$ at the input end, $r + (m - r) = m$ at the output end, with the single shared $r$ being the fact that row rank equals column rank.
A square matrix is invertible exactly when its nullity is zero. For $m = n$, rank $n$ makes the columns independent and spanning at once, so the map is a bijection and the inverse matrix exists. This is why every test for invertibility in this course — non-zero determinant, full rank, trivial null space, $n$ pivots, columns a basis — is the same test. For a non-square matrix these come apart immediately, and nothing called an inverse exists at all.
The rank of a product is at most the smaller of the two ranks: $\operatorname{rank}(AB) \le \min(\operatorname{rank} A, \operatorname{rank} B)$. Every column of $AB$ is $A$ applied to a column of $B$, so the column space of $AB$ sits inside the column space of $A$, giving $\operatorname{rank}(AB) \le \operatorname{rank} A$. And anything $B$ sends to zero, $AB$ sends to zero, so $N(B) \subseteq N(AB)$ and the nullity can only grow — which, by the theorem, means the rank can only fall.
The reading is worth more than the inequality: a direction that has been collapsed cannot be recovered. If $B$ makes two vectors equal, no later $A$ can tell them apart again. That single sentence explains why rank never rises under multiplication, why a projection composed with anything stays a projection-sized map, and why the rank of a long product is governed by its weakest factor.
Adding up to the number of rows. The theorem partitions the columns. For a non-square matrix the row count gives the wrong answer, and for a square one it happens to give the right answer for the wrong reason, which is worse — it works until the first non-square example and then quietly does not.
Thinking injective and surjective still come together. They do for square matrices only. A wide matrix can be onto and never one-to-one; a tall one can be one-to-one and never onto. Getting this right is most of what the theorem is for.
Treating nullity $0$ as "the null space is empty". The null space always contains the zero vector, so it is never empty. Dimension $0$ means it contains nothing else.
Expecting rank to rise under multiplication. It never does. $\operatorname{rank}(AB)$ is at most both ranks, and it can be strictly smaller than both — two non-zero matrices can multiply to zero.
Using the theorem on a non-linear map. The proof is a statement about a matrix. A map that is not linear has no matrix, no kernel that is a subspace, and no theorem here.
$A$ is $3 \times 5$. Its rank is at most $3$, so its nullity is at least $5 - 3 = 2$.
The bound comes from the rows.
So $Ax = 0$ has infinitely many solutions, whatever the fifteen entries are — five unknowns and three equations cannot pin a point down.
No arithmetic required.
Can $A$ be onto? Onto needs rank $3$, which is possible but not guaranteed; it holds exactly when the three rows are independent. Wide matrices may be onto and are never one-to-one.
The two questions are separate.
$A = \begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}$ and $B = \begin{pmatrix} 1 & 1 \\ -1 & -1 \end{pmatrix}$ both have rank $1$.
Two rank-one matrices.
$AB = \begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix}$, of rank $0$ and nullity $2$.
Strictly below both factors.
$B$ collapses everything onto the line spanned by $(1, -1)$, and $A$ sends that line to zero. Rank fell because each map crushed a direction and nothing restores one.
The inequality is not tight.
Onto means the image is all of $\mathbb{R}^4$, so the rank is $4$.
Turn the word into a number.
The theorem adds up to the dimension of the domain, which is $7$, not $4$.
Domain, every time.
So the nullity is $7 - 4 = 3$: a three-dimensional subspace of $\mathbb{R}^7$ is sent to zero, and $T$ is very far from one-to-one.
$A$ has $3$ columns and rank $3$. Put the steps of the rank-nullity count in order.
Number the steps in order (write the number in the box):
Three matrices each have $5$ columns. Fill in the missing rank or nullity for each.
| Columns | Rank | Nullity | |
|---|---|---|---|
| Matrix $A$ | 5 | 2 | |
| Matrix $B$ | 5 | 2 | |
| Matrix $C$ | 5 | 4 |
$A$ is $4 \times 7$ with rank $3$. What is the dimension of its null space?
Answer:
$T : \mathbb{R}^{4} \to \mathbb{R}^{2}$ is linear. Which equation is the rank-nullity theorem?
Match each matrix to the conclusion its shape forces, whatever its entries.
| Its null space contains a non-zero vector | It cannot be onto | It is invertible | |
|---|---|---|---|
| $A$ is $4 \times 6$, with more columns than rows | |||
| $B$ is $6 \times 4$, with more rows than columns | |||
| $C$ is $4 \times 4$ with nullity $0$ |
Three matrices each have $5$ columns, of ranks $1$, $2$ and $3$. Plot the point (rank, nullity) for each.
Plot your answer on the grid:
Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.
$A$ has $6$ columns and rank $1$. Put the steps of the rank-nullity count in order.
Number the steps in order (write the number in the box):
You can move between rank, nullity and the number of columns in either direction, and say what a matrix's shape alone guarantees. Say in your own words why the number of rows is not in the equation. Next: linear maps, of which every matrix is one written in a chosen pair of bases.
10. Your turn: $T : \mathbb{R}^7 \to \mathbb{R}^4$ is onto. What is the dimension of its kernel?, step 3
Onto and one-to-one are independent here.