4.12 - Linear Transformations and Matrices
Overview
A linear transformation is a function whose inputs and outputs are vectors instead of numbers. It sends each vector in the plane to a new vector, using only constant multiples and sums of the input's components. The big idea of this topic is that every linear transformation of the plane is the same thing as multiplication by a matrix. That means one matrix multiplication can transform a single vector or a whole shape at once.
What makes a transformation linear
A transformation from to takes an input vector and returns an output vector. It's linear if each component of the output is a sum of constant multiples of the input components. In other words, it has this form, where , , , and are constants:
For example, is linear. Its first component is 3 times plus times , and its second is 1 times plus 4 times . A component can leave out a variable, since that's the same as a coefficient of 0, so is linear too.
Anything else breaks linearity:
Transformation | Linear? | Why |
Yes | Every term is a constant times or | |
Yes | Same form, with some coefficients equal to 0 | |
No | Adds constants (this is a translation) | |
No | isn't a constant times | |
No | Multiplies the inputs together | |
No | Applies a function to an input |
Linear transformations send zero to zero
Plug the zero vector into the general form:
So every linear transformation maps the zero vector to the zero vector. That gives a quick test: if , then isn't linear. For example, sends to , so it isn't linear.
The test only works in one direction. Passing it doesn't prove a transformation is linear: sends to but still isn't linear. Use the zero test to rule a transformation out, and check the form to rule it in.
Writing vectors as matrices
To use matrices, write each vector as a column. A vector in becomes a matrix:
A set of vectors becomes a matrix, with one vector in each column. The top row holds all the -components and the bottom row holds all the -components. For the three vectors , , and :
A point works the same way, as the vector from the origin to that point. That's how you transform a shape: write its vertices as the columns of a matrix.
The matrix of a linear transformation
Multiply a matrix by a vector written as a column and look at the result:
That's exactly the general form of a linear transformation. So for every linear transformation from to , there is a unique matrix with
To find , read off the coefficients. The first row holds the coefficients of the first output component, and the second row holds the coefficients of the second. In each row, the -coefficient comes first. The matrix is unique because those coefficients are fixed by the formula for .
It works the other way too: any matrix defines a linear transformation . So a linear transformation of the plane and a matrix are two descriptions of the same thing.
Example 1: From a formula to a matrix
Let . (a) Find the matrix for . (b) Find using the formula and using the matrix.
(a) Read off the coefficients row by row:
(b) With the formula:
With the matrix:
Answer: and . The two methods agree, as they have to.
Example 2: Linear or not?
Decide whether each transformation is linear. If it is, give its matrix.
(a)
Each component is a constant times or , so it's linear. Write in the missing terms with 0 coefficients, , and read off the matrix:
(b)
Zero test: , which isn't the zero vector. Not linear.
(c)
Zero test: , so the test doesn't rule it out. But isn't a constant times , so isn't linear. Here's proof that no matrix can match it. and . For any matrix, doubling the input doubles the output, because . Doubling gives , not .
Transforming many vectors at once
Here's the payoff of writing vectors as columns. If is a matrix whose columns are input vectors, then is a matrix whose columns are the output vectors:
This works because column of comes from dotting the rows of with column of , which is exactly . The sizes check out: a matrix times a matrix gives a matrix. Keep the order , with the transformation matrix on the left.
Example 3: Transforming a triangle
A triangle has vertices , , and . The linear transformation is applied to the triangle.
- (a) Write the matrix for .
- (b) Use a single matrix product to find the images , , and of the three vertices.
- (c) Check with the formula for .
- (d) Where does the origin go?
(a) Read off the coefficients:
(b) Put the vertices in as the columns of a matrix and multiply:
Each column is one image: , , and .
(c) , which matches the second column.
(d) The origin goes to itself, , as it does under every linear transformation.

A linear transformation sends line segments to line segments, so for a triangle you only need to transform the three vertices and connect them.
Common mistakes
- Calling a translation linear. Adding a constant, like , breaks linearity. The zero test catches it.
- Trusting the zero test too much. Passing it doesn't prove linearity. Check that every term is a constant times or .
- Building the matrix sideways. The coefficients of the first output component go across the first row, not down the first column.
- Losing a missing variable. If a component has no term, its -coefficient is 0. Write the 0 instead of sliding the other numbers over.
- Writing input vectors as rows. Each input vector is a column of , with on top.
- Multiplying in the wrong order. The outputs are , not .