39. Kernels

39. Kernels

Definition of the kernel

Recall the following definitions:

Definition:

f is a linear map if

  • f ( v + w ) = f ( v ) + f ( w ) for all v , w

  • f ( λ v ) = λ f ( v ) for all v and all λ 𝐑 .

Definition:

V is a linear subspace if

  • v , w V implies v + w V

  • v V implies λ v V for all λ 𝐑 .

These two definitions are very similar. We will exploit this in the next two videos: given a linear map f : 𝐑 n 𝐑 m , we will associate to it two subspaces ker ( f ) 𝐑 n (the kernel of f ) and im ( f ) (the image of f ).

Definition:

The kernel of f is the set of v 𝐑 n such that f ( v ) = 0 . (If m = n then this is just the 0-eigenspace of f ).

Example:

Let f : 𝐑 3 𝐑 3 be the map f ( v ) = A v for A = ( 1 0 0 0 1 0 0 0 0 ) . Note that f ( x y z ) = ( x y 0 ) . This is the vertical projection to the x y -plane.

Vertical projection to xy-plane

The kernel of f is the z -axis (blue in the figure; these are the points which project vertically down to the origin). That is ker ( f ) = { ( 0 0 z ) : z 𝐑 } .

Example:

Recall the example A = ( 1 0 - 1 0 1 - 1 ) (going from 𝐑 3 to 𝐑 2 ) from Video 3. This projects vectors into the plane; if we think of 𝐑 2 as the x y -plane then we can visualise this map as the projection of vectors in the ( - 1 - 1 - 1 ) -direction until they live in the x y -plane.

Projection along (-1,-1,-1) to xy-plane

We described this as projecting light rays in the ( - 1 - 1 - 1 ) direction. In this case, the kernel of A is precisely the light ray which hits the origin, which is the line { ( x x x ) : x 𝐑 } (light blue in the picture).

Kernel is a subspace

Lemma:

The kernel is a subspace.

Given v , w ker ( f ) , we need to show that v + w ker ( f ) . Since v , w ker ( f ) , we know that f ( v ) = f ( w ) = 0 . Therefore f ( v + w ) = f ( v ) + f ( w ) (since f is linear) = 0 + 0 = 0 , so v + w ker ( f ) . Similarly, f ( λ v ) = λ f ( v ) = λ 0 = 0 .

Remarks

  • 0 ker ( f ) for any linear map f because f ( 0 ) = 0 .

  • If f is invertible then ker ( f ) = { 0 } : if v ker ( f ) then v = f - 1 ( 0 ) = 0 .

  • The "kernel" in a nut is the little bit in the middle that's left when you strip away the husk. If f ( v ) = A v then we can think of ker ( f ) as the space of solutions to the simultaneous equations A v = 0 , which is the intersection of the hyperplanes A 11 v 1 + + A 1 n v n = 0 , , A m 1 v 1 + + A m n v n = 0 . In other words, it's the little bit left over when you've intersected all these hyperplanes.

Simultaneous equations revisited

Lemma:

Consider the simultaneous equations A v = b ( A is an m -by- n matrix and b 𝐑 m ). Let f ( v ) = A v . The space of solutions to A v = b , if nonempty, is an affine translate of ker ( f ) .

Example:

If A = ( 1 0 0 0 1 0 0 0 0 ) (so f is vertical projection to the x y -plane) then A v = b has a solution only if b is in the x y -plane, and in that case it has a whole vertical line of solutions sitting above b .

Vertical projection to xy-plane again

This vertical line of solutions is parallel to the kernel of f (the z -axis), i.e. it is a translate of the kernel.

We saw this lemma earlier in a different guise in Video 19. Namely, we saw that if v 0 is a solution to A v = b then the set of all solutions is the affine subspace v 0 + U where U is the space of solutions to A v = 0 . In other words, U = ker ( f ) .

In particular, we see that if A v = b has a solution then it has a k -dimensional space of solutions, where k is the dimension of ker ( f ) .

Remember that the space of solutions has dimension equal to the number of free variables when we put A into reduced echelon form. For example, A = ( 1 0 0 0 1 0 0 0 0 ) is in reduced echelon form with two leading entries and one free variable, which is why we get 1-dimensional solution spaces.

Definition:

The nullity of A (or of f ) is the dimension of ker ( f ) (i.e. the number of free variables of A when put into reduced echelon form).

Our goal for the next video is to prove the rank-nullity theorem which gives us a nice formula relating the nullity to another important number called the rank.