Dove's LibraryDove's Library

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 2×22 \times 2 matrix. That means one matrix multiplication can transform a single vector or a whole shape at once.

What makes a transformation linear

A transformation LL from R2\mathbb{R}^2 to R2\mathbb{R}^2 takes an input vector ⟨x,y⟩\langle x, y \rangle 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 aa, bb, cc, and dd are constants:
L(⟨x,y⟩)=⟨ax+by,  cx+dy⟩L(\langle x, y \rangle) = \langle ax + by, \; cx + dy \rangle
For example, L(⟨x,y⟩)=⟨3x−2y,  x+4y⟩L(\langle x, y \rangle) = \langle 3x - 2y, \; x + 4y \rangle is linear. Its first component is 3 times xx plus −2-2 times yy, and its second is 1 times xx plus 4 times yy. A component can leave out a variable, since that's the same as a coefficient of 0, so ⟨5y,  −x⟩\langle 5y, \; -x \rangle is linear too.
Anything else breaks linearity:
Transformation
Linear?
Why
⟨3x−2y,  x+4y⟩\langle 3x - 2y, \; x + 4y \rangle
Yes
Every term is a constant times xx or yy
⟨5y,  −x⟩\langle 5y, \; -x \rangle
Yes
Same form, with some coefficients equal to 0
⟨x+2,  y−1⟩\langle x + 2, \; y - 1 \rangle
No
Adds constants (this is a translation)
⟨x2,  y⟩\langle x^2, \; y \rangle
No
x2x^2 isn't a constant times xx
⟨xy,  y⟩\langle xy, \; y \rangle
No
Multiplies the inputs together
⟨sin⁡x,  y⟩\langle \sin x, \; y \rangle
No
Applies a function to an input

Linear transformations send zero to zero

Plug the zero vector into the general form:
L(⟨0,0⟩)=⟨a(0)+b(0),  c(0)+d(0)⟩=⟨0,0⟩L(\langle 0, 0 \rangle) = \langle a(0) + b(0), \; c(0) + d(0) \rangle = \langle 0, 0 \rangle
So every linear transformation maps the zero vector to the zero vector. That gives a quick test: if L(⟨0,0⟩)≠⟨0,0⟩L(\langle 0, 0 \rangle) \neq \langle 0, 0 \rangle, then LL isn't linear. For example, T(⟨x,y⟩)=⟨x+2,  y−1⟩T(\langle x, y \rangle) = \langle x + 2, \; y - 1 \rangle sends ⟨0,0⟩\langle 0, 0 \rangle to ⟨2,−1⟩\langle 2, -1 \rangle, so it isn't linear.
The test only works in one direction. Passing it doesn't prove a transformation is linear: ⟨x2,  y⟩\langle x^2, \; y \rangle sends ⟨0,0⟩\langle 0, 0 \rangle to ⟨0,0⟩\langle 0, 0 \rangle 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 ⟨x,y⟩\langle x, y \rangle in R2\mathbb{R}^2 becomes a 2×12 \times 1 matrix:
⟨x,y⟩⟷[xy]\langle x, y \rangle \quad \longleftrightarrow \quad \begin{bmatrix} x \\ y \end{bmatrix}
A set of nn vectors becomes a 2×n2 \times n matrix, with one vector in each column. The top row holds all the xx-components and the bottom row holds all the yy-components. For the three vectors ⟨1,1⟩\langle 1, 1 \rangle, ⟨3,1⟩\langle 3, 1 \rangle, and ⟨2,3⟩\langle 2, 3 \rangle:
[132113]\begin{bmatrix} 1 & 3 & 2 \\ 1 & 1 & 3 \end{bmatrix}
A point (x,y)(x, y) 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 2×22 \times 2 matrix by a vector written as a column and look at the result:
[abcd][xy]=[ax+bycx+dy]\begin{bmatrix} a & b \\ c & d \end{bmatrix}\begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} ax + by \\ cx + dy \end{bmatrix}
That's exactly the general form of a linear transformation. So for every linear transformation LL from R2\mathbb{R}^2 to R2\mathbb{R}^2, there is a unique 2×22 \times 2 matrix AA with
L(v⃗)=Av⃗L(\vec{v}) = A\vec{v}
To find AA, 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 xx-coefficient comes first. The matrix is unique because those coefficients are fixed by the formula for LL.
It works the other way too: any 2×22 \times 2 matrix AA defines a linear transformation L(v⃗)=Av⃗L(\vec{v}) = A\vec{v}. So a linear transformation of the plane and a 2×22 \times 2 matrix are two descriptions of the same thing.

Example 1: From a formula to a matrix

Let L(⟨x,y⟩)=⟨3x−2y,  x+4y⟩L(\langle x, y \rangle) = \langle 3x - 2y, \; x + 4y \rangle. (a) Find the matrix AA for LL. (b) Find L(⟨2,−1⟩)L(\langle 2, -1 \rangle) using the formula and using the matrix.
(a) Read off the coefficients row by row:
A=[3−214]A = \begin{bmatrix} 3 & -2 \\ 1 & 4 \end{bmatrix}
(b) With the formula:
L(⟨2,−1⟩)=⟨3(2)−2(−1),  2+4(−1)⟩=⟨8,−2⟩L(\langle 2, -1 \rangle) = \langle 3(2) - 2(-1), \; 2 + 4(-1) \rangle = \langle 8, -2 \rangle
With the matrix:
[3−214][2−1]=[3(2)+(−2)(−1)1(2)+4(−1)]=[8−2]\begin{bmatrix} 3 & -2 \\ 1 & 4 \end{bmatrix}\begin{bmatrix} 2 \\ -1 \end{bmatrix} = \begin{bmatrix} 3(2) + (-2)(-1) \\ 1(2) + 4(-1) \end{bmatrix} = \begin{bmatrix} 8 \\ -2 \end{bmatrix}
Answer: A=[3−214]A = \begin{bmatrix} 3 & -2 \\ 1 & 4 \end{bmatrix} and L(⟨2,−1⟩)=⟨8,−2⟩L(\langle 2, -1 \rangle) = \langle 8, -2 \rangle. 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) L(⟨x,y⟩)=⟨5y,  −x⟩L(\langle x, y \rangle) = \langle 5y, \; -x \rangle
Each component is a constant times xx or yy, so it's linear. Write in the missing terms with 0 coefficients, ⟨0x+5y,  −1x+0y⟩\langle 0x + 5y, \; -1x + 0y \rangle, and read off the matrix:
A=[05−10]A = \begin{bmatrix} 0 & 5 \\ -1 & 0 \end{bmatrix}
(b) T(⟨x,y⟩)=⟨x−2,  y+1⟩T(\langle x, y \rangle) = \langle x - 2, \; y + 1 \rangle
Zero test: T(⟨0,0⟩)=⟨−2,1⟩T(\langle 0, 0 \rangle) = \langle -2, 1 \rangle, which isn't the zero vector. Not linear.
(c) S(⟨x,y⟩)=⟨x+y,  y2⟩S(\langle x, y \rangle) = \langle x + y, \; y^2 \rangle
Zero test: S(⟨0,0⟩)=⟨0,0⟩S(\langle 0, 0 \rangle) = \langle 0, 0 \rangle, so the test doesn't rule it out. But y2y^2 isn't a constant times yy, so SS isn't linear. Here's proof that no matrix can match it. S(⟨0,1⟩)=⟨1,1⟩S(\langle 0, 1 \rangle) = \langle 1, 1 \rangle and S(⟨0,2⟩)=⟨2,4⟩S(\langle 0, 2 \rangle) = \langle 2, 4 \rangle. For any matrix, doubling the input doubles the output, because A(2v⃗)=2Av⃗A(2\vec{v}) = 2A\vec{v}. Doubling ⟨1,1⟩\langle 1, 1 \rangle gives ⟨2,2⟩\langle 2, 2 \rangle, not ⟨2,4⟩\langle 2, 4 \rangle.

Transforming many vectors at once

Here's the payoff of writing vectors as columns. If VV is a 2×n2 \times n matrix whose columns are nn input vectors, then AVAV is a 2×n2 \times n matrix whose columns are the nn output vectors:
A[v⃗1v⃗2⋯v⃗n]=[Av⃗1Av⃗2⋯Av⃗n]A\begin{bmatrix} \vec{v}_1 & \vec{v}_2 & \cdots & \vec{v}_n \end{bmatrix} = \begin{bmatrix} A\vec{v}_1 & A\vec{v}_2 & \cdots & A\vec{v}_n \end{bmatrix}
This works because column jj of AVAV comes from dotting the rows of AA with column jj of VV, which is exactly Av⃗jA\vec{v}_j. The sizes check out: a 2×22 \times 2 matrix times a 2×n2 \times n matrix gives a 2×n2 \times n matrix. Keep the order AVAV, with the transformation matrix on the left.

Example 3: Transforming a triangle

A triangle has vertices P(1,1)P(1, 1), Q(3,1)Q(3, 1), and R(2,3)R(2, 3). The linear transformation L(⟨x,y⟩)=⟨−2x+y,  x+y⟩L(\langle x, y \rangle) = \langle -2x + y, \; x + y \rangle is applied to the triangle.
  • (a) Write the matrix AA for LL.
  • (b) Use a single matrix product to find the images P′P', Q′Q', and R′R' of the three vertices.
  • (c) Check Q′Q' with the formula for LL.
  • (d) Where does the origin go?
(a) Read off the coefficients:
A=[−2111]A = \begin{bmatrix} -2 & 1 \\ 1 & 1 \end{bmatrix}
(b) Put the vertices in as the columns of a 2×32 \times 3 matrix VV and multiply:
AV=[−2111][132113]=[−2+1−6+1−4+31+13+12+3]=[−1−5−1245]AV = \begin{bmatrix} -2 & 1 \\ 1 & 1 \end{bmatrix}\begin{bmatrix} 1 & 3 & 2 \\ 1 & 1 & 3 \end{bmatrix} = \begin{bmatrix} -2 + 1 & -6 + 1 & -4 + 3 \\ 1 + 1 & 3 + 1 & 2 + 3 \end{bmatrix} = \begin{bmatrix} -1 & -5 & -1 \\ 2 & 4 & 5 \end{bmatrix}
Each column is one image: P′(−1,2)P'(-1, 2), Q′(−5,4)Q'(-5, 4), and R′(−1,5)R'(-1, 5).
(c) L(⟨3,1⟩)=⟨−2(3)+1,  3+1⟩=⟨−5,4⟩L(\langle 3, 1 \rangle) = \langle -2(3) + 1, \; 3 + 1 \rangle = \langle -5, 4 \rangle, which matches the second column.
(d) The origin goes to itself, ⟨0,0⟩\langle 0, 0 \rangle, as it does under every linear transformation.
4.12 - Linear Transformations and Matrices
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 ⟨x+2,  y⟩\langle x + 2, \; y \rangle, 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 xx or yy.
  • 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 yy term, its yy-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 VV, with xx on top.
  • Multiplying in the wrong order. The outputs are AVAV, not VAVA.

AP® is a registered trademark of the College Board, which is not affiliated with Dove's Library and was not involved in the production of, and does not endorse, this website.

Providing free, high-quality AP notes to help students succeed, earn college credit, and reach their educational goals, ensuring everyone has access to the resources they need.

© 2026 Standard Learning Group, Inc., which operates Dove's Library. All rights reserved.