A matrix is a transformation of space
A 2x2 matrix moves every point of the plane, and its two columns say where the basis arrows land. Linearity is why those four numbers settle everything else.
AssumesWhat is a vector? Arrows, lists of numbers, and adding themThe unit circle: sine and cosine as coordinates
Here is a matrix:
What does it do? A first course usually answers with a recipe. To multiply $A$ by a vector $(x, y)$, pair each row with the vector and add: the result is $(2x + 1y,\ 0x + 1y) = (2x + y,\ y)$. The recipe is correct and says nothing about why anyone would want it. It also hides a puzzle. The rule moves every point of the plane, infinitely many of them, and yet the whole rule is stored in four numbers. Most ways of moving the points of a plane cannot be stored in four numbers, or in four million. What is special about this kind?
We will find out by treating the recipe as what it is, a function that takes a vector in and gives a vector out, and watching what it does. I assume you know from the lesson on vectors that a vector in $\mathbb{R}^2$ is a pair of numbers drawn as an arrow from the origin, that vectors add component by component, that $c\,\mathbf{v}$ scales each component by $c$, and that $(x, y) = x\,\mathbf{i} + y\,\mathbf{j}$ where $\mathbf{i} = (1, 0)$ and $\mathbf{j} = (0, 1)$.
Feeding points to the rule
Call the function $T$, so that $T(x, y) = (2x + y,\ y)$. Before any theory, compute.
Pause and try
Find $T(1, 1)$, $T(-1, 2)$ and $T(2, -1)$. Plot each input and its output on grid paper. Then find $T(1, 0)$ and $T(0, 1)$ and compare them with the matrix $A$.
Show answerHide answer
$T(1, 1) = (2 + 1,\ 1) = (3, 1)$. $T(-1, 2) = (-2 + 2,\ 2) = (0, 2)$. $T(2, -1) = (4 - 1,\ -1) = (3, -1)$. Each point keeps its height and slides sideways. And $T(1, 0) = (2, 0)$, $T(0, 1) = (1, 1)$: these are the two columns of $A$, read downward.
What the grid keeps
Three things survive the move, and you can check each against the last step of the figure. The origin stays where it is, since $T(0, 0) = (0, 0)$. Straight grid lines land on straight lines. And lines that were parallel and evenly spaced are still parallel and evenly spaced, so the squares of the grid have all become copies of one parallelogram.
That last fact gives a way to find where any vector goes without touching the formula. A vector such as $(1, 2)$ is an address on the grid: one step along $\mathbf{i}$, then two steps along $\mathbf{j}$. If the grid moves as a whole and keeps its even spacing, the address should still be valid on the moved grid, read with the moved arrows.
Pause and try
Using only $T(\mathbf{i}) = (2, 0)$ and $T(\mathbf{j}) = (1, 1)$, predict where $(1, 2)$ lands. Then check with the formula $T(x, y) = (2x + y, y)$.
Show answerHide answer
One step of the moved $\mathbf{i}$ and two of the moved $\mathbf{j}$: $1\,(2, 0) + 2\,(1, 1) = (4, 2)$. The formula agrees: $T(1, 2) = (2 + 2,\ 2) = (4, 2)$.
So the two arrows $T(\mathbf{i})$ and $T(\mathbf{j})$ seem to control everything, which would explain how four numbers can describe the fate of every point. But the argument leaned on a phrase, “the grid moves as a whole and keeps its even spacing”, that we read off a picture. To turn it into a proof we have to say exactly which property of $T$ we used.
The property behind the picture
Look at what the prediction for $(1, 2)$ assumed. We split the input as $1\,\mathbf{i} + 2\,\mathbf{j}$ and claimed
Two separate things happened there. A sum inside $T$ became a sum outside, and a scalar inside $T$ became a scalar outside. Those are the two properties to demand.
In pictures, additivity says that a parallelogram with sides $\mathbf{u}$ and $\mathbf{v}$ is carried to the parallelogram with sides $T(\mathbf{u})$ and $T(\mathbf{v})$, diagonal to diagonal. Homogeneity says that points along a line through the origin keep their relative spacing: the point twice as far out lands twice as far out. Taking $c = 0$ in the second property gives $T(\mathbf{0}) = \mathbf{0}$, so a linear map always fixes the origin.
Plenty of reasonable-looking maps fail. The shift $S(x, y) = (x + 1, y)$ keeps every line straight, but $S(0, 0) = (1, 0)$, so it is not linear. A subtler failure is $N(x, y) = (x,\ y + 0.3x^2)$, which fixes the origin. Here $N(1, 0) = (1, 0.3)$ and $N(2, 0) = (2, 1.2)$, while homogeneity would require $N(2, 0) = 2\,N(1, 0) = (2, 0.6)$.
Our $T$ passes both tests, and the check is worth doing once by hand. For $\mathbf{u} = (u_1, u_2)$ and $\mathbf{v} = (v_1, v_2)$,
and $T(c\,\mathbf{v}) = (2cv_1 + cv_2,\ cv_2) = c\,(2v_1 + v_2,\ v_2) = c\,T(\mathbf{v})$. It worked because each output component is a sum of constant multiples of the inputs, with no squares, no products $xy$ and no added constants.
Two arrows determine everything
Now the observation from the grid can be proved, for every linear map at once.
The theorem says a linear map has no freedom left once $T(\mathbf{i})$ and $T(\mathbf{j})$ are chosen. Name the choices: say $T(\mathbf{i}) = (a, c)$ and $T(\mathbf{j}) = (b, d)$. Then
The recipe from the first paragraph has appeared on its own, and its four numbers are the components of the two landing spots. It remains to check that any four numbers are allowed.
The two theorems together say that linear maps of the plane and $2 \times 2$ matrices are the same objects in two notations. Every matrix gives a linear map $\mathbf{v} \mapsto A\mathbf{v}$, every linear map comes from a matrix, and different matrices give different maps because their columns are the images of $\mathbf{i}$ and $\mathbf{j}$.
This answers the puzzle from the start. Four numbers suffice because linearity is a severe restriction: once you know where two arrows go, additivity and homogeneity dictate the rest.
Reading and writing matrices
The key statement works in both directions. Given a matrix, read its columns to see the motion. Given a motion that you know to be linear, find where $\mathbf{i}$ and $\mathbf{j}$ go and write those down as columns.
That example used the claim that a rotation is linear, and the claim needs a reason. A rotation about the origin is a rigid motion: it carries every figure to a congruent figure. So it carries the parallelogram with sides $\mathbf{u}, \mathbf{v}$ and diagonal $\mathbf{u} + \mathbf{v}$ to a parallelogram with sides $R(\mathbf{u}), R(\mathbf{v})$, whose diagonal is therefore $R(\mathbf{u}) + R(\mathbf{v})$; that is additivity. And it carries the point $c$ times as far along a ray to the point $c$ times as far along the rotated ray (for negative $c$, along the opposite ray, which rotates to the opposite of the rotated ray), which is homogeneity. The argument is geometric: it rests on the properties of rigid motions, which we take as known from geometry, and it is complete once those are granted.
For a rotation by a general angle $\theta$, the unit circle supplies the columns. The point reached by turning $(1, 0)$ through $\theta$ is $(\cos\theta, \sin\theta)$ by the definition of cosine and sine. And $\mathbf{j}$ is a quarter turn ahead of $\mathbf{i}$, so it lands a quarter turn ahead of $(\cos\theta, \sin\theta)$, at $(-\sin\theta, \cos\theta)$, using the quarter-turn rule $(x, y) \mapsto (-y, x)$ from the example. Hence
Here are four more transformations to read from their columns.
Pause and try
Write down the matrix of (a) the reflection across the line $y = x$, which swaps the two coordinates of every point, and (b) the projection onto the horizontal axis, $(x, y) \mapsto (x, 0)$. For each, decide first where $\mathbf{i}$ and $\mathbf{j}$ land.
Show answerHide answer
(a) Swapping coordinates sends $\mathbf{i} = (1, 0)$ to $(0, 1)$ and $\mathbf{j} = (0, 1)$ to $(1, 0)$, so the matrix is $\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$. (b) $\mathbf{i}$ is already on the axis and stays at $(1, 0)$; $\mathbf{j}$ drops to $(0, 0)$. The matrix is $\begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix}$. Both appear in the last two steps of the next figure.
The procedure also works when the information given is about vectors other than $\mathbf{i}$ and $\mathbf{j}$.
Lines go to lines
We saw grid lines stay straight. The definition of linearity mentions sums and scalars, not lines, so this deserves a proof, and the proof shows the one way it can go wrong.
A line in the plane can be described by a point $\mathbf{p}$ on it and a nonzero direction vector $\mathbf{d}$: it is the set of all points $\mathbf{p} + t\,\mathbf{d}$ as $t$ runs through the real numbers.
The formula $T(\mathbf{p}) + t\,T(\mathbf{d})$ carries more than the statement. The parameter $t$ is unchanged, so equally spaced points on $L$ go to equally spaced points on the image. And two parallel lines share a direction $\mathbf{d}$, so their images share the direction $T(\mathbf{d})$ and are parallel as well. That is the even, parallel grid we observed.
The exceptional case really occurs. For the projection $P = \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix}$ from the last step of the gallery, $P(x, y) = (x, 0)$, so the direction $\mathbf{d} = \mathbf{j}$ has $P(\mathbf{d}) = \mathbf{0}$, and every vertical line is crushed to one point of the horizontal axis. So the accurate statement is “lines go to lines or to points”, and the second happens exactly for directions that the map sends to zero.
Step back to see what was hard. Computing a matrix times a vector was the easy part. The work was in finding the property, linearity, that makes the recipe inevitable and lets two arrows speak for a whole plane. From here on, a matrix can be read as a picture: look at the columns, imagine the grid following them. The next lesson uses that picture to explain what it means to multiply two matrices.
Check yourself
A linear map sends $\mathbf{i}$ to $(1, 3)$ and $\mathbf{j}$ to $(-2, 0)$. Where does it send $(2, 1)$?
Problems
The first three are direct practice, the next three need linearity used with some thought, and the last two ask for short proofs.
Problem 1
Let $M = \begin{pmatrix} 1 & 2 \\ 3 & -1 \end{pmatrix}$. Where does $M$ send $\mathbf{i}$ and $\mathbf{j}$? Compute $M(2, 1)$ and $M(-1, 3)$.
Show solutionHide solution
The columns give $M\mathbf{i} = (1, 3)$ and $M\mathbf{j} = (2, -1)$. Then $M(2, 1) = 2\,(1, 3) + 1\,(2, -1) = (4, 5)$ and $M(-1, 3) = -1\,(1, 3) + 3\,(2, -1) = (-1 + 6,\ -3 - 3) = (5, -6)$. By rows, as a check: $(1 \cdot 2 + 2 \cdot 1,\ 3 \cdot 2 - 1 \cdot 1) = (4, 5)$.
Problem 2
A linear map sends $\mathbf{i}$ to $(0, 2)$ and $\mathbf{j}$ to $(-1, 1)$. Write its matrix and find the image of $(3, 2)$.
Show solutionHide solution
The landing spots are the columns: $\begin{pmatrix} 0 & -1 \\ 2 & 1 \end{pmatrix}$. The image of $(3, 2)$ is $3\,(0, 2) + 2\,(-1, 1) = (-2,\ 6 + 2) = (-2, 8)$.
Problem 3
Describe in words what each matrix does to the plane: (a) $\begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix}$, (b) $\begin{pmatrix} 3 & 0 \\ 0 & 3 \end{pmatrix}$, (c) $\begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix}$.
Show solutionHide solution
(a) $\mathbf{i}$ goes to $(-1, 0)$ and $\mathbf{j}$ stays: $(x, y) \mapsto (-x, y)$, the reflection across the vertical axis. (b) Both basis vectors are tripled: $(x, y) \mapsto (3x, 3y)$, an enlargement by the factor 3 about the origin. (c) $\mathbf{i}$ goes to $(0, -1)$, pointing down, and $\mathbf{j}$ goes to $(1, 0)$, pointing right. Each has turned a quarter turn clockwise, so this is the rotation by $90^\circ$ clockwise, $(x, y) \mapsto (y, -x)$.
Problem 4
Decide whether each map is linear. If it is, give its matrix. If not, show a specific failure. (a) $T(x, y) = (3x - y,\ x)$. (b) $T(x, y) = (x + 2,\ y)$. (c) $T(x, y) = (xy,\ y)$. (d) $T(x, y) = (|x|,\ y)$.
Show solutionHide solution
(a) Linear: it has the form $(ax + by, cx + dy)$ with matrix $\begin{pmatrix} 3 & -1 \\ 1 & 0 \end{pmatrix}$. (b) Not linear: $T(0, 0) = (2, 0) \neq \mathbf{0}$. (c) Not linear: $T(1, 1) = (1, 1)$ but $T(2, 2) = (4, 2)$, which is not $2\,T(1, 1) = (2, 2)$. (d) Not linear: $T(1, 0) + T(-1, 0) = (1, 0) + (1, 0) = (2, 0)$, while $T\bigl((1, 0) + (-1, 0)\bigr) = T(0, 0) = (0, 0)$. Note that (d) fixes the origin and satisfies $T(c\,\mathbf{v}) = c\,T(\mathbf{v})$ for $c \geq 0$, yet additivity fails.
Problem 5
A linear map $T$ satisfies $T(2, 1) = (1, 4)$ and $T(1, 1) = (0, 3)$. Find its matrix.
Show solutionHide solution
Express the basis vectors through the known inputs. $\mathbf{i} = (2, 1) - (1, 1)$, so $T(\mathbf{i}) = (1, 4) - (0, 3) = (1, 1)$. And $\mathbf{j} = (1, 1) - \mathbf{i}$, so $T(\mathbf{j}) = (0, 3) - (1, 1) = (-1, 2)$. The matrix is $\begin{pmatrix} 1 & -1 \\ 1 & 2 \end{pmatrix}$. Check: it sends $(2, 1)$ to $(2 - 1,\ 2 + 2) = (1, 4)$ and $(1, 1)$ to $(1 - 1,\ 1 + 2) = (0, 3)$.
Problem 6
Write the matrix of the rotation by $60^\circ$ counterclockwise. Find the images of $(2, 0)$ and $(0, 2)$, and verify that both images have length 2.
Show solutionHide solution
With $\cos 60^\circ = \frac12$ and $\sin 60^\circ = \frac{\sqrt3}{2}$, the matrix is $\begin{pmatrix} \frac12 & -\frac{\sqrt3}{2} \\ \frac{\sqrt3}{2} & \frac12 \end{pmatrix}$. The image of $(2, 0)$ is twice the first column, $(1, \sqrt3)$, of length $\sqrt{1 + 3} = 2$. The image of $(0, 2)$ is twice the second column, $(-\sqrt3, 1)$, of length $\sqrt{3 + 1} = 2$. A rotation changes no lengths, as expected.
Problem 7
Find the equation of the image of the line $y = x + 1$ under $A = \begin{pmatrix} 2 & 1 \\ 0 & 1 \end{pmatrix}$. Then find a line whose image under the projection $P = \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix}$ is the single point $(4, 0)$.
Show solutionHide solution
The line $y = x + 1$ passes through $\mathbf{p} = (0, 1)$ with direction $\mathbf{d} = (1, 1)$. Its image passes through $A\mathbf{p} = (1, 1)$ with direction $A\mathbf{d} = (3, 1)$, so it has slope $\frac13$ and equation $y - 1 = \frac13(x - 1)$, that is, $y = \frac13 x + \frac23$. Check with another point: $(1, 2)$ is on the original line and goes to $(4, 2)$, and $\frac43 + \frac23 = 2$. For the second part we need a direction with $P\mathbf{d} = \mathbf{0}$; since $P(x, y) = (x, 0)$, that means $\mathbf{d} = (0, 1)$ up to scaling, a vertical line. The vertical line $x = 4$ consists of the points $(4, t)$, all of which go to $(4, 0)$.
Problem 8
Let $T$ be a linear map of $\mathbb{R}^2$ whose two columns $T(\mathbf{i})$ and $T(\mathbf{j})$ are not parallel. Prove that $T$ never sends two different vectors to the same place. (Use the fact from the lesson on vectors: if two vectors are not parallel, the only combination $a\,\mathbf{u} + b\,\mathbf{v}$ equal to $\mathbf{0}$ is the one with $a = b = 0$.) What goes wrong for the projection $P$ of the previous problem?
Show solutionHide solution
Suppose $T(\mathbf{v}) = T(\mathbf{w})$. By linearity $T(\mathbf{v} - \mathbf{w}) = T(\mathbf{v}) + T(-\mathbf{w}) = T(\mathbf{v}) - T(\mathbf{w}) = \mathbf{0}$. Write $\mathbf{v} - \mathbf{w} = (x, y)$. Then $\mathbf{0} = T(x, y) = x\,T(\mathbf{i}) + y\,T(\mathbf{j})$. Since $T(\mathbf{i})$ and $T(\mathbf{j})$ are not parallel, they form a basis, and $\mathbf{0}$ has only the one expression $0\,T(\mathbf{i}) + 0\,T(\mathbf{j})$; hence $x = y = 0$, so $\mathbf{v} = \mathbf{w}$. For $P$ the columns are $(1, 0)$ and $(0, 0)$, which are parallel because the zero vector is a multiple of anything. The argument breaks at the last step, and indeed $P(4, 1) = P(4, 2) = (4, 0)$.