Scientia sine finibus

Linear Algebra / Unit 4, Vector Spaces / Topic 4.5

Units and Topics

Unit 4. Vector Spaces

4.5 Linear Maps: Kernel and Range

This topic studies linear maps between any two vector spaces. Each linear map has a kernel, which is the set of vectors that it sends to zero, and a range, which is the set of outputs that it can reach. Once bases are chosen, a linear map is described by a matrix.

You need Topics 3.1, 4.1, 4.3, and 4.4 for this topic.

1. Linear Maps

Let V and W be vector spaces. A map T takes each vector of V and gives a vector of W. The map is called linear when it follows two rules, for all vectors u and v of V and all scalars c.

T(u + v) = T(u) + T(v) T(cv) = cT(v)

These are the two rules of Topic 3.1, where the map was multiplication by a matrix. Together they say that a linear map keeps linear combinations:

T(au + bv) = aT(u) + bT(v)

A linear map always sends the zero vector of V to the zero vector of W, because T(0v) = 0T(v).

2. Examples

MapLinearReason
Multiplication by an m by n matrix, from ℝⁿ to ℝmYesTopic 3.1
The derivative, which takes a polynomial p to p′Yes(p + q)′ = p′ + q′ and (cp)′ = cp′
The integral of a function from 0 to 1, which gives a numberYesThe integral of a sum is the sum of the integrals
The transpose, which takes a matrix A to ATYes(A + B)T = AT + BT and (cA)T = cAT
The trace, which takes a square matrix to a numberYesTopic 3.5
The shift that takes (x, y) to (x + 1, y)NoIt sends (0, 0) to (1, 0)
The map that takes a function f to f²No(f + g)² is not f² + g²
The determinant, which takes a square matrix to a numberNodet(A + B) is not det A + det B

The derivative and the integral are linear maps on spaces of functions. In quantum mechanics, a linear map on a space of functions is called an operator. The operator for momentum is built from the derivative.

3. The Matrix of a Linear Map

A linear map is fixed by what it does to the vectors of a basis. If b₁, …, bₙ is a basis of V and v = c₁b₁ + … + cₙbₙ, then

T(v) = c₁T(b₁) + … + cₙT(bₙ)

This gives the matrix of the map. Choose a basis of V and a basis of W. Apply T to each basis vector of V, and write the coordinates of the result, in the basis of W, as one column. The matrix then takes the coordinates of v to the coordinates of T(v). This is the rule of Topic 3.1, where the columns were the vectors that i and j were sent to.

The matrix of the derivative

Let V be the space of polynomials of degree 2 or less, with the basis 1, x, x². The polynomial a + bx + cx² has the coordinates (a, b, c). Apply the derivative D to each basis vector.

  • D(1) = 0, with the coordinates (0, 0, 0).
  • D(x) = 1, with the coordinates (1, 0, 0).
  • D(x²) = 2x, with the coordinates (0, 2, 0).

These are the three columns of the matrix.

D = 010002000

Check with p = 3 + 2x + 5x², which has the coordinates (3, 2, 5).

010002000 325 = 2100

The result is the polynomial 2 + 10x, which is the derivative of p.

4. The Kernel and the Range

The kernel of a linear map T is the set of all vectors v of V with T(v) = 0. The range of T is the set of all vectors of W that are equal to T(v) for some v. The range is also called the image.

  • The kernel is a subspace of V, and the range is a subspace of W. The proof is the same as for the null space and the column space in Topic 4.1.
  • For multiplication by a matrix A, the kernel is the null space of A and the range is the column space of A.

For the derivative D on the polynomials of degree 2 or less:

  • The kernel is the set of constant polynomials, because these are the polynomials whose derivative is 0. It has the basis 1 and the dimension 1.
  • The range is the set of polynomials of degree 1 or less, because the derivative of a + bx + cx² is b + 2cx. It has the basis 1, x and the dimension 2.

Try it: the kernel and the range of a map of the plane

Choose a map. The purple line is the kernel, and the green line or the green shading is the range. Drag the blue point to choose an input x. The green arrow is the output Ax. Move the slider to add a multiple of a kernel vector to x. The output does not change.

5. The Dimensions of the Kernel and the Range

The rank-nullity theorem of Topic 4.4 holds for any linear map on a space of finite dimension.

(dimension of the kernel) + (dimension of the range) = dimension of V

For the derivative above, 1 + 2 = 3. Each dimension of V is either sent to zero or appears in the range.

6. One-to-One and Onto

A map is called one-to-one when different inputs always give different outputs. A map is called onto when its range is all of W.

  • A linear map is one-to-one exactly when its kernel contains only the zero vector. If T(u) = T(v), then T(u − v) = 0, so u − v is in the kernel. If the kernel contains only the zero vector, then u = v.
  • A linear map has an inverse exactly when it is one-to-one and onto.
  • When V and W have the same finite dimension, the two properties come together. By the rank-nullity theorem, a kernel of dimension 0 gives a range of the full dimension, and the reverse.

The dimensions also set limits. A linear map from ℝ³ to ℝ² cannot be one-to-one, because its range has a dimension of at most 2, so its kernel has a dimension of at least 1. A linear map from ℝ² to ℝ³ cannot be onto, because its range has a dimension of at most 2.

The derivative D above is neither one-to-one nor onto. It sends all constants to 0, and no polynomial of degree 2 or less has the derivative x².

7. One Map After Another

If S and T are linear maps, then the map that applies T first and S second is also linear. As in Topic 3.2, its matrix is the product of the two matrices. For example, the second derivative is D applied twice, and its matrix is D².

D² = 010002000 010002000the matrix D times itselfD² = 002000000the matrix of the second derivative

For p = 3 + 2x + 5x², the product D² times (3, 2, 5) is (10, 0, 0), which is the constant polynomial 10. The third derivative of any polynomial of degree 2 or less is 0, and D³ is the zero matrix.

Common Mistakes

  • Calling a map linear because its graph is a line. The map that takes x to x + 1 is not linear, because it does not send 0 to 0.
  • Looking for the kernel in W or the range in V. The kernel is a part of the space of inputs, and the range is a part of the space of outputs.
  • Thinking that the kernel is empty when a map is one-to-one. The kernel always contains the zero vector.
  • Writing the images of the basis vectors as the rows of the matrix. They are the columns.
  • Forgetting that the matrix of a map depends on the bases. A different basis gives a different matrix for the same map, as Topic 4.6 shows.

Summary

TermMeaning
Linear mapA map with T(u + v) = T(u) + T(v) and T(cv) = cT(v)
Matrix of a mapThe columns are the coordinates of the images of the basis vectors
KernelAll vectors that the map sends to the zero vector
RangeAll outputs of the map
Rank-nullity theoremThe dimensions of the kernel and the range add to the dimension of V
One-to-oneThe kernel contains only the zero vector
OntoThe range is all of W

Practice

Work each problem on paper first. Then open the answer to check your work.

1. Is the map T(x, y) = (x + y, 2x) linear? If it is, write its matrix.

Yes. Each component of the output is a linear combination of x and y.

T(1, 0) = (1, 2) and T(0, 1) = (1, 0), so the matrix is 1120.

2. Is the map T(x, y) = (x + 1, y) linear?

No. T(0, 0) = (1, 0), and a linear map sends the zero vector to the zero vector.

3. A linear map of the plane sends (1, 0) to (3, 1) and (0, 1) to (−1, 2). Write its matrix, and find where it sends (2, 1).

The images of the basis vectors are the columns: 3−112.

T(2, 1) = 2(3, 1) + 1(−1, 2)2 times the first column plus 1 times the second columnT(2, 1) = (5, 4)add the matching components

4. Find the kernel and the range of the map with the matrix 1224.

The kernel is the set of solutions of x + 2y = 0, which are the multiples of (−2, 1).

The range is the span of the columns, which are the multiples of (1, 2).

The dimensions are 1 and 1, and 1 + 1 = 2.

5. Write the matrix of the derivative on the polynomials of degree 3 or less, with the basis 1, x, x², x³. Find the dimensions of its kernel and its range.

D(1) = 0, D(x) = 1, D(x²) = 2x, and D(x³) = 3x². The matrix is 0100002000030000.

The kernel is the set of constants, with the dimension 1. The range has the dimension 4 − 1 = 3.

6. A linear map from ℝ⁵ to ℝ³ is onto. What is the dimension of its kernel?

The range is all of ℝ³, so its dimension is 3.

The dimension of the kernel is 5 − 3 = 2.

Python Practice

Step 1. Take a derivative with a matrix

A polynomial a + bx + cx² is stored as the vector of its coordinates (a, b, c). The code below stores the matrix D of the derivative from Part 3 and applies it to the polynomial 3 + 2x + 5x². The @ sign multiplies a matrix by a vector.

Python

The result is [2 10 0], which is the polynomial 2 + 10x.

Now change p so that the code takes the derivative of 4 − x + 3x².

Python

Step 2. Apply a map twice

The matrix of one map after another is the product of the two matrices. The code below prints the matrix D², which is the matrix of the second derivative.

Python

In the next box, change the last line so that it prints the second derivative of the polynomial 3 + 2x + 5x².

Python

Step 3. Find the dimensions of the kernel and the range

The dimension of the range is the rank of the matrix. The dimension of the kernel is the number of columns minus the rank. The number of columns is D.shape[1].

Python

The range has the dimension 2, and the kernel has the dimension 1. The last result is [0 0 0]: the constant polynomial 7 is in the kernel.

Step 4. Build the matrix of a map

Let T be the map that takes a polynomial p to x times its derivative. This map is linear. On the basis vectors, T(1) = 0, T(x) = x, and T(x²) = 2x². In the next box, replace the zeros so that T is the matrix of this map. Each column holds the coordinates of the image of one basis vector. The last line applies the map to 3 + 2x + 5x².

Python

The result is the polynomial 2x + 10x², which is x times the derivative 2 + 10x.

Step 5. Decide whether a map is one-to-one

A map is one-to-one when its kernel contains only the zero vector, which means that the dimension of the kernel is 0. The matrix in the next box describes a map from ℝ³ to ℝ². Before you press Run, replace the 0 in the line that starts with guess with the dimension of the kernel that you expect. The code prints your answer and then the value that Python calculates.

Python

Quiz

This quiz has 5 questions on this topic. A question asks you either to choose one answer or to type numbers. The page grades your answers and explains each one. A number can be typed as a whole number, a decimal, a fraction such as 1/3, or a calculation such as sqrt(18)/2 or arccos(1/2). The page shows the value of a calculation next to the box. Angles in a calculation are in degrees. The Calculator button under each question opens a calculator. Your answers are saved in your browser, so they are still on the page when you come back to it.

Choose how your answers are checked

1. Which of these maps from ℝ² to ℝ² is linear?

2. Write the four entries of the matrix of the map T(x, y) = (2x − y, 3y).

3. In the basis 1, x, x², the polynomial 1 − 4x + 2x² has the coordinates (1, −4, 2). Find the coordinates of its derivative in the same basis.

4. A linear map from ℝ⁴ to ℝ² is onto. Find the dimension of its kernel.

5. A linear map is one-to-one exactly when which statement is true?

Next: Topic 4.6, Change of Basis