# 4.16 The rank-nullity theorem

## 4.16.1 Definition of rank and nullity

###### Definition 4.16.1.

Let $T:V\to W$ be a linear map.

• The nullity of $T$, written $\operatorname{null}T$, is $\dim\ker T$.

• The rank of $T$, written $\operatorname{rank}T$ is $\dim\operatorname{im}T$.

###### Example 4.16.1.

Returning to the differentiation example from the end of the last lecture, $D:\mathbb{R}_{\leqslant n}[x]\to\mathbb{R}_{\leqslant n}[x]$ has nullity 1 (since its kernel was one-dimensional, spanned by the constant polynomial 1) and rank $n$, since its image had a basis $1,x,\ldots,x^{n-1}$ of size $n$. Notice that $\operatorname{rank}(D)+\operatorname{null}(D)=\dim\mathbb{R}_{\leqslant n}[x]$, this isn’t a coincidence.

## 4.16.2 Statement of the rank-nullity theorem

###### Theorem 4.16.1.

Let $T:V\to W$ be a linear map. Then

 $\operatorname{rank}T+\operatorname{null}T=\dim V.$

This is called the rank-nullity theorem.

###### Proof.

We’ll assume $V$ and $W$ are finite-dimensional, not that it matters. Here is an outline of how the proof is going to work.

1. 1.

Choose a basis $\mathcal{K}=\mathbf{k}_{1},\ldots,\mathbf{k}_{m}$ of $\ker T$

2. 2.

Extend it to a basis $\mathcal{B}=\mathbf{k}_{1},\ldots,\mathbf{k}_{m},\mathbf{v}_{1},\ldots,\mathbf% {v}_{n}$ of $V$ using Lemma 4.12.2. When we’ve done this, $\dim V=m+n$ and we need only show $\dim\operatorname{im}T=n$)

3. 3.

Show that $T(\mathbf{v}_{1}),\ldots,T(\mathbf{v}_{n})$ is a basis of $\operatorname{im}T$.

The only part needing elaboration is the last part. First, I claim that $T(\mathbf{v}_{1}),\ldots,T(\mathbf{v}_{n})$ span $\operatorname{im}T$. Any element of the image is equal to $T(\mathbf{v})$ for some $\mathbf{v}\in V$. We have to show that any such $T(\mathbf{v})$ lies in the span of the $T(\mathbf{v}_{i})$s.

Since $\mathcal{B}$ is a basis of $V$ we may write $\mathbf{v}$ as $\sum_{i=1}^{m}\lambda_{i}\mathbf{k}_{i}+\sum_{i=1}^{n}\mu_{i}\mathbf{v}_{i}$ for some scalars $\lambda_{i},\mu_{i}$. Then

 $\displaystyle T(\mathbf{v})$ $\displaystyle=T\left(\sum_{i=1}^{m}\lambda_{i}\mathbf{k}_{i}+\sum_{i=1}^{n}\mu% _{i}\mathbf{v}_{i}\right)$ $\displaystyle=\sum_{i=1}^{m}\lambda_{i}T(\mathbf{k}_{i})+\sum_{i=1}^{n}\mu_{i}% T(\mathbf{v}_{i})$ linearity $\displaystyle=\sum_{i=1}^{n}\mu_{i}T(\mathbf{v}_{i})$ $\displaystyle\text{as }\mathbf{k}_{i}\in\ker T$ $\displaystyle\in\operatorname{span}(T(\mathbf{v}_{1}),\ldots,T(\mathbf{v}_{n}))$

as required.

Now I claim $T(\mathbf{v}_{1}),\ldots,T(\mathbf{v}_{n})$ is linearly independent. Suppose

 $\sum_{i=1}^{n}\mu_{i}T(\mathbf{v}_{i})=0,$

so that we need to show the $\mu_{i}$ are all 0. Using linearity,

 $T\left(\sum_{i=1}^{n}\mu_{i}\mathbf{v}_{i}\right)=0$

which means $\sum_{i=1}^{n}\mu_{i}\mathbf{v}_{i}\in\ker T$. As $\mathcal{K}$ is a basis for $\ker T$, we can write

 $\sum_{i=1}^{n}\mu_{i}\mathbf{v}_{i}=\sum_{i=1}^{m}\lambda_{i}\mathbf{k}_{i}$

for some scalars $\lambda_{i}$. But $\mathcal{B}$, being a basis, is linearly independent and so all the scalars are 0. In particular all the $\mu_{i}$ are 0, which completes the proof. ∎