Tutorials › Linear Algebra › Rank-Nullity as a Proof Mechanism

Proof Strategies in Linear Algebra · Tutorial 995 of 1000

Rank-Nullity as a Proof Mechanism

Learn to use rank-nullity not just as a dimension formula, but as a tool for proving what a linear map can and cannot do.

Intermediate 10 min read

What You'll Learn

  • State and apply the Rank-Nullity Theorem for a linear map with finite-dimensional domain
  • Compute kernel and image dimensions from a matrix and its reduced row echelon form
  • Use nullity to prove whether a linear map is injective
  • Use rank to prove whether a linear map is surjective
  • Derive dimension-based impossibility claims for maps between spaces of different dimensions
  • Avoid confusing the domain dimension with the number of rows in a matrix

From a Dimension Formula to a Proof Tool

The Rank-Nullity Theorem connects two different kinds of information about a linear map. The kernel records the inputs sent to zero, while the image records the outputs the map can actually produce. Their dimensions add to the dimension of the domain. This equality can do more than fill in a missing number: it can prove that a map is injective, that it is surjective, or that a desired property is impossible.

Throughout, the spaces and maps in this tutorial are over \(\mathbb{R}\). A linear map \(T:V\to W\) has kernel \(\ker T=\{\mathbf{v}\in V:T(\mathbf{v})=\mathbf{0}\}\) and image \(\operatorname{im}T=\{T(\mathbf{v}):\mathbf{v}\in V\}\). When \(V\) is finite-dimensional, its nullity is \(\dim(\ker T)\), and its rank is \(\dim(\operatorname{im}T)\). The theorem requires the domain \(V\) to be finite-dimensional; the codomain \(W\) need not be.

Theorem (Rank-Nullity Theorem): Let \(T:V\to W\) be a linear map of real vector spaces, with \(V\) finite-dimensional. Then \(\ker T\) and \(\operatorname{im}T\) are finite-dimensional, and $$ \dim V=\operatorname{nullity}T+\operatorname{rank}T. $$

Proof. Write \(r=\dim(\ker T)\), and choose a basis \((\mathbf{k}_1,\dots,\mathbf{k}_r)\) of \(\ker T\). If the kernel is \(\{\mathbf{0}\}\), this basis is the empty list and \(r=0\). Extend the chosen basis to a basis of \(V\), say \((\mathbf{k}_1,\dots,\mathbf{k}_r,\mathbf{u}_1,\dots,\mathbf{u}_s)\). Thus \(\dim V=r+s\).

We show that \((T(\mathbf{u}_1),\dots,T(\mathbf{u}_s))\) is a basis of \(\operatorname{im}T\). First, take any \(\mathbf{y}\in\operatorname{im}T\). By the definition of image, \(\mathbf{y}=T(\mathbf{v})\) for some \(\mathbf{v}\in V\). Since the displayed list is a basis of \(V\), write \(\mathbf{v}=\sum_{i=1}^{r}a_i\mathbf{k}_i+\sum_{j=1}^{s}b_j\mathbf{u}_j\). Linearity and \(T(\mathbf{k}_i)=\mathbf{0}\) give \(\mathbf{y}=\sum_{j=1}^{s}b_jT(\mathbf{u}_j)\). So the proposed list spans the image.

For independence, suppose \(\sum_{j=1}^{s}c_jT(\mathbf{u}_j)=\mathbf{0}\). By linearity, \(T(\sum_{j=1}^{s}c_j\mathbf{u}_j)=\mathbf{0}\), so \(\sum_{j=1}^{s}c_j\mathbf{u}_j\in\ker T\). It is therefore a linear combination of \(\mathbf{k}_1,\dots,\mathbf{k}_r\). Moving that combination to the left gives a linear relation among the basis vectors \(\mathbf{k}_1,\dots,\mathbf{k}_r,\mathbf{u}_1,\dots,\mathbf{u}_s\). Independence of this basis forces every \(c_j=0\). Thus the proposed list is a basis of the image, including the case \(s=0\), when the image is \(\{\mathbf{0}\}\). Hence \(\operatorname{rank}T=s\), \(\operatorname{nullity}T=r\), and \(\dim V=r+s=\operatorname{nullity}T+\operatorname{rank}T\). \(\square\)

Reading Kernel and Image Dimensions from a Matrix

For a linear map \(T:\mathbb{R}^n\to\mathbb{R}^m\) given by \(T(\mathbf{x})=\mathbf{A}\mathbf{x}\), the domain has dimension \(n\): it is the number of columns of \(\mathbf{A}\). The kernel is the solution set of \(\mathbf{A}\mathbf{x}=\mathbf{0}\). Row reduction identifies pivot and free variables, so it gives the number of free variables and hence the nullity. The rank is the dimension of the image, or column space. The Rank-Nullity Theorem then checks that these dimensions sum to \(n\).

Worked Example: Finding Both Dimensions

For the map \(T:\mathbb{R}^4\to\mathbb{R}^3\) given by the matrix below, find the rank and nullity, and describe its kernel.

$$ \mathbf{A}= \begin{bmatrix} 1&2&0&1\\ 0&1&1&1\\ 1&3&1&2 \end{bmatrix}. $$

Subtract row 1 from row 3, subtract row 2 from the new row 3, and then subtract twice row 2 from row 1:

$$ \begin{bmatrix} 1&2&0&1\\ 0&1&1&1\\ 1&3&1&2 \end{bmatrix} \xrightarrow{R_3\to R_3-R_1} \begin{bmatrix} 1&2&0&1\\ 0&1&1&1\\ 0&1&1&1 \end{bmatrix} \xrightarrow{R_3\to R_3-R_2} \begin{bmatrix} 1&2&0&1\\ 0&1&1&1\\ 0&0&0&0 \end{bmatrix} \xrightarrow{R_1\to R_1-2R_2} \begin{bmatrix} 1&0&-2&-1\\ 0&1&1&1\\ 0&0&0&0 \end{bmatrix}. $$

There are two pivots, so the rank is \(2\). There are four variables and two free variables, so the nullity is \(2\); rank-nullity confirms \(4=2+2\). The reduced system gives \(x_1=2x_3+x_4\) and \(x_2=-x_3-x_4\). Setting \((x_3,x_4)=(1,0)\) and \((0,1)\) gives the kernel vectors \((2,-1,1,0)^{\top}\) and \((1,-1,0,1)^{\top}\).

Check: Multiplying each vector by the original matrix gives \(\mathbf{A}(2,-1,1,0)^{\top}=(2-2,\,-1+1,\,2-3+1)^{\top}=\mathbf{0}\) and \(\mathbf{A}(1,-1,0,1)^{\top}=(1-2+1,\,-1+1,\,1-3+2)^{\top}=\mathbf{0}\). The two pivot columns of the original matrix are \((1,0,1)^{\top}\) and \((2,1,3)^{\top}\); they are independent, since \(a(1,0,1)^{\top}+b(2,1,3)^{\top}=\mathbf{0}\) forces \(b=0\) from the second coordinate and then \(a=0\). They therefore confirm that the image has dimension \(2\).

Using Nullity to Prove Injectivity

A map is injective if distinct inputs always have distinct outputs. For a linear map, injectivity is equivalent to having only the zero vector in the kernel. Indeed, if \(T\) is injective and \(T(\mathbf{v})=\mathbf{0}=T(\mathbf{0})\), then \(\mathbf{v}=\mathbf{0}\). Conversely, if the kernel is \(\{\mathbf{0}\}\) and \(T(\mathbf{u})=T(\mathbf{v})\), linearity gives \(T(\mathbf{u}-\mathbf{v})=\mathbf{0}\), so \(\mathbf{u}-\mathbf{v}=\mathbf{0}\) and \(\mathbf{u}=\mathbf{v}\). Thus a finite-dimensional domain map is injective exactly when its nullity is zero.

Worked Example: A Map That Is Neither Injective Nor Surjective

Consider \(T:\mathbb{R}^3\to\mathbb{R}^3\) with \(T(x,y,z)=(x,y,0)\). Its matrix is \(\mathbf{A}=\begin{bmatrix}1&0&0\\0&1&0\\0&0&0\end{bmatrix}\), which already has two pivots. Therefore \(\operatorname{rank}T=2\), and rank-nullity gives \(\operatorname{nullity}T=3-2=1\).

Directly, \(\mathbf{A}(x,y,z)^{\top}=(0,0,0)^{\top}\) holds exactly when \(x=y=0\), so \(\ker T=\{(0,0,z)^{\top}:z\in\mathbb{R}\}\), which has dimension \(1\). The nonzero vector \((0,0,1)^{\top}\) is sent to zero, so \(T\) is not injective. Its image consists of vectors \((x,y,0)^{\top}\), so \((0,0,1)^{\top}\) is not in the image and \(T\) is not surjective. The computed rank and nullity agree with both direct descriptions.

Using Rank to Prove Surjectivity and Impossibility

A map \(T:V\to W\) is surjective if every element of \(W\) is an output. This means precisely that \(\operatorname{im}T=W\), so for finite-dimensional \(W\), surjectivity is equivalent to \(\operatorname{rank}T=\dim W\). Rank-nullity also gives \(\operatorname{rank}T\leq\dim V\), because nullity is nonnegative. Since the image is a subspace of \(W\), \(\operatorname{rank}T\leq\dim W\) as well.

Worked Example: An Injective Map That Cannot Be Onto

Let \(T:\mathbb{R}^2\to\mathbb{R}^3\) be defined by \(T(s,t)=(s+t,2s-t,3s)\). Its matrix is \(\mathbf{A}=\begin{bmatrix}1&1\\2&-1\\3&0\end{bmatrix}\). Row reduction gives

$$ \begin{bmatrix} 1&1\\ 2&-1\\ 3&0 \end{bmatrix} \xrightarrow{\substack{R_2\to R_2-2R_1\\R_3\to R_3-3R_1}} \begin{bmatrix} 1&1\\ 0&-3\\ 0&-3 \end{bmatrix} \xrightarrow{R_3\to R_3-R_2} \begin{bmatrix} 1&1\\ 0&-3\\ 0&0 \end{bmatrix}. $$

There are two pivots, so the rank is \(2\). Since the domain has dimension \(2\), nullity is \(2-2=0\); therefore \(T\) is injective. But the codomain has dimension \(3\), and the image has dimension \(2\), so the image cannot be all of \(\mathbb{R}^3\). For a direct check, trying to produce \((0,0,1)^{\top}\) requires \(s+t=0\), \(2s-t=0\), and \(3s=1\). The first two equations give \(t=-s\) and \(3s=0\), hence \(s=t=0\), contradicting \(3s=1\). Thus this vector is not in the image.

Check: The two columns \((1,2,3)^{\top}\) and \((1,-1,0)^{\top}\) are independent: if their linear combination with coefficients \(s,t\) is zero, the first two coordinates give \(s+t=0\) and \(2s-t=0\), which force \(s=t=0\). This verifies the rank \(2\), while the equations above verify that the stated target vector is not attained.

Corollary: If \(V\) and \(W\) are finite-dimensional real vector spaces with \(\dim V=\dim W\), then a linear map \(T:V\to W\) is injective if and only if it is surjective.

Proof. Let the common dimension be \(n\). If \(T\) is injective, its kernel is \(\{\mathbf{0}\}\), so its nullity is \(0\). Rank-nullity gives \(\operatorname{rank}T=n=\dim W\), and therefore \(\operatorname{im}T=W\); the map is surjective. Conversely, if \(T\) is surjective, then \(\operatorname{rank}T=\dim W=n\). Rank-nullity gives \(\operatorname{nullity}T=n-n=0\), so the kernel is \(\{\mathbf{0}\}\) and \(T\) is injective. \(\square\)

The same inequalities yield useful impossibility conclusions. If \(\dim V<\dim W\), then \(\operatorname{rank}T\leq\dim V<\dim W\), so no linear map \(T:V\to W\) can be surjective. If \(\dim V>\dim W\), then rank-nullity and \(\operatorname{rank}T\leq\dim W\) give \(\operatorname{nullity}T=\dim V-\operatorname{rank}T\geq\dim V-\dim W>0\). Thus no such map can be injective. These conclusions do not assert that every map in the other dimension direction has the desired property; they rule out a property when the dimensions make it impossible.

Common Pitfall: Using the Wrong Dimension

For a matrix \(\mathbf{A}\in\mathbb{R}^{m\times n}\), the domain of \(\mathbf{x}\mapsto\mathbf{A}\mathbf{x}\) is \(\mathbb{R}^n\), not \(\mathbb{R}^m\). A common incorrect calculation is to subtract the rank from the number of rows and call the result the nullity. For example, consider \(\mathbf{A}=\begin{bmatrix}1&0&1\\0&1&1\end{bmatrix}\). It has two pivots. The wrong calculation \(2-2=0\) uses the row count and would incorrectly predict an injective map.

The correction is to use the number of columns: this matrix represents \(T:\mathbb{R}^3\to\mathbb{R}^2\), so rank-nullity gives \(\operatorname{nullity}T=3-2=1\). Indeed, \(\mathbf{A}(-1,-1,1)^{\top}=(-1+1,-1+1)^{\top}=\mathbf{0}\), so the kernel is nontrivial and the map is not injective. The number of rows describes the codomain; the number of columns gives the domain dimension used in the theorem.

For a final proof check, identify the domain dimension first, determine or bound the rank, and then use the theorem to calculate or bound the nullity. To prove injectivity, show the nullity is zero; to disprove it, show the nullity is positive. To prove surjectivity, show the rank equals the codomain dimension; to disprove it, show the rank is too small. Each conclusion should match the definition of the property being tested.

Check Your Understanding

For each question, identify which dimension or property the Rank-Nullity Theorem supplies.

  1. A linear map \(T:\mathbb{R}^5\to\mathbb{R}^3\) has rank \(3\). What is its nullity, and is it injective?
  2. Can a linear map from \(\mathbb{R}^2\) onto \(\mathbb{R}^4\) exist? Justify your answer using rank-nullity.
  3. A linear map \(T:\mathbb{R}^4\to\mathbb{R}^2\) is surjective. What is its nullity, and can it be injective?
  4. Explain why equal dimensions make injectivity and surjectivity equivalent for a linear map between finite-dimensional spaces.
  5. For a matrix with \(3\) rows, \(5\) columns, and rank \(2\), find the nullity and state which dimension you subtracted the rank from.

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon