Linear AlgebraLinear Transformations

Linear Transformations

T(u + v) = T(u) + T(v) and T(cu) = cT(u).

Not started Jump to practice

Multiplying by a matrix turns vectors into vectors: $\mathbf{x} \mapsto A\mathbf{x}$. In the matrix equation we saw that this respects sums and multiples. Now we turn that property into a definition and study the maps themselves.

A transformation (function, map) $T: \mathbb{R}^n \to \mathbb{R}^m$ assigns to each $\mathbf{x}$ in $\mathbb{R}^n$ (the domain) a vector $T(\mathbf{x})$ in $\mathbb{R}^m$ (the codomain). $T$ is linear if, for all vectors $\mathbf{u}, \mathbf{v}$ and scalars $c$, $$T(\mathbf{u} + \mathbf{v}) = T(\mathbf{u}) + T(\mathbf{v}) \quad \text{and} \quad T(c\mathbf{u}) = cT(\mathbf{u}).$$ Every matrix map $T(\mathbf{x}) = A\mathbf{x}$ is linear.

Why it works

Two consequences follow straight from the definition. First, $T(\mathbf{0}) = \mathbf{0}$: since $\mathbf{0} = 0\cdot\mathbf{0}$, we get $T(\mathbf{0})$ $= T(0\cdot\mathbf{0})$ $= 0\cdot T(\mathbf{0})$ $= \mathbf{0}$. Second, superposition: $T(c_1\mathbf{v}_1 + \cdots + c_p\mathbf{v}_p)$ $= c_1T(\mathbf{v}_1) + \cdots + c_pT(\mathbf{v}_p)$. So a linear map is completely known once you know what it does to a few vectors that build everything else.
A linear map of the plane keeps the origin fixed and keeps grid lines straight, parallel and evenly spaced.

Worked example: Using linearity

$T$ is linear, $T(\mathbf{u}) = \begin{bmatrix} 1 \\ 4 \end{bmatrix}$ and $T(\mathbf{v}) = \begin{bmatrix} -2 \\ 3 \end{bmatrix}$. Find $T(3\mathbf{u} - 2\mathbf{v})$.
  1. Superposition: $T(3\mathbf{u} - 2\mathbf{v})$ $= 3T(\mathbf{u}) - 2T(\mathbf{v})$.
  2. $= 3\begin{bmatrix} 1 \\ 4 \end{bmatrix} - 2\begin{bmatrix} -2 \\ 3 \end{bmatrix}$ $= \begin{bmatrix} 3 \\ 12 \end{bmatrix} - \begin{bmatrix} -4 \\ 6 \end{bmatrix}$ $= \begin{bmatrix} 7 \\ 6 \end{bmatrix}$.

Answer: $\begin{bmatrix} 7 \\ 6 \end{bmatrix}$

Worked example: Testing three maps

Which are linear? (a) $T(x, y) = (x + 2y,\ 3x)$; (b) $S(x, y) = (x + 1,\ y)$; (c) $R(x, y) = (xy,\ x)$.
  1. (a) Each output is a fixed combination of $x$ and $y$ with no constant, so $T(\mathbf{x}) = \begin{bmatrix} 1 & 2 \\ 3 & 0 \end{bmatrix}\mathbf{x}$: linear.
  2. (b) $S(0, 0) = (1, 0) \neq (0, 0)$. A linear map must fix the origin, so $S$ is not linear.
  3. (c) $R(0, 0) = (0, 0)$, so test scaling: $R(2, 2) = (4, 2)$, but $2R(1, 1) = (2, 2)$. Not equal, so $R$ is not linear.

Answer: Only (a).

Common mistake

Calling a translation like $S(\mathbf{x}) = \mathbf{x} + \mathbf{b}$ (with $\mathbf{b} \neq \mathbf{0}$) linear. It moves every point the same way and looks harmless, but it moves the origin: $S(\mathbf{0}) = \mathbf{b}$. Quick check for any formula: plug in $\mathbf{0}$ first. If you do not get $\mathbf{0}$, the map is not linear. (If you do get $\mathbf{0}$, you still need to check sums and multiples, as in (c).)

The set of all outputs $T(\mathbf{x})$ is the range of $T$. For $T(\mathbf{x}) = A\mathbf{x}$, the range is the span of the columns of $A$. The range can be smaller than the codomain: the map $T(x, y) = (x + y, 2x + 2y)$ goes from $\mathbb{R}^2$ to $\mathbb{R}^2$, but every output lies on the line where the second entry is twice the first.

Why the name? A linear map sends lines to lines (or squashes them to a point): the line $\mathbf{p} + t\mathbf{v}$ goes to $T(\mathbf{p}) + tT(\mathbf{v})$, which is again a line, or a single point if $T(\mathbf{v}) = \mathbf{0}$. Equally spaced points along a line stay equally spaced. That is the "evenly spaced grid" you see in the picture.

Linear maps are everywhere: rotating a picture, converting currencies, mixing ingredients in fixed proportions, and the "linear approximation" of a smooth function in calculus, which is a linear map plus a constant.

Key idea

A map is linear when it respects sums and scalar multiples. Then it sends $\mathbf{0}$ to $\mathbf{0}$ and turns combinations into the same combinations of the outputs. Matrix maps $\mathbf{x} \mapsto A\mathbf{x}$ are linear; translations are not.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 2 XP.

Loading practice…

Builds on

Leads to

Sources and further reading

  • Margalit and Rabinoff, Interactive Linear Algebra (Georgia Tech), §3.1 Matrix Transformations and §3.3 Linear Transformations
  • MIT OpenCourseWare 18.06 Linear Algebra (Gilbert Strang, Spring 2010), Lecture 30: Linear Transformations and Their Matrices
@teddyrookbook GitHub