Rank-Nullity Theorem

Basis
Last updated: Tags: Linear Algebra

Prerequisites

The rank-nullity theorem is a conservation law for dimensions. When a linear map acts on a vector space, no dimensions disappear without a trace: they either survive in the image or get absorbed into the kernel. The theorem makes this precise and immediately explains why injectivity and surjectivity coincide for square linear maps.

Statement

Rank-nullity theorem: Let VV be a finite-dimensional vector space over a field FF, and let T:VWT: V \to W be a linear map. Then

\dim(V) = \text{rank}(T) + \text{nullity}(T). \tag{1}

In words: the dimension of the domain equals the dimension of the image plus the dimension of the kernel.

Proof

Let k=nullity(T)=dim(ker(T))k = \text{nullity}(T) = \dim(\ker(T)), and choose a basis {u1,,uk}\{u_1, \ldots, u_k\} of ker(T)\ker(T).

Step 1: Extend to a basis of VV. Since ker(T)\ker(T) is a subspace of the finite-dimensional space VV, we can extend {u1,,uk}\{u_1, \ldots, u_k\} to a full basis of VV. Call the extra vectors v1,,vrv_1, \ldots, v_r, so

B={u1,,uk,v1,,vr}\mathcal{B} = \{u_1, \ldots, u_k, v_1, \ldots, v_r\}

is a basis of VV. Then dim(V)=k+r\dim(V) = k + r.

Step 2: {T(v1),,T(vr)}\{T(v_1), \ldots, T(v_r)\} spans im(T)\text{im}(T). Take any wim(T)w \in \text{im}(T); write w=T(x)w = T(x) for some xVx \in V. Expand xx in the basis B\mathcal{B}:

x=i=1kciui+j=1rdjvj.x = \sum_{i=1}^k c_i\, u_i + \sum_{j=1}^r d_j\, v_j.

Apply TT and use linearity. Since each uiker(T)u_i \in \ker(T), we get T(ui)=0T(u_i) = \mathbf{0}:

w=T(x)=i=1kciT(ui)+j=1rdjT(vj)=j=1rdjT(vj).w = T(x) = \sum_{i=1}^k c_i\, T(u_i) + \sum_{j=1}^r d_j\, T(v_j) = \sum_{j=1}^r d_j\, T(v_j).

So ww is a linear combination of T(v1),,T(vr)T(v_1), \ldots, T(v_r), confirming they span im(T)\text{im}(T).

Step 3: {T(v1),,T(vr)}\{T(v_1), \ldots, T(v_r)\} is linearly independent. Suppose j=1rdjT(vj)=0\sum_{j=1}^r d_j\, T(v_j) = \mathbf{0}. By linearity, T ⁣(j=1rdjvj)=0T\!\left(\sum_{j=1}^r d_j\, v_j\right) = \mathbf{0}, so jdjvjker(T)\sum_{j} d_j\, v_j \in \ker(T). Therefore this vector is a linear combination of the basis of ker(T)\ker(T):

j=1rdjvj=i=1keiui\sum_{j=1}^r d_j\, v_j = \sum_{i=1}^k e_i\, u_i

for some scalars eie_i. Rearranging: jdjvjieiui=0\sum_{j} d_j\, v_j - \sum_{i} e_i\, u_i = \mathbf{0}. Since B\mathcal{B} is a basis of VV, all coefficients are zero — in particular d1==dr=0d_1 = \cdots = d_r = 0.

Step 4: Conclude. {T(v1),,T(vr)}\{T(v_1), \ldots, T(v_r)\} is a basis of im(T)\text{im}(T), so rank(T)=r\text{rank}(T) = r. Therefore:

dim(V)=k+r=nullity(T)+rank(T).\dim(V) = k + r = \text{nullity}(T) + \text{rank}(T). \qquad \square

Interpretation

Informally, VV splits into two parts: the kk-dimensional kernel (which TT crushes entirely to zero) and an rr-dimensional complement (which TT maps isomorphically onto im(T)\text{im}(T)). The total dimension is preserved: k+r=dim(V)k + r = \dim(V). No dimensions are created or destroyed — they are simply rerouted.

Consequences for square matrices

Now suppose T:FnFnT: F^n \to F^n is a linear map with matrix AMn,n(F)A \in M_{n,n}(F) (a square matrix). Applying (1):

n=rank(T)+nullity(T).n = \text{rank}(T) + \text{nullity}(T).

The domain and codomain have the same dimension nn, and the dimensions of the kernel and image must sum to exactly nn. This rigid budget creates the following equivalence:

Theorem: For T:FnFnT: F^n \to F^n (equivalently, for an n×nn \times n matrix AA), the following statements are all equivalent:

  1. TT is injective (ker(T)={0}\ker(T) = \{\mathbf{0}\}, i.e., nullity(T)=0\text{nullity}(T) = 0).
  2. TT is surjective (im(T)=Fn\text{im}(T) = F^n, i.e., rank(T)=n\text{rank}(T) = n).
  3. TT is bijective (and hence has an inverse T1T^{-1}).
  4. rank(A)=n\text{rank}(A) = n (all nn columns — equivalently, all nn rows — of AA are linearly independent).

The reason: if nullity is 00, then rank must be nn (from (1)), so TT is both injective and surjective. There is no room for the rank to be nn without the nullity being 00, and vice versa — the two quantities share a fixed budget of nn.

This is a purely dimension-counting phenomenon: in infinite dimensions, injectivity and surjectivity can fail independently. In finite dimensions, they are inseparable for square maps.

A concrete example

Let AA be a 4×64 \times 6 matrix with rank(A)=3\text{rank}(A) = 3. The domain is F6F^6, so dim=6\dim = 6. By (1):

nullity(A)=6rank(A)=63=3.\text{nullity}(A) = 6 - \text{rank}(A) = 6 - 3 = 3.

The kernel is three-dimensional: there are three linearly independent vectors in F6F^6 that AA maps to zero. The image is three-dimensional inside F4F^4AA cannot be surjective (since 3<43 < 4).

Summary

  • Rank-nullity theorem: dim(V)=rank(T)+nullity(T)\dim(V) = \text{rank}(T) + \text{nullity}(T) for any linear map T:VWT: V \to W with VV finite-dimensional.
  • Proof idea: extend a basis of ker(T)\ker(T) to a basis of VV; the extra vectors map to a basis of im(T)\text{im}(T).
  • Interpretation: the domain splits between the kernel (dimensions collapsed to zero) and a complement (dimensions mapped isomorphically to the image).
  • For square maps T:FnFnT: F^n \to F^n: injectivity, surjectivity, and bijectivity (invertibility) are all equivalent — they run out of the same nn-dimensional budget simultaneously.