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
Worked example: Using linearity
- Superposition: $T(3\mathbf{u} - 2\mathbf{v})$ $= 3T(\mathbf{u}) - 2T(\mathbf{v})$.
- $= 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
- (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.
- (b) $S(0, 0) = (1, 0) \neq (0, 0)$. A linear map must fix the origin, so $S$ is not linear.
- (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
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.
Key idea