Tutorials › Linear Algebra › Rank-Nullity in Concrete Examples

Linear Maps Between Vector Spaces · Tutorial 411 of 1000

Rank-Nullity in Concrete Examples

Use explicit kernel and image calculations to check rank-nullity for differentiation, evaluation, and coordinate-space maps.

Intermediate 9 min read

What You'll Learn

  • State rank-nullity with its finite-dimensional domain condition
  • Compute the kernel and image of differentiation on polynomial spaces
  • Apply rank-nullity to two polynomial evaluation outputs
  • Read a coordinate-space map from its matrix columns
  • Check nullity plus rank against the dimension of the domain
  • Correct the mistake of equating rank with codomain dimension

Using Rank-Nullity as a Dimension Check

For a linear map, the kernel records the inputs sent to zero, while the image records the outputs the map actually produces. Rank-nullity connects the dimensions of these two spaces to the dimension of the domain. In concrete problems, the theorem is useful both as a way to organize computations and as a consistency check: after finding the kernel and image by their definitions, their dimensions must add to the domain dimension.

All polynomial spaces and coordinate spaces in this tutorial are over \(\mathbb{R}\). For \(n\geq 0\), let \(P_n\) denote the vector space of real polynomials of degree at most \(n\). Its ordered basis \((1,t,\dots,t^n)\) has \(n+1\) elements, so \(\dim P_n=n+1\). For a linear map \(T:V\to W\), its kernel is \(\ker T=\{\mathbf{v}\in V:T(\mathbf{v})=\mathbf{0}\}\), and its image is \(\operatorname{im}T=\{T(\mathbf{v}):\mathbf{v}\in V\}\). When \(V\) is finite-dimensional, the nullity of \(T\) is \(\dim(\ker T)\), and its rank is \(\dim(\operatorname{im}T)\).

Rank-Nullity Theorem: If \(T:V\to W\) is a linear map and \(V\) is finite-dimensional, then $$ \dim V=\dim(\ker T)+\dim(\operatorname{im}T). $$ Equivalently, \(\dim V=\operatorname{nullity}T+\operatorname{rank}T\). This is the standard Rank-Nullity Theorem established in the earlier material on linear maps.

Applying the theorem requires keeping track of the domain dimension, not just the codomain. The kernel is a subspace of the domain; the image is a subspace of the codomain. A practical calculation therefore has three parts: determine a basis for the kernel, determine a basis for the image, and compare the two resulting dimensions with the dimension of the domain.

Differentiation: A General Dimension Count

Consider the derivative map \(D:P_n\to P_{n-1}\), defined by \(D(p)=p'\), for \(n\geq 1\). It is linear: for polynomials \(p,q\) and scalars \(a,b\), the differentiation rule gives \(D(ap+bq)=ap'+bq'=aD(p)+bD(q)\). The following calculation finds both dimensions directly and then checks them against rank-nullity.

Proposition: For \(n\geq 1\), differentiation \(D:P_n\to P_{n-1}\) has nullity \(1\) and rank \(n\). Hence \(\dim P_n=1+n\).

Proof. Write an arbitrary polynomial in the domain as \(p(t)=a_0+a_1t+\cdots+a_nt^n\). Its derivative is $$ D(p)(t)=a_1+2a_2t+\cdots+na_nt^{n-1}. $$ This derivative is the zero polynomial exactly when each coefficient \(ka_k\) is zero for \(1\leq k\leq n\). Since each such \(k\) is nonzero in \(\mathbb{R}\), this is equivalent to \(a_1=\cdots=a_n=0\), while \(a_0\) is unrestricted. Thus \(\ker D=\operatorname{span}\{1\}\), so the nullity is \(1\). Next, let \(q(t)=b_0+b_1t+\cdots+b_{n-1}t^{n-1}\) be any element of \(P_{n-1}\). The polynomial $$ p(t)=b_0t+\frac{b_1}{2}t^2+\cdots+\frac{b_{n-1}}{n}t^n $$ belongs to \(P_n\), and differentiating term by term gives \(D(p)=q\). Therefore \(\operatorname{im}D=P_{n-1}\), whose dimension is \(n\). The domain has dimension \(n+1\), and the computed dimensions satisfy \(n+1=1+n\). \(\square\)

Worked Example: Differentiation from P₃ to P₂

Let \(D:P_3\to P_2\) send each polynomial to its derivative. Use the standard polynomial bases \((1,t,t^2,t^3)\) in the domain and \((1,t,t^2)\) in the codomain. For \(p(t)=a_0+a_1t+a_2t^2+a_3t^3\), $$ D(p)(t)=a_1+2a_2t+3a_3t^2. $$ Thus the kernel consists of the constant polynomials, with basis \((1)\) and nullity \(1\). The image is all of \(P_2\): given \(b_0+b_1t+b_2t^2\), the input \(b_0t+\frac{b_1}{2}t^2+\frac{b_2}{3}t^3\) differentiates to it. The image basis \((1,t,t^2)\) shows that the rank is \(3\).

In these bases, the coordinate matrix has one column for each domain basis vector: the derivative of \(1\) is \(0\), the derivative of \(t\) is \(1\), the derivative of \(t^2\) is \(2t\), and the derivative of \(t^3\) is \(3t^2\). Hence $$ \begin{bmatrix}0&1&0&0\\0&0&2&0\\0&0&0&3\end{bmatrix}. $$ There are three independent image directions, corresponding to \(1,t,t^2\), and one free input direction, corresponding to the constant polynomial. The domain dimension is \(4\), so the dimension check is \(4=1+3\).

Check: \(D(a_0)=0\), and \(D(b_0t+\frac{b_1}{2}t^2+\frac{b_2}{3}t^3)=b_0+b_1t+b_2t^2\). These substitutions verify the stated kernel direction and the full image.

Evaluation: Counting Inputs That Give Zero Outputs

An evaluation map records the values of a polynomial at specified points. To apply rank-nullity, it is not enough to count the number of values recorded: one must determine which output pairs can actually occur and which polynomials produce the zero pair. The next result carries out both calculations for a particular map.

Proposition: Define \(E:P_3\to\mathbb{R}^2\) by \(E(p)=(p(0),p(1))\). Then \(\operatorname{nullity}E=2\), \(\operatorname{rank}E=2\), and \(\dim P_3=2+2\).

Worked Example: Evaluating a Cubic at Two Points

For \(p(t)=a_0+a_1t+a_2t^2+a_3t^3\), the outputs are \(p(0)=a_0\) and \(p(1)=a_0+a_1+a_2+a_3\). Therefore \(p\in\ker E\) exactly when $$ a_0=0,\qquad a_1+a_2+a_3=0. $$ Setting \(a_1=s\) and \(a_2=u\) gives \(a_3=-s-u\), so every kernel element has the form $$ p(t)=s(t-t^3)+u(t^2-t^3). $$

Proof. The displayed expression proves that \(t-t^3\) and \(t^2-t^3\) span the kernel. They are independent: if \(s(t-t^3)+u(t^2-t^3)\) is the zero polynomial, its coefficient of \(t\) is \(s\), so \(s=0\); its coefficient of \(t^2\) is \(u\), so \(u=0\). They form a basis, and the nullity is \(2\). For the image, take any \((r,s)\in\mathbb{R}^2\) and choose \(p(t)=r+(s-r)t\). Then \(p(0)=r\) and \(p(1)=r+(s-r)=s\). Thus every pair belongs to the image, so \(\operatorname{im}E=\mathbb{R}^2\) and the rank is \(2\). Since \(\dim P_3=4\), the dimensions satisfy \(4=2+2\). \(\square\)

Check: Both kernel basis polynomials give zero at \(0\) and \(1\): \(0-0^3=0\), \(1-1^3=0\), and \(1^2-1^3=0\). The proposed input for an arbitrary output pair gives \(E(r+(s-r)t)=(r,s)\), verifying the image calculation.

The explicit kernel calculation matters: the two equations on the coefficients leave two free parameters, but that observation alone is not yet a basis description. Expressing the resulting polynomials as combinations of two independent vectors establishes the nullity. Similarly, the image calculation establishes rank by producing a preimage for every target pair, rather than assuming that the codomain and image automatically have the same dimension.

Coordinate-Space Maps: Read the Outputs from Columns

For a matrix \(\mathbf{A}\in\mathbb{R}^{m\times n}\), the rule \(T(\mathbf{x})=\mathbf{A}\mathbf{x}\) defines a linear map from \(\mathbb{R}^n\) to \(\mathbb{R}^m\). If the columns of \(\mathbf{A}\) are \(\mathbf{a}_1,\dots,\mathbf{a}_n\), then \(T(x_1,\dots,x_n)^{\top}=x_1\mathbf{a}_1+\cdots+x_n\mathbf{a}_n\). Consequently, the image is the span of the columns. To determine the kernel, solve \(\mathbf{A}\mathbf{x}=\mathbf{0}\), keeping the variables as the coordinates of an input vector.

Worked Example: A Map from R³ to R²

Let \(T:\mathbb{R}^3\to\mathbb{R}^2\) be defined by the matrix $$ \mathbf{A}=\begin{bmatrix}1&2&1\\2&4&1\end{bmatrix}. $$ Its action is \(T(x,y,z)^{\top}=(x+2y+z,\;2x+4y+z)^{\top}\). Row-reduce to solve for the kernel: $$ \begin{bmatrix}1&2&1\\2&4&1\end{bmatrix} \xrightarrow{R_2\to R_2-2R_1} \begin{bmatrix}1&2&1\\0&0&-1\end{bmatrix} \xrightarrow{R_2\to -R_2} \begin{bmatrix}1&2&1\\0&0&1\end{bmatrix} \xrightarrow{R_1\to R_1-R_2} \begin{bmatrix}1&2&0\\0&0&1\end{bmatrix}. $$ The homogeneous equations are \(x+2y=0\) and \(z=0\). Taking \(y=s\) gives \((x,y,z)=s(-2,1,0)\), so the kernel has basis \(\{(-2,1,0)^{\top}\}\) and nullity \(1\).

The columns are \((1,2)^{\top}\), \((2,4)^{\top}\), and \((1,1)^{\top}\). The second is twice the first, so the image is spanned by the first and third. These two vectors are independent: if \(\alpha(1,2)^{\top}+\gamma(1,1)^{\top}=(0,0)^{\top}\), then \(\alpha+\gamma=0\) and \(2\alpha+\gamma=0\); subtracting gives \(\alpha=0\), then \(\gamma=0\). Thus the rank is \(2\). In fact, for any \((u,v)^{\top}\in\mathbb{R}^2\), $$ (v-u)\begin{bmatrix}1\\2\end{bmatrix} +(2u-v)\begin{bmatrix}1\\1\end{bmatrix} =\begin{bmatrix}u\\v\end{bmatrix}, $$ so these two columns span the whole codomain.

Check: Multiplication gives \(\mathbf{A}(-2,1,0)^{\top}=(0,0)^{\top}\). Also, \(\mathbf{A}(v-u,0,2u-v)^{\top}=(u,v)^{\top}\), verifying directly that every target pair is in the image. The domain dimension is \(3\), and the computed dimensions give \(3=1+2\).

A Common Mistake: Rank Is Not the Codomain Dimension

A map’s rank is the dimension of its image, not automatically the dimension of its codomain. For a concrete correction, define \(S:\mathbb{R}^2\to\mathbb{R}^3\) by \(S(x,y)=(x+y,2x+2y,0)\). A mistaken calculation might assign rank \(3\) because the outputs have three coordinates. But every output is \((x+y)(1,2,0)\), so \(\operatorname{im}S=\operatorname{span}\{(1,2,0)^{\top}\}\) and the rank is \(1\), not \(3\). The kernel equation is \(x+y=0\), giving the basis \(\{(1,-1)^{\top}\}\) and nullity \(1\). The corrected dimension check is \(2=1+1\), where \(2\) is the dimension of the domain.

When checking a calculation, also make sure the kernel vectors are input vectors and the image vectors are output vectors. In the matrix example, the kernel basis vector has three entries because the domain is \(\mathbb{R}^3\), while the image basis vectors have two entries because the codomain is \(\mathbb{R}^2\). Mixing those roles can produce a dimension sum that looks plausible but does not describe the map.

What the Check Can—and Cannot—Tell You

Once the kernel and image have been found correctly, rank-nullity gives a reliable arithmetic check. If their dimensions do not add to the domain dimension, then at least one calculation or dimension count needs review. But the equality alone does not identify the kernel or image: those spaces still have to be determined from the map. For example, knowing only that a map from a four-dimensional domain has nullity \(1\) and rank \(3\) does not specify which input direction lies in the kernel or which output directions occur.

For polynomial maps, coefficient comparison often gives the kernel, while constructing an input for a general proposed output can establish the image. For matrix-defined maps, solving the homogeneous system gives the kernel, and examining the column combinations gives the image. In either setting, write down the domain dimension first; then compute nullity and rank from bases, and finish by checking their sum.

Check Your Understanding

For each map, identify the domain dimension, kernel dimension, and image dimension before checking rank-nullity.

  1. For \(D:P_2\to P_1\), \(D(p)=p'\), find a basis for the kernel and the image.
  2. For \(E:P_2\to\mathbb{R}^2\), \(E(p)=(p(0),p(1))\), determine the kernel and image dimensions.
  3. For the matrix \(\begin{bmatrix}1&0&1\\0&1&1\end{bmatrix}\), find the nullity and rank of the associated map \(\mathbb{R}^3\to\mathbb{R}^2\).
  4. Give an example of a linear map whose codomain has dimension \(3\) but whose rank is \(1\), and explain why the rank is not \(3\).
  5. In a rank-nullity calculation, why must the dimension on the left-hand side be the domain dimension?

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