Skip to content

Linear transformations

Test whether a map is linear, build its matrix from the images of the basis vectors, and picture it as a transformation of the unit square and of a grid.

It opens on

A machine turns every plane vector into another one. How can you test the machine on just two vectors and then know what it does to all the rest?

Why it matters

Rotations, scalings, projections and every layer of a linear model are linear maps, and one small matrix records exactly what a linear map does to every vector.

Good to know first

  • Matrix-vector multiplication: Ax = x₁a₁ + x₂a₂ is a combination of columns
  • the standard basis vectors e₁ = (1, 0) and e₂ = (0, 1) are the columns of the identity matrix

Step by step

  1. What linearity says

    State linearity and check it for T(x) = Ax on a sum and a multiple, and spot a map that is not linear.

    Take T(x) = Ax with A = [[2, −1], [1, 1]] and the arrows u = (1, 2) and v = (2, −1): T(u) = (2 − 2, 1 + 2) = (0, 3) and T(v) = (4 + 1, 2 − 1) = (5, 1).

    A common mix-up

    Any map that keeps straight lines straight is linear.

    In fact: a slide keeps lines straight but moves the origin, so it fails T(0) = 0.

  2. The matrix is the images of e₁ and e₂

    Build the matrix of a linear map from the images of e₁ and e₂ and use it to find any image.

    For our T, T(e₁) = (2, 1) and T(e₂) = (−1, 1); put them as columns, A = [[2, −1], [1, 1]], and then T(x) = Ax.

    A common mix-up

    The matrix of T is found by writing down its rows from the formula in any order.

    In fact: The columns are T(e₁) and T(e₂), in that order.

  3. What a linear map does to a grid

    Describe how a linear map sends a square grid to a grid of parallelograms and use this to tell linear maps from others.

    The grid point (i, j) goes to i(2, 1) + j(−1, 1) = (2i − j, i + j), so (2, 1) goes to (3, 3).

    A common mix-up

    A linear map can bend grid lines into curves.

    In fact: Linear maps keep lines straight and evenly spaced.

Try it

Is S(x, y) = (2x, y²) linear? Test it on one vector.Answer

No; S(0, 2) = (0, 4) but 2S(0, 1) = (0, 2)

Hint: Double the input (0, 1)

T is linear with T(e₁) = (0, 1) and T(e₂) = (−1, 0). Find T(2, 3).Answer

(−3, 2)

Hint: 2(0, 1) + 3(−1, 0)

Where does the grid point (1, 3) go under T?Answer

(−1, 4)

Hint: (2 − 3, 1 + 3)

Is T(u) + T(v) equal to T(u + v)?Answer

Yes; (0, 3) + (5, 1) = (5, 4).

Use the columns to find T(3, 2).Answer

3(2, 1) + 2(−1, 1) = (4, 5).

Linear transformations

30 minutes every month. No card.