2.2  Kernel and Image

For any function, Chapter 0 asked two questions: is it injective, and is it surjective? For a function between sets, answering them means comparing outputs pair by pair and hunting for preimages point by point. For a linear map both questions reduce to a single subspace each. This section defines the two subspaces, the kernel and the image, shows how to compute them, and proves the test that makes injectivity cheap: a linear map is injective exactly when its kernel is zero.

2.2.1. Two questions, two subspaces

Let T:V→W be linear. Start with injectivity. Suppose two inputs collide, T(u)=T(v). By Theorem 2.1.2 this is the same as T(u−v)=T(u)−T(v)=0. So a collision between u and v is the same thing as their difference being sent to 0. To detect every collision at once, it is enough to know which vectors are sent to 0. For a general function this trick is unavailable, because there is no subtraction; linearity turns a question about all pairs into a question about one set.

Surjectivity asks whether every w∈W is an output, so the set to know is the set of all outputs. For the matrix map TA(x)=Ax both sets are concrete: the outputs are the vectors b for which Ax=b can be solved, and the inputs sent to 0 are the solutions of Ax=0. Chapter 3 computes both. The definitions below give the two sets a name for every linear map. They are defined for what they measure.

The kernel is everything T sends to zero; the image is everything T reaches.

Definition 2.2.1 (Kernel)

Let T:V→W be a linear map over F. The kernel of T is the subset of the domain kerT:={v∈V:T(v)=0W}⊆V.

Definition 2.2.2 (Image)

Let T:V→W be a linear map over F. The image of T is the subset of the codomain imT:={T(v):v∈V}={w∈W:w=T(v) for some v∈V}⊆W.

In words: a vector v is in kerT when v lives in V and T sends it to the zero vector of W. A vector w is in imT when w lives in W and there exists at least one input with output w; the input need not be unique. In the language of Definition 0.4.2, kerT=T−1({0}) is the preimage of the zero vector, and imT=T(V) is the image of the function T. The kernel is also called the null space of T, and the image its range. For group homomorphisms, the kernel was defined the same way (Definition 0.10.3), with 0 playing the role of the identity element.

There is nothing to check for well-definedness: both sets are described by conditions that either hold or fail. What does need checking is that they are subspaces, not just subsets.

Theorem 2.2.1 (The Kernel Is a Subspace)

Let T:V→W be linear. Then kerT is a subspace of V.

Proof. We use the Subspace Test (Theorem 1.2.1).

  1. By Theorem 2.1.1, T(0V)=0W, so 0V∈kerT.

  2. Let u,v∈kerT, so T(u)=T(v)=0W. By (LT1), T(u+v)=T(u)+T(v)=0W+0W=0W. Therefore u+v∈kerT.

  3. Let v∈kerT and c∈F. By (LT2), T(cv)=cT(v)=c0W=0W, using Theorem 1.1.6. Therefore cv∈kerT.

Theorem 2.2.2 (The Image Is a Subspace)

Let T:V→W be linear. Then:

  • (a) imT is a subspace of W;
  • (b) T is surjective if and only if imT=W.

Proof.

  • (a) We use the Subspace Test (Theorem 1.2.1). (1) 0W=T(0V) by Theorem 2.1.1, so 0W∈imT. (2) Let w1,w2∈imT, say w1=T(v1) and w2=T(v2) with v1,v2∈V. By (LT1), w1+w2=T(v1+v2), and v1+v2∈V, so w1+w2∈imT. (3) Let w=T(v)∈imT and c∈F. By (LT2), cw=T(cv) with cv∈V, so cw∈imT.

  • (b) The inclusion imT⊆W always holds. By Definition 0.4.3, T is surjective exactly when every w∈W equals T(v) for some v, that is, when W⊆imT. So T is surjective if and only if imT=W.

This pays off a pattern from Chapter 1, §2. The null space of a matrix (Example (Solutions of a Homogeneous System)), the symmetric matrices (Example (Symmetric Matrices)) and the trace-free matrices (Example (Trace-Free Matrices)) were each shown to be subspaces by a separate check, and that section promised a single theorem. Each is the kernel of a linear map (TA, A↦A−A⊤, and the trace), so Theorem 2.2.1 covers them all at once.

First examples. Start with the maps that have the most extreme kernels and images.

Example (The Zero Map and the Identity)

Find the kernel and image of the zero map 0:V→W and of the identity idV:V→V.

Solution. The zero map sends every vector to 0W, so ker0=V and im0={0W}. The identity sends v to v, which is 0 only when v=0, so keridV={0}. Every v is its own image, so imidV=V.

These two are the ends of the scale. The kernel is always between {0} and V, and the image between {0} and W. The zero map kills everything and reaches nothing but 0; the identity kills nothing and reaches everything.

Example (Projection onto an Axis)

Find the kernel and image of the projection T:R2→R2, T(a1,a2)=(a1,0), of Example (Projection onto an Axis).

Solution. T(a1,a2)=(0,0) exactly when a1=0. So kerT={(0,a2):a2∈R}, the y-axis. Every output has second entry 0, and every (a1,0) is an output, namely T(a1,0). So imT is the x-axis. The kernel is the direction the light shines along; the image is the screen the shadow falls on.

A nonexample by minimal change. Replace 0 by another vector: for the projection, {v:T(v)=(1,0)}={(1,a2):a2∈R}. This is the vertical line through (1,0). It does not contain 0, and it is not closed under addition, since (1,0)+(1,0)=(2,0) lies off the line. So it is not a subspace. It is the kernel shifted by (1,0). The same thing happens for systems in Chapter 3: the solution set of Ax=b is one particular solution plus the set of solutions of Ax=0, which is kerTA.

Why the preimage of 0? Because 0 is the one output that every linear map is guaranteed to hit, so its preimage is never empty, and because all other preimages are translates of it. If T(p)=w, then T(v)=w exactly when T(v−p)=0, that is, when v∈p+kerT. The kernel describes the shape of every nonempty preimage at once.

Warning. Keep track of where each subspace lives. The kernel sits inside the domain V; the image sits inside the codomain W. For TA:Fn→Fm, the kernel consists of columns with n entries and the image of columns with m entries, so “kerT=imT” does not even make sense unless V=W. And the image is not the codomain in general: the differentiation map D:R[x]≤3→R[x]≤3 has codomain R[x]≤3, but x3 is not the derivative of any cubic, so imD≠R[x]≤3.

2.2.2. Injectivity via the kernel

The computation that opened the section now becomes a theorem. It is the reason to prefer the kernel over the definition of injectivity whenever a map is linear.

Theorem 2.2.3 (Kernel Test for Injectivity)

Let T:V→W be linear. Then T is injective if and only if kerT={0}.

Proof. (⇒) Suppose T is injective, and let v∈kerT. Then T(v)=0W=T(0V) by Theorem 2.1.1. Injectivity gives v=0V. Hence kerT⊆{0}, and the reverse inclusion holds because kerT is a subspace (Theorem 2.2.1).

(⇐) Suppose kerT={0}, and let T(u)=T(v). By Theorem 2.1.2, T(u−v)=T(u)−T(v)=0, so u−v∈kerT={0}. Hence u=v, and T is injective.

Compare the work. The definition asks: for all pairs u,v, does T(u)=T(v) force u=v? The theorem asks only: for each v, does T(v)=0 force v=0? The second question is usually a homogeneous linear system or a coefficient comparison. For TA, the theorem says that x↦Ax is injective exactly when Ax=0 has only the trivial solution; Chapter 3 turns that into a test that elimination can run.

2.2.3. Computing the image

The image is defined by an existence condition, which is hard to check directly. When V has a spanning list, applying T to it gives a spanning list of imT.

Theorem 2.2.4 (The Image Is Spanned by the Images of a Spanning List)

Let T:V→W be linear, and suppose (v1,…,vk) spans V. Then imT=span(T(v1),…,T(vk)). In particular, if V is finite-dimensional, then so is imT, even when W is not.

Proof. (⊇) Each T(vi) lies in imT, which is a subspace by Theorem 2.2.2. By Theorem 1.3.1 (3), the span of these vectors is contained in imT.

(⊆) Let w∈imT, say w=T(v) with v∈V. Since (v1,…,vk) spans V, v=a1v1+⋯+akvk for some ai∈F. By Theorem 2.1.4, w=a1T(v1)+⋯+akT(vk)∈span(T(v1),…,T(vk)).

If V is finite-dimensional, some finite list spans V (Definition 1.3.4), and its images form a finite list spanning imT.

So the recipe for the image is: apply T to a basis (or any spanning list) of V, then sift the results to a basis if one is wanted (Theorem 1.5.4). The images of a basis need not be independent; the projection sends the basis (e1,e2) to (e1,0).

2.2.4. Examples

We now compute kernels and images across the families: polynomials, matrices, and sequences. In each case we then read off injectivity from the kernel and surjectivity from the image.

Example (Differentiation)

Find the kernel and image of D:R[x]≤3→R[x]≤2, D(p)=p′.

Solution. Kernel. Let p=a0+a1x+a2x2+a3x3. Then D(p)=a1+2a2x+3a3x2, which is the zero polynomial exactly when a1=2a2=3a3=0. Since 2≠0 and 3≠0 in R, this means a1=a2=a3=0. So kerD={a0:a0∈R}=span(1), the constants.

Image. By Theorem 2.2.4 applied to the basis (1,x,x2,x3), imD=span(D(1),D(x),D(x2),D(x3))=span(0,1,2x,3x2)=span(1,x,x2)=R[x]≤2. So D is surjective but not injective: p and p+5 have the same derivative. Note dim⁡kerD+dim⁡imD=1+3=4=dim⁡R[x]≤3.

Example (Trace)

Find the kernel and image of tr:M2(R)→R.

Solution. Kernel. A matrix (abcd) has trace 0 exactly when d=−a, that is, when it equals (abc−a)=a(100−1)+bE12+cE21. So E11−E22,E12,E21 span kertr. They are independent: the combination above is the zero matrix only if a=b=c=0. Hence they form a basis, and dim⁡kertr=3.

Image. imtr is a subspace of R, and it contains trE11=1. The lazy preimage rE11 of any r∈R shows imtr=R. So the trace is surjective but not injective. Again 3+1=4=dim⁡M2(R).

The next two examples live in infinite-dimensional spaces, and the pattern “one property but not the other” goes the opposite way.

Example (Integration)

Find the kernel and image of J:R[x]→R[x], J(p)(x)=∫0xp(t)dt, of Example (Integration).

Solution. Kernel. For p=a0+a1x+⋯+anxn, J(p)=a0x+a12x2+⋯+ann+1xn+1. This is the zero polynomial only if every akk+1=0, that is, every ak=0. So kerJ={0}, and J is injective by Theorem 2.2.3.

Image. Let U={q∈R[x]:q(0)=0}, the polynomials with constant coefficient 0. Every J(p) has constant coefficient 0, so imJ⊆U. Conversely, if q=b1x+b2x2+⋯+bmxm∈U, then p=b1+2b2x+⋯+mbmxm−1 satisfies J(p)=q. Hence imJ=U. Since 1∉U, J is not surjective.

Example (The Shifts: Injective but Not Surjective, and Conversely)

Find the kernels and images of the right and left shifts R,L:FN→FN of Example (The Shift Maps on Sequences).

Solution. Right shift. R(s0,s1,…)=(0,s0,s1,…) is the zero sequence only if every sk=0. So kerR={0}, and R is injective. Every output has first entry 0; conversely, (0,t1,t2,…)=R(t1,t2,…). So imR={t∈FN:t0=0}≠FN, and R is not surjective: e0=(1,0,0,…) is never an output.

Left shift. L(s0,s1,s2,…)=(s1,s2,…) is zero exactly when s1=s2=⋯=0, with s0 arbitrary. So kerL=span(e0)≠{0}, and L is not injective. Every sequence is an output, since L(R(t))=t. So imL=FN, and L is surjective.

This pays off the pointer from Chapter 1, §8: R matches FN one-to-one with its proper subspace imR. For a map V→V on a finite set, injective and surjective are equivalent (Theorem 0.4.9). The shifts, and the pair J and D on R[x] (where D(J(p))=p makes D surjective, while D(1)=0 makes it not injective), show that for linear maps on an infinite-dimensional space this equivalence fails. The next section proves that it holds again when V is finite-dimensional.

Quick check. Find kerT and imT for the map T:R2→R3, T(x,y)=(2x−y, x+y, x−y), of Example (Finding a Formula from Values on a Basis). Is T injective? Surjective?

Solution. If T(x,y)=0, then x+y=0 and x−y=0, so x=y=0. Hence kerT={0}, and T is injective. By Theorem 2.2.4, imT=span(T(e1),T(e2))=span((2,1,1),(−1,1,−1)), a plane in R3. A span of two vectors has dimension at most 2<3, so imT≠R3 and T is not surjective.

2.2.5. What injective and surjective maps do to lists

Injectivity and surjectivity are statements about vectors. They translate into statements about lists: injective maps keep independent lists independent, and surjective maps keep spanning lists spanning. On a basis, the translation goes both ways.

Theorem 2.2.5 (Injective Maps Preserve Independence, Surjective Maps Preserve Spanning)

Let T:V→W be linear.

  • (a) If T is injective and (v1,…,vk) is linearly independent in V, then (T(v1),…,T(vk)) is linearly independent in W.
  • (b) If T is surjective and (v1,…,vk) spans V, then (T(v1),…,T(vk)) spans W.
  • (c) If (v1,…,vn) is a basis of V, then T is injective if and only if (T(v1),…,T(vn)) is linearly independent, and T is surjective if and only if (T(v1),…,T(vn)) spans W.

Proof.

  • (a) Let a1T(v1)+⋯+akT(vk)=0. By Theorem 2.1.4, T(a1v1+⋯+akvk)=0, so a1v1+⋯+akvk∈kerT. Since T is injective, kerT={0} (Theorem 2.2.3), so a1v1+⋯+akvk=0. The independence of (v1,…,vk) gives a1=⋯=ak=0.

  • (b) By Theorem 2.2.4, span(T(v1),…,T(vk))=imT, and imT=W because T is surjective (Theorem 2.2.2).

  • (c) Injectivity. (⇒) is (a). (⇐) Suppose the images are independent, and let v∈kerT. Write v=a1v1+⋯+anvn. By Theorem 2.1.4, 0=T(v)=a1T(v1)+⋯+anT(vn), so all ai=0 and v=0. Hence kerT={0}, and T is injective by Theorem 2.2.3.

Surjectivity. By Theorem 2.2.4, imT=span(T(v1),…,T(vn)). By Theorem 2.2.2, T is surjective exactly when this span is W.

Warning. Without injectivity, independence can be lost. The projection T(a1,a2)=(a1,0) sends the independent list ((1,0),(1,1)) to ((1,0),(1,0)), which is dependent. The kernel is to blame: (1,1)−(1,0)=(0,1) lies in kerT. Likewise, a map that is not surjective sends no list to a spanning list of W, since all the images lie in imT≠W: the inclusion R[x]≤2→R[x]≤3 sends the basis (1,x,x2) to a list that misses x3.

Part (c) turns a question about a map into a question about n vectors in W, which for vectors in Fm is a question Chapter 3 settles by elimination. In the next section, counting dimensions will let us check only one of injectivity and surjectivity when dim⁡V=dim⁡W.

2.2.6. Exercises

A. Check your understanding

Exercise (A1)
  • (a) Define the kernel and the image of a linear map T:V→W. Of which spaces are they subspaces?
  • (b) State the kernel test for injectivity.
  • (c) True or false: if T(u)=T(v), then u−v∈kerT. Justify your answer.
  • (d) True or false: for D:R[x]≤3→R[x]≤3, D(p)=p′, we have imD=R[x]≤3. Justify your answer.
  • (e) True or false: for a linear T:V→W and any w∈W, the set {v∈V:T(v)=w} is a subspace of V. Justify your answer.

Solution.

  • (a) See Definition 2.2.1 and Definition 2.2.2: kerT={v∈V:T(v)=0}, a subspace of V (Theorem 2.2.1); imT={T(v):v∈V}, a subspace of W (Theorem 2.2.2).

  • (b) See Theorem 2.2.3: a linear map is injective if and only if its kernel is {0}.

  • (c) True. By Theorem 2.1.2, T(u−v)=T(u)−T(v)=0.

  • (d) False. Every derivative of a polynomial of degree at most 3 has degree at most 2, so x3∉imD.

  • (e) False. If w≠0, the set does not contain 0, since T(0)=0≠w. For example, for the projection of Example (Projection onto an Axis) and w=(1,0), the set is the line {(1,a2)}. It is a subspace exactly when w=0, in which case it is kerT.

B. Practice

Exercise (B1: Kernel and Image from the Definitions)

For each map, find the kernel and the image, give a basis of each, and decide whether the map is injective and whether it is surjective.

  • (a) D2:R[x]≤3→R[x]≤3, where D is differentiation.
  • (b) T:M2(R)→M2(R), T(A)=A−A⊤.

Solution.

  • (a) Write p=a0+a1x+a2x2+a3x3. Then D2p=2a2+6a3x. Kernel: D2p=0 forces a2=a3=0, so kerD2=R[x]≤1, with basis (1,x). Image: the formula shows every D2p lies in R[x]≤1, and conversely b0+b1x=D2(b02x2+b16x3), so imD2=R[x]≤1, again with basis (1,x). Since kerD2≠{0}, D2 is not injective (Theorem 2.2.3); since imD2≠R[x]≤3 (it omits x2), it is not surjective.

  • (b) T is linear because the transpose is: (A+B)⊤=A⊤+B⊤ and (cA)⊤=cA⊤ (Theorem 0.9.5). Kernel: A−A⊤=O says A=A⊤, so kerT is the space of symmetric matrices, with basis (E11,E22,E12+E21). Image: each A−A⊤ is skew-symmetric, since (A−A⊤)⊤=A⊤−A=−(A−A⊤); and every skew-symmetric B∈M2(R) is a multiple of E12−E21, with B=T(12B). So imT=span(E12−E21), with basis (E12−E21). T is neither injective (the kernel is nonzero) nor surjective (the image is not all of M2(R)).

Exercise (B2: Kernels and Images Beyond Fn)

For each map, find a basis of the kernel and a basis of the image, and decide whether the map is injective and whether it is surjective.

  • (a) T:R[x]≤2→R[x]≤2, T(p)=p′+p.
  • (b) S:M2(R)→M2(R), S(A)=A−A⊤.

Solution. Both maps are linear. For c∈R, by linearity of differentiation (Example (Differentiation)), T(cp+q)=(cp′+q′)+(cp+q)=cT(p)+T(q). By linearity of the transpose (Example (Trace and Transpose)), S(cA+B)=cA+B−cA⊤−B⊤=cS(A)+S(B). Both are linear by Theorem 2.1.3.

  • (a) Kernel. Let p=a+bx+cx2. Then T(p)=(b+2cx)+(a+bx+cx2)=(a+b)+(b+2c)x+cx2. This is zero exactly when c=0, b+2c=0, and a+b=0, that is, c=b=a=0. So kerT={0}, with the empty list as basis, and T is injective.

    Image. We show T is surjective. Given q∈R[x]≤2, let p=q−q′+q″. Then p∈R[x]≤2, and since q‴=0, T(p)=(q′−q″+q‴)+(q−q′+q″)=q. So imT=R[x]≤2, with basis (1,x,x2), and T is surjective.

  • (b) Kernel. S(A)=O exactly when A⊤=A. A matrix (abcd) is symmetric exactly when b=c, that is, when it equals aE11+dE22+b(E12+E21). These three matrices are independent (compare entries), so (E11,E22,E12+E21) is a basis of kerS. S is not injective.

Image. By Theorem 2.2.4 with the basis (E11,E12,E21,E22), imS is spanned by S(E11)=O, S(E12)=E12−E21, S(E21)=E21−E12, and S(E22)=O. So imS=span(E12−E21), with basis (E12−E21), the skew-symmetric matrices. Since I2∉imS, S is not surjective.

C. Going deeper

In these exercises, for linear maps T:U→V and S:V→W we write ST for the composite S∘T:U→W, which applies T first. It is linear: ST(cu+u′)=S(cT(u)+T(u′))=cST(u)+ST(u′), by Theorem 2.1.3 for T and then for S.

Exercise (C1: Kernels and Images of a Composite)

Let T:U→V and S:V→W be linear.

  • (a) Prove that kerT⊆ker(ST) and im(ST)⊆imS.
  • (b) Give an example, with U=V=W=R2, where kerT≠ker(ST).
  • (c) Deduce that if ST is injective, then T is injective, and if ST is surjective, then S is surjective.

Solution.

  • (a) Let u∈kerT. Then ST(u)=S(0)=0 by Theorem 2.1.1, so u∈ker(ST). Let w∈im(ST), say w=S(T(u)). Then w=S(v) with v=T(u)∈V, so w∈imS.

  • (b) Let T=idR2 and let S be the projection S(a1,a2)=(a1,0). Then kerT={0}, while ker(ST)=kerS is the y-axis (Example (Projection onto an Axis)).

  • (c) If ST is injective, then ker(ST)={0} (Theorem 2.2.3), so kerT={0} by (a), and T is injective. If ST is surjective, then W=im(ST)⊆imS⊆W by (a), so imS=W and S is surjective (Theorem 2.2.2).

Exercise (C2: When Is a Composite Injective?)

Let T:U→V and S:V→W be linear, and suppose T is injective. Prove that ST is injective if and only if kerS∩imT={0}, that is, if and only if S is injective on imT. Give an example where S is not injective but ST is.

Solution. (⇒) Suppose ST is injective, and let v∈kerS∩imT. Then v=T(u) for some u∈U, and ST(u)=S(v)=0. So u∈ker(ST)={0} (Theorem 2.2.3), and v=T(0)=0.

(⇐) Suppose kerS∩imT={0}, and let u∈ker(ST). Then T(u)∈imT and S(T(u))=0, so T(u)∈kerS∩imT={0}. Since T is injective, u=0. Hence ker(ST)={0}, and ST is injective.

Example: let T:R→R2, T(a)=(a,0), which is injective with imT the x-axis, and let S:R2→R, S(a1,a2)=a1. Then kerS is the y-axis, so S is not injective, but kerS∩imT={0}, and indeed ST(a)=a is injective.

Exercise (C3: Differentiation over F2)

Let D:F2[x]≤3→F2[x]≤3 be the formal derivative (Example (Differentiation)). Find bases of kerD and imD. Which step of Example (Differentiation) fails over F2?

Solution. For p=a0+a1x+a2x2+a3x3, D(p)=a1+2a2x+3a3x2. In F2, 2=0 and 3=1, so D(p)=a1+a3x2.

Kernel. D(p)=0 exactly when a1=a3=0, so kerD={a0+a2x2}, with basis (1,x2). The polynomials 1 and x2 are independent by Theorem 1.4.4.

Image. By Theorem 2.2.4, imD=span(D(1),D(x),D(x2),D(x3))=span(0,1,0,x2), with basis (1,x2).

The failing step is “2a2=0 forces a2=0”, which divides by 2; over F2, 2=0, and D(x2)=2x=0 although x2 is not constant. So over F2 the kernel of differentiation is bigger than the constants, and here kerD=imD.

Found a typo or a mistake? Report it, or read this page’s source

The text of this book is licensed under CC BY-NC-SA 4.0.