Skip to content

Chapter 33. Kernel and Image

Let T:VWT : V \to W be a linear transformation. Two subspaces are naturally attached to TT: the kernel and the image.

The kernel records the vectors in the domain that are sent to zero. The image records the vectors in the codomain that are actually reached by the transformation. In standard notation,

ker(T)={vV:T(v)=0W} \ker(T)=\{v\in V:T(v)=0_W\}

and

im(T)={T(v):vV}. \operatorname{im}(T)=\{T(v):v\in V\}.

The kernel is also called the null space. The image is also called the range. For a matrix transformation TA(x)=AxT_A(x)=Ax, the kernel is the null space of AA, and the image is the column space of AA.

33.1 The Kernel

The kernel of a linear transformation is the set of all input vectors that disappear under the transformation.

If

T:VW, T : V \to W,

then

ker(T)={vV:T(v)=0W}. \ker(T)=\{v\in V:T(v)=0_W\}.

The zero vector in the definition is the zero vector of the codomain WW, not the zero vector of the domain VV. The distinction matters when VV and WW are different spaces.

For example, define

T:R3R2 T:\mathbb{R}^3\to\mathbb{R}^2

by

T[xyz]=[x+yy+z]. T \begin{bmatrix} x\\ y\\ z \end{bmatrix} = \begin{bmatrix} x+y\\ y+z \end{bmatrix}.

A vector belongs to the kernel when

T[xyz]=[00]. T \begin{bmatrix} x\\ y\\ z \end{bmatrix} = \begin{bmatrix} 0\\ 0 \end{bmatrix}.

Thus

x+y=0 x+y=0

and

y+z=0. y+z=0.

From these equations,

x=y,z=y. x=-y, \qquad z=-y.

Let y=ty=t. Then

[xyz]=[ttt]=t[111]. \begin{bmatrix} x\\ y\\ z \end{bmatrix} = \begin{bmatrix} -t\\ t\\ -t \end{bmatrix} = t \begin{bmatrix} -1\\ 1\\ -1 \end{bmatrix}.

Therefore

ker(T)=span{[111]}. \ker(T)= \operatorname{span} \left\{ \begin{bmatrix} -1\\ 1\\ -1 \end{bmatrix} \right\}.

The kernel is a line through the origin in R3\mathbb{R}^3.

33.2 The Kernel as a Subspace

The kernel of a linear transformation is always a subspace of the domain.

Let T:VWT : V \to W be linear. We prove that ker(T)\ker(T) is a subspace of VV.

First, since TT is linear,

T(0V)=0W. T(0_V)=0_W.

Thus

0Vker(T). 0_V\in \ker(T).

Second, suppose u,vker(T)u,v\in\ker(T). Then

T(u)=0W T(u)=0_W

and

T(v)=0W. T(v)=0_W.

By linearity,

T(u+v)=T(u)+T(v)=0W+0W=0W. T(u+v)=T(u)+T(v)=0_W+0_W=0_W.

So

u+vker(T). u+v\in\ker(T).

Third, suppose uker(T)u\in\ker(T) and cc is a scalar. Then

T(cu)=cT(u)=c0W=0W. T(cu)=cT(u)=c0_W=0_W.

So

cuker(T). cu\in\ker(T).

The kernel contains zero, is closed under addition, and is closed under scalar multiplication. Hence it is a subspace of VV.

33.3 The Image

The image of a linear transformation is the set of all possible outputs.

If

T:VW, T : V \to W,

then

im(T)={T(v):vV}. \operatorname{im}(T)=\{T(v):v\in V\}.

The image is a subset of the codomain WW. It may be all of WW, or it may be a smaller subspace.

For example, define

P:R3R3 P:\mathbb{R}^3\to\mathbb{R}^3

by

P[xyz]=[xy0]. P \begin{bmatrix} x\\ y\\ z \end{bmatrix} = \begin{bmatrix} x\\ y\\ 0 \end{bmatrix}.

The output always has third coordinate zero. Therefore

im(P)={[ab0]:a,bR}. \operatorname{im}(P) = \left\{ \begin{bmatrix} a\\ b\\ 0 \end{bmatrix} :a,b\in\mathbb{R} \right\}.

This is the xyxy-plane in R3\mathbb{R}^3.

The transformation PP projects space onto the xyxy-plane. The image is the plane that remains after projection.

33.4 The Image as a Subspace

The image of a linear transformation is always a subspace of the codomain.

Let T:VWT : V \to W be linear. We prove that im(T)\operatorname{im}(T) is a subspace of WW.

First,

0W=T(0V), 0_W=T(0_V),

so

0Wim(T). 0_W\in\operatorname{im}(T).

Second, suppose y1,y2im(T)y_1,y_2\in\operatorname{im}(T). Then there exist v1,v2Vv_1,v_2\in V such that

y1=T(v1) y_1=T(v_1)

and

y2=T(v2). y_2=T(v_2).

Then

y1+y2=T(v1)+T(v2)=T(v1+v2). y_1+y_2=T(v_1)+T(v_2)=T(v_1+v_2).

Since v1+v2Vv_1+v_2\in V, this shows

y1+y2im(T). y_1+y_2\in\operatorname{im}(T).

Third, suppose y1im(T)y_1\in\operatorname{im}(T) and cc is a scalar. Then y1=T(v1)y_1=T(v_1) for some v1Vv_1\in V. Hence

cy1=cT(v1)=T(cv1). cy_1=cT(v_1)=T(cv_1).

Since cv1Vcv_1\in V,

cy1im(T). cy_1\in\operatorname{im}(T).

Thus the image is a subspace of WW.

33.5 Matrix Transformations

Let AA be an m×nm\times n matrix. It defines a linear transformation

TA:RnRm T_A:\mathbb{R}^n\to\mathbb{R}^m

by

TA(x)=Ax. T_A(x)=Ax.

The kernel of TAT_A is

ker(TA)={xRn:Ax=0}. \ker(T_A)=\{x\in\mathbb{R}^n:Ax=0\}.

This is the null space of AA.

The image of TAT_A is

im(TA)={Ax:xRn}. \operatorname{im}(T_A)=\{Ax:x\in\mathbb{R}^n\}.

If the columns of AA are

a1,a2,,an, a_1,a_2,\ldots,a_n,

then

Ax=x1a1+x2a2++xnan. Ax=x_1a_1+x_2a_2+\cdots+x_na_n.

Therefore

im(TA)=span{a1,a2,,an}. \operatorname{im}(T_A)=\operatorname{span}\{a_1,a_2,\ldots,a_n\}.

So the image of a matrix transformation is exactly the column space of the matrix.

33.6 Example: Computing Kernel and Image

Let

A=[121011]. A= \begin{bmatrix} 1 & 2 & 1\\ 0 & 1 & -1 \end{bmatrix}.

Define

TA:R3R2 T_A:\mathbb{R}^3\to\mathbb{R}^2

by

TA(x)=Ax. T_A(x)=Ax.

To find the kernel, solve

Ax=0. Ax=0.

That is,

[121011][x1x2x3]=[00]. \begin{bmatrix} 1 & 2 & 1\\ 0 & 1 & -1 \end{bmatrix} \begin{bmatrix} x_1\\ x_2\\ x_3 \end{bmatrix} = \begin{bmatrix} 0\\ 0 \end{bmatrix}.

This gives

x1+2x2+x3=0 x_1+2x_2+x_3=0

and

x2x3=0. x_2-x_3=0.

The second equation gives

x2=x3. x_2=x_3.

Let

x3=t. x_3=t.

Then

x2=t. x_2=t.

Substitute into the first equation:

x1+2t+t=0, x_1+2t+t=0,

so

x1=3t. x_1=-3t.

Thus

x=[3ttt]=t[311]. x= \begin{bmatrix} -3t\\ t\\ t \end{bmatrix} = t \begin{bmatrix} -3\\ 1\\ 1 \end{bmatrix}.

Therefore

ker(A)=span{[311]}. \ker(A)= \operatorname{span} \left\{ \begin{bmatrix} -3\\ 1\\ 1 \end{bmatrix} \right\}.

To find the image, examine the columns of AA:

a1=[10],a2=[21],a3=[11]. a_1= \begin{bmatrix} 1\\ 0 \end{bmatrix}, \qquad a_2= \begin{bmatrix} 2\\ 1 \end{bmatrix}, \qquad a_3= \begin{bmatrix} 1\\ -1 \end{bmatrix}.

The image is

im(A)=span{a1,a2,a3}. \operatorname{im}(A) = \operatorname{span}\{a_1,a_2,a_3\}.

Since

a1=[10] a_1= \begin{bmatrix} 1\\ 0 \end{bmatrix}

and

a2=[21] a_2= \begin{bmatrix} 2\\ 1 \end{bmatrix}

are linearly independent, they already span R2\mathbb{R}^2. Hence

im(A)=R2. \operatorname{im}(A)=\mathbb{R}^2.

The transformation collapses one direction in R3\mathbb{R}^3 to zero, but it still reaches every vector in R2\mathbb{R}^2.

33.7 Kernel and Injectivity

The kernel determines whether a linear transformation is injective.

A function is injective when different inputs have different outputs. For a linear transformation, this condition has a simple test:

T is injectiveker(T)={0}. T \text{ is injective} \quad\Longleftrightarrow\quad \ker(T)=\{0\}.

Suppose TT is injective. Since

T(0)=0, T(0)=0,

no other vector can map to zero. Hence the kernel contains only 00.

Conversely, suppose

ker(T)={0}. \ker(T)=\{0\}.

If

T(u)=T(v), T(u)=T(v),

then

T(u)T(v)=0. T(u)-T(v)=0.

By linearity,

T(uv)=0. T(u-v)=0.

Thus

uvker(T). u-v\in\ker(T).

Since the kernel contains only 00,

uv=0. u-v=0.

Therefore

u=v. u=v.

So TT is injective.

The kernel measures failure of injectivity. A large kernel means many different vectors are identified by the transformation.

33.8 Image and Surjectivity

The image determines whether a linear transformation is surjective.

A function

T:VW T:V\to W

is surjective if every vector in WW occurs as an output. In symbols,

T is surjectiveim(T)=W. T \text{ is surjective} \quad\Longleftrightarrow\quad \operatorname{im}(T)=W.

For a matrix transformation

TA:RnRm, T_A:\mathbb{R}^n\to\mathbb{R}^m,

this means that the columns of AA span Rm\mathbb{R}^m.

Thus a transformation into Rm\mathbb{R}^m is surjective exactly when its image has dimension mm.

The image measures failure of surjectivity. If the image is a proper subspace of the codomain, then some vectors in the codomain are never reached.

33.9 Rank and Nullity

The dimension of the image is called the rank:

rank(T)=dim(im(T)). \operatorname{rank}(T)=\dim(\operatorname{im}(T)).

The dimension of the kernel is called the nullity:

nullity(T)=dim(ker(T)). \operatorname{nullity}(T)=\dim(\ker(T)).

For a linear transformation

T:VW T:V\to W

with finite-dimensional domain VV, the rank-nullity theorem states

dim(V)=rank(T)+nullity(T). \dim(V)=\operatorname{rank}(T)+\operatorname{nullity}(T).

This theorem divides the dimension of the domain into two parts. One part survives in the image. The other part collapses into the kernel.

For the matrix

A=[121011], A= \begin{bmatrix} 1 & 2 & 1\\ 0 & 1 & -1 \end{bmatrix},

we found

ker(A)=span{[311]}. \ker(A)= \operatorname{span} \left\{ \begin{bmatrix} -3\\ 1\\ 1 \end{bmatrix} \right\}.

So

nullity(A)=1. \operatorname{nullity}(A)=1.

We also found

im(A)=R2. \operatorname{im}(A)=\mathbb{R}^2.

So

rank(A)=2. \operatorname{rank}(A)=2.

The domain is R3\mathbb{R}^3, and

3=2+1. 3=2+1.

This is rank-nullity in this example.

33.10 Geometric Meaning

The kernel describes directions that are lost.

If a transformation sends a whole line to zero, then all vectors on that line become indistinguishable from the zero vector after the transformation. If a transformation sends a plane to zero, then even more information is lost.

The image describes the space that remains visible.

A projection from R3\mathbb{R}^3 onto the xyxy-plane has a one-dimensional kernel:

ker(P)=span{[001]}. \ker(P)= \operatorname{span} \left\{ \begin{bmatrix} 0\\ 0\\ 1 \end{bmatrix} \right\}.

This is the zz-axis.

Its image is the xyxy-plane:

im(P)={[xy0]:x,yR}. \operatorname{im}(P)= \left\{ \begin{bmatrix} x\\ y\\ 0 \end{bmatrix} :x,y\in\mathbb{R} \right\}.

The zz-direction is lost. The xx- and yy-directions remain.

33.11 Kernel, Image, and Solutions

Kernel and image are directly connected to solving linear systems.

Consider

Ax=b. Ax=b.

A solution exists exactly when

bim(A). b\in\operatorname{im}(A).

This means the right-hand side must lie in the column space of AA.

If one solution x0x_0 exists, then every solution has the form

x=x0+z, x=x_0+z,

where

zker(A). z\in\ker(A).

Indeed,

A(x0+z)=Ax0+Az=b+0=b. A(x_0+z)=Ax_0+Az=b+0=b.

Thus the kernel describes the freedom in the solution set.

If

ker(A)={0}, \ker(A)=\{0\},

then the solution is unique whenever it exists.

If the kernel contains nonzero vectors, then any solution gives infinitely many solutions, provided the field is infinite.

33.12 Computing Kernel and Image by Row Reduction

For a matrix AA, the kernel is found by solving the homogeneous system

Ax=0. Ax=0.

Row reduction gives the pivot variables and free variables. The free variables parametrize the kernel. A basis for the kernel is obtained by assigning one free variable at a time to 11, setting the others to 00, and solving for the pivot variables.

The image is the span of the columns of AA. To find a basis for the image, row-reduce AA and identify the pivot columns. The corresponding original columns of AA form a basis for the column space.

The word original is important. Row operations change the column space in general. They preserve linear relations among columns, which is why the pivot positions can be read from the row-reduced form, but the basis vectors for the image are taken from the original matrix.

33.13 Example with Row Reduction

Let

A=[123246111]. A= \begin{bmatrix} 1 & 2 & 3\\ 2 & 4 & 6\\ 1 & 1 & 1 \end{bmatrix}.

Row-reduce:

[123246111][123000012][123012000]. \begin{bmatrix} 1 & 2 & 3\\ 2 & 4 & 6\\ 1 & 1 & 1 \end{bmatrix} \to \begin{bmatrix} 1 & 2 & 3\\ 0 & 0 & 0\\ 0 & -1 & -2 \end{bmatrix} \to \begin{bmatrix} 1 & 2 & 3\\ 0 & 1 & 2\\ 0 & 0 & 0 \end{bmatrix}.

Continue to reduced echelon form:

[101012000]. \begin{bmatrix} 1 & 0 & -1\\ 0 & 1 & 2\\ 0 & 0 & 0 \end{bmatrix}.

The homogeneous system gives

x1x3=0 x_1-x_3=0

and

x2+2x3=0. x_2+2x_3=0.

Let

x3=t. x_3=t.

Then

x1=t,x2=2t. x_1=t, \qquad x_2=-2t.

So

x=t[121]. x= t \begin{bmatrix} 1\\ -2\\ 1 \end{bmatrix}.

Hence

ker(A)=span{[121]}. \ker(A)= \operatorname{span} \left\{ \begin{bmatrix} 1\\ -2\\ 1 \end{bmatrix} \right\}.

The pivot columns are columns 11 and 22. Therefore a basis for the image is given by the first two original columns:

{[121],[241]}. \left\{ \begin{bmatrix} 1\\ 2\\ 1 \end{bmatrix}, \begin{bmatrix} 2\\ 4\\ 1 \end{bmatrix} \right\}.

So

rank(A)=2 \operatorname{rank}(A)=2

and

nullity(A)=1. \operatorname{nullity}(A)=1.

Again,

3=2+1. 3=2+1.

33.14 Kernel and Image for Abstract Vector Spaces

Kernel and image also apply when vectors are not coordinate columns.

Let P2P_2 be the vector space of polynomials of degree at most 22, and define

D:P2P1 D:P_2\to P_1

by

D(p)=p, D(p)=p',

where pp' is the derivative.

If

p(x)=a+bx+cx2, p(x)=a+bx+cx^2,

then

D(p)=b+2cx. D(p)=b+2cx.

The kernel consists of all polynomials whose derivative is zero. These are the constant polynomials:

ker(D)={a:aR}. \ker(D)=\{a:a\in\mathbb{R}\}.

The image consists of all polynomials in P1P_1. Given any

q(x)=α+βx, q(x)=\alpha+\beta x,

we can choose

p(x)=αx+β2x2. p(x)=\alpha x+\frac{\beta}{2}x^2.

Then

D(p)=q. D(p)=q.

Thus

im(D)=P1. \operatorname{im}(D)=P_1.

Here

dim(P2)=3, \dim(P_2)=3, nullity(D)=1, \operatorname{nullity}(D)=1,

and

rank(D)=2. \operatorname{rank}(D)=2.

Again,

3=1+2. 3=1+2.

33.15 Summary

The kernel and image are the two basic subspaces associated with a linear transformation.

For

T:VW, T:V\to W,

the kernel is

ker(T)={vV:T(v)=0W}, \ker(T)=\{v\in V:T(v)=0_W\},

and the image is

im(T)={T(v):vV}. \operatorname{im}(T)=\{T(v):v\in V\}.

The kernel is a subspace of the domain. The image is a subspace of the codomain.

For a matrix transformation TA(x)=AxT_A(x)=Ax, the kernel is the null space of AA, and the image is the column space of AA.

The kernel controls injectivity:

T is injectiveker(T)={0}. T \text{ is injective} \quad\Longleftrightarrow\quad \ker(T)=\{0\}.

The image controls surjectivity:

T is surjectiveim(T)=W. T \text{ is surjective} \quad\Longleftrightarrow\quad \operatorname{im}(T)=W.

Rank and nullity measure their dimensions:

rank(T)=dim(im(T)),nullity(T)=dim(ker(T)). \operatorname{rank}(T)=\dim(\operatorname{im}(T)), \qquad \operatorname{nullity}(T)=\dim(\ker(T)).

For finite-dimensional domains,

dim(V)=rank(T)+nullity(T). \dim(V)=\operatorname{rank}(T)+\operatorname{nullity}(T).

Kernel and image are therefore not auxiliary notions. They describe exactly what a linear transformation destroys and what it produces.