Every matrix gives a linear transformation. The surprise is the converse: every linear transformation from $\mathbb{R}^n$ to $\mathbb{R}^m$ is multiplication by some matrix, and that matrix is easy to find.
Key idea
Why it works
Worked example: From a formula
- $T(\mathbf{e}_1) = T(1, 0) = (2, 1, 0)$ and $T(\mathbf{e}_2)$ $= T(0, 1)$ $= (-1, 3, -1)$.
- Use them as columns: $A = \begin{bmatrix} 2 & -1 \\ 1 & 3 \\ 0 & -1 \end{bmatrix}$, a $3 \times 2$ matrix (from $\mathbb{R}^2$ to $\mathbb{R}^3$).
- Check: $A\begin{bmatrix} x_1 \\ x_2 \end{bmatrix} = \begin{bmatrix} 2x_1 - x_2 \\ x_1 + 3x_2 \\ -x_2 \end{bmatrix}$. ✓
Answer: $\begin{bmatrix} 2 & -1 \\ 1 & 3 \\ 0 & -1 \end{bmatrix}$
Worked example: From the images of other vectors
- Write $\mathbf{e}_1$ and $\mathbf{e}_2$ using $\mathbf{u} = (1, 1)$ and $\mathbf{v} = (1, 2)$: $\mathbf{e}_1 = 2\mathbf{u} - \mathbf{v}$ and $\mathbf{e}_2 = \mathbf{v} - \mathbf{u}$. (Check: $2(1,1) - (1,2) = (1, 0)$ and $(1,2) - (1,1) = (0, 1)$.)
- Linearity: $T(\mathbf{e}_1)$ $= 2\begin{bmatrix} 3 \\ 1 \end{bmatrix} - \begin{bmatrix} 4 \\ 3 \end{bmatrix}$ $= \begin{bmatrix} 2 \\ -1 \end{bmatrix}$ and $T(\mathbf{e}_2)$ $= \begin{bmatrix} 4 \\ 3 \end{bmatrix} - \begin{bmatrix} 3 \\ 1 \end{bmatrix}$ $= \begin{bmatrix} 1 \\ 2 \end{bmatrix}$.
- $A = \begin{bmatrix} 2 & 1 \\ -1 & 2 \end{bmatrix}$. Check: $A\begin{bmatrix} 1 \\ 1 \end{bmatrix} = \begin{bmatrix} 3 \\ 1 \end{bmatrix}$ ✓.
Answer: $\begin{bmatrix} 2 & 1 \\ -1 & 2 \end{bmatrix}$
Worked example: A map described in words
- $\mathbf{e}_1 = (1, 0, 0)$ turns to $(0, 1, 0)$; $\mathbf{e}_2 = (0, 1, 0)$ turns to $(-1, 0, 0)$; $\mathbf{e}_3 = (0, 0, 1)$ lies on the axis and stays put.
- Columns: $A = \begin{bmatrix} 0 & -1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix}$.
- Check: $A\begin{bmatrix} 2 \\ 3 \\ 5 \end{bmatrix} = \begin{bmatrix} -3 \\ 2 \\ 5 \end{bmatrix}$: the height $5$ is unchanged and $(2, 3)$ turned to $(-3, 2)$.
Answer: $\begin{bmatrix} 0 & -1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix}$
The size of the standard matrix is set by the map: $T: \mathbb{R}^n \to \mathbb{R}^m$ has $n$ columns (one per input direction $\mathbf{e}_j$) and $m$ rows (one per output entry). A formula like $T(x_1, x_2) = (\ldots, \ldots, \ldots)$ with three outputs always gives a $3 \times 2$ matrix.
Common mistake
Why "standard"? The matrix records $T$ using the standard basis $\mathbf{e}_1, \dots, \mathbf{e}_n$ to describe inputs and outputs. Later, in change of basis, we will describe the same map using other, better-suited directions and get a different (often much simpler) matrix for the same $T$.