Skip to content
EN - Language: English
MathematicsHigh school

Matrices as transformations - what a matrix does to the plane, step by step

· 16 min read

In short

A 2 × 2 matrix moves every point of the plane, sending (x, y) to (ax + by, cx + dy). Its columns show where the unit vectors e₁ and e₂ land, and the rest of the grid follows. The absolute value of the determinant ad − bc is the area scale factor, and a negative determinant means that figures are mirrored.

Words to know

Matrix
A table of numbers. A 2 × 2 matrix has two rows and two columns.
Unit vectors e₁ and e₂
e₁ = (1, 0) and e₂ = (0, 1) - one step along the x-axis and one step up the y-axis.
Linear transformation
A transformation given by a matrix. The origin stays put, and the square grid becomes a grid of equal parallelograms (or is squashed flat).
Unit square
The square with corners (0, 0), (1, 0), (1, 1) and (0, 1). Its area is 1.
Determinant
The number ad − bc for the matrix with rows (a b) and (c d). Its absolute value is the area scale factor - the number every area is multiplied by.
Orientation
Whether a figure is the right way round or mirrored. A negative determinant reverses it.

What do you think?

The matrix M=(21−11)M = \begin{pmatrix} 2 & 1 \\ -1 & 1 \end{pmatrix} moves the unit square, the square with corners (0,0)(0, 0), (1,0)(1, 0), (1,1)(1, 1) and (0,1)(0, 1). Its corners land on (0,0)(0, 0), (2,−1)(2, -1), (3,0)(3, 0) and (1,1)(1, 1). What is the area of the new figure?

The idea: a matrix moves the whole plane

A matrix is a table of numbers. A 2×22 \times 2 matrix has four of them, in two rows and two columns:

M=(abcd)M = \begin{pmatrix} a & b \\ c & d \end{pmatrix}

You can read it as a recipe for moving points: the point (x,y)(x, y) goes to the point (ax+by, cx+dy)(ax + by,\ cx + dy). Every point of the plane moves at the same time, so the whole plane is transformed. It can turn, stretch, slant or flip over.

The recipe is simpler than it looks. You only need to know where two arrows go: e1=(1,0)e_1 = (1, 0), one step along the xx-axis, and e2=(0,1)e_2 = (0, 1), one step up. Their new positions are the two columns of the matrix, and the rest of the grid follows.

Watch the grid change

Go through the animation step by step with the buttons or the arrow keys. The faint grid is the plane before the move, and the coloured grid shows where the matrix takes it. The arrows Me1Me_1 and Me2Me_2 are the images of e1e_1 and e2e_2 - where the matrix MM sends them.

-11234-112e₁e₂

M = matrix with rows 1; 0 and 0; 1·det M = 1

Step 1 of 7
Steps of the animation. Arrow keys move between steps.

This is the plane with its square grid. The arrows are e₁ = (1, 0) and e₂ = (0, 1). They are two sides of the unit square, which has area 1 and a flag inside.

Two arrows decide everything. Every point can be built from them, (x,y)=x e1+y e2(x, y) = x\,e_1 + y\,e_2, so once you know where e1e_1 and e2e_2 go, you know where every point goes.

Try it yourself: build a matrix

Set the four numbers of the matrix with the sliders. The left pair is the first column - where e1e_1 goes. The right pair is the second column - where e2e_2 goes. Watch the grid, the square and the flag, and read the determinant under the sliders.

-4-3-2-11234-3-2-1123Me₁Me₂
First column: where e₁ goes
a = 2
c = -1
Second column: where e₂ goes
b = 1
d = 1
the matrix M
matrix with rows 2; 1 and -1; 1
det M = ad − bc
2 · 1 − 1 · (-1) = 3
area of the image of the unit square
3
the flag
the right way round

Start from

What to notice:

  • the rotation by 90°90° and the shear change the square’s position or shape, but not its area: both have determinant 11,
  • the stretch (2001.5)\begin{pmatrix} 2 & 0 \\ 0 & 1.5 \end{pmatrix} multiplies every area by its determinant, 33,
  • the reflection (−1001)\begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix} has determinant −1-1: the area stays 11, but the flag is mirrored,
  • with parallel columns, such as (1,0.5)(1, 0.5) and (2,1)(2, 1), the determinant is 00 and the plane is flattened onto a line,
  • drag one column across the other: just as they line up, the determinant passes through 00, changes sign, and the flag flips over.

The definition

A matrix as a transformation. The matrix M=(abcd)M = \begin{pmatrix} a & b \\ c & d \end{pmatrix} sends the point (or vector) (x,y)(x, y) to

M(xy)=(ax+bycx+dy).M\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} ax + by \\ cx + dy \end{pmatrix}.

Each new coordinate is a row of the matrix times the vector: multiply the matching numbers and add them up.

The columns are the images of e₁ and e₂. Put in (1,0)(1, 0) and you get (a,c)(a, c), the first column. Put in (0,1)(0, 1) and you get (b,d)(b, d), the second. Every vector is x e1+y e2x\,e_1 + y\,e_2, so

M(xy)=x(ac)+y(bd).M\begin{pmatrix} x \\ y \end{pmatrix} = x\begin{pmatrix} a \\ c \end{pmatrix} + y\begin{pmatrix} b \\ d \end{pmatrix}.

To write down the matrix of a transformation, find where e1e_1 and e2e_2 go and write their images as columns.

Linearity. Such a transformation is linear: M(u+v)=Mu+MvM(\mathbf{u} + \mathbf{v}) = M\mathbf{u} + M\mathbf{v} and M(ku)=k MuM(k\mathbf{u}) = k\,M\mathbf{u} for every number kk. So the origin stays put. A line through the point p\mathbf{p} in the direction d\mathbf{d} is made of the points p+td\mathbf{p} + t\mathbf{d}, and they go to the points Mp+t MdM\mathbf{p} + t\,M\mathbf{d}. That is a line in the direction MdM\mathbf{d}, or a single point when Md=0M\mathbf{d} = \mathbf{0}. Parallel lines share their direction, so their images are parallel too - unless the whole plane is squashed onto one line.

The determinant. The number

det⁡M=ad−bc\det M = ad - bc

is the determinant of MM. Its absolute value ∣det⁡M∣|\det M| is the area of the image of the unit square - the parallelogram spanned by the two columns. Every other area is multiplied by the same number, so ∣det⁡M∣|\det M| is the area scale factor: a figure of area SS goes to a figure of area ∣det⁡M∣⋅S|\det M| \cdot S. The sign says more:

  • det⁡M>0\det M > 0: figures keep their orientation,
  • det⁡M<0\det M < 0: figures are mirrored,
  • det⁡M=0\det M = 0: the columns are parallel and the plane is squashed onto a line or a point. Such a transformation cannot be undone - MM has no inverse.

One transformation after another. Doing AA first and then BB is the transformation with matrix BABA - the one done first stands on the right. The order matters: usually BA≠ABBA \ne AB. First AA scales areas, then BB does, so det⁡(BA)=det⁡B⋅det⁡A\det(BA) = \det B \cdot \det A.

Example 1: the image of a triangle and its area

The matrix M=(21−13)M = \begin{pmatrix} 2 & 1 \\ -1 & 3 \end{pmatrix} moves the triangle with corners O=(0,0)O = (0, 0), A=(2,0)A = (2, 0) and B=(0,1)B = (0, 1). Where does the triangle go, and what is its new area?

Step 1. Find the image of A

We multiply each row of MM by the vector (2,0)(2, 0). The origin OO stays where it is.

M(20)=(2⋅2+1⋅0−1⋅2+3⋅0)=(4−2)\begin{aligned} M\begin{pmatrix} 2 \\ 0 \end{pmatrix} &= \begin{pmatrix} 2 \cdot 2 + 1 \cdot 0 \\ -1 \cdot 2 + 3 \cdot 0 \end{pmatrix} \\ &= \begin{pmatrix} 4 \\ -2 \end{pmatrix} \end{aligned}

Step 2. Find the image of B

The point B=(0,1)B = (0, 1) is e2e_2, so its image is the second column of MM.

M(01)=(13)M\begin{pmatrix} 0 \\ 1 \end{pmatrix} = \begin{pmatrix} 1 \\ 3 \end{pmatrix}

Step 3. Work out the determinant

We multiply along the diagonals and subtract.

det⁡M=2⋅3−1⋅(−1)=6+1=7\begin{aligned} \det M &= 2 \cdot 3 - 1 \cdot (-1) \\ &= 6 + 1 \\ &= \boxed{7} \end{aligned}

Step 4. Scale the area

The triangle OABOAB has a right angle at OO, base 22 and height 11, so its area is 11. The matrix multiplies every area by 77.

S=12⋅2⋅1=1S′=7⋅1=7\begin{aligned} S &= \tfrac{1}{2} \cdot 2 \cdot 1 = 1 \\ S' &= 7 \cdot 1 = 7 \end{aligned}

Answer

The image is the triangle with corners (0,0)(0, 0), (4,−2)(4, -2) and (1,3)(1, 3), and its area is 77. The determinant is positive, so the triangle is not mirrored.

Example 2: the matrix of a rotation by 90°

Find the matrix of the rotation through 90°90° anticlockwise about the origin.

Step 1. Find where e₁ goes

A quarter turn anticlockwise takes (1,0)(1, 0) on the xx-axis to (0,1)(0, 1) on the yy-axis.

e1=(10)→(01)e_1 = \begin{pmatrix} 1 \\ 0 \end{pmatrix} \to \begin{pmatrix} 0 \\ 1 \end{pmatrix}

Step 2. Find where e₂ goes

The same quarter turn takes (0,1)(0, 1) on the yy-axis to (−1,0)(-1, 0) on the negative xx-axis.

e2=(01)→(−10)e_2 = \begin{pmatrix} 0 \\ 1 \end{pmatrix} \to \begin{pmatrix} -1 \\ 0 \end{pmatrix}

Step 3. Write the images as columns

The image of e1e_1 is the first column, and the image of e2e_2 the second.

R=(0−110)\boxed{R = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}}

Step 4. Check the determinant

A rotation does not change areas and does not mirror anything, so its determinant must be 11.

det⁡R=0⋅0−(−1)⋅1=1\det R = 0 \cdot 0 - (-1) \cdot 1 = 1

Answer

R=(0−110)R = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}. It sends (x,y)(x, y) to (−y,x)(-y, x): every point makes a quarter turn anticlockwise about the origin.

Your turn

A transformation sends e1e_1 to (1,2)(1, 2) and e2e_2 to (−1,1)(-1, 1). Write down its matrix, find the image of the point (2,3)(2, 3) and say what the transformation does to areas.

Hintshow

The images of e1e_1 and e2e_2 are the columns. The point (2,3)(2, 3) is 2e1+3e22e_1 + 3e_2.

Solutiontry it on your own first

Step 1. Write the images as columns

The image of e1e_1 is the first column, and the image of e2e_2 the second.

N=(1−121)\boxed{N = \begin{pmatrix} 1 & -1 \\ 2 & 1 \end{pmatrix}}

Step 2. Find the image of the point

The point (2,3)(2, 3) is 2e1+3e22e_1 + 3e_2, so it goes to twice the first column plus three times the second.

N(23)=2(12)+3(−11)=(24)+(−33)=(−17)\begin{aligned} N\begin{pmatrix} 2 \\ 3 \end{pmatrix} &= 2\begin{pmatrix} 1 \\ 2 \end{pmatrix} + 3\begin{pmatrix} -1 \\ 1 \end{pmatrix} \\ &= \begin{pmatrix} 2 \\ 4 \end{pmatrix} + \begin{pmatrix} -3 \\ 3 \end{pmatrix} \\ &= \begin{pmatrix} -1 \\ 7 \end{pmatrix} \end{aligned}

Step 3. Work out the determinant

The determinant says what happens to areas.

det⁡N=1⋅1−(−1)⋅2=1+2=3\begin{aligned} \det N &= 1 \cdot 1 - (-1) \cdot 2 \\ &= 1 + 2 \\ &= 3 \end{aligned}

Answer

N=(1−121)N = \begin{pmatrix} 1 & -1 \\ 2 & 1 \end{pmatrix}, and the point (2,3)(2, 3) goes to (−1,7)(-1, 7). Every area is multiplied by 33, and since the determinant is positive, figures are not mirrored.

Common mistakes

  • Rows instead of columns. The images of e1e_1 and e2e_2 are the columns of the matrix. Written as rows, the rotation (0−110)\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} becomes (01−10)\begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix} - a rotation the other way.
  • “The order does not matter.” Take RR, the rotation by 90°90° anticlockwise, and F=(100−1)F = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}, the reflection in the xx-axis. Rotating first and then reflecting gives FR=(0−1−10)FR = \begin{pmatrix} 0 & -1 \\ -1 & 0 \end{pmatrix}, the reflection in the line y=−xy = -x. Reflecting first gives RF=(0110)RF = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, the reflection in y=xy = x.
  • “A negative determinant means a negative area.” An area is never negative. When det⁡M=−2\det M = -2, every area doubles and figures are mirrored.
  • “A determinant of 0 means a matrix full of zeros.” The matrix (2110.5)\begin{pmatrix} 2 & 1 \\ 1 & 0.5 \end{pmatrix} has no zero in it, yet its determinant is 2⋅0.5−1⋅1=02 \cdot 0.5 - 1 \cdot 1 = 0. Its columns are parallel, so it flattens the plane onto a line.

In exams and at university

In England, matrices are not part of A-level Mathematics, but they belong to the core content of A-level Further Mathematics that every exam board must include. Students use 2×22 \times 2 matrices for transformations of the plane, such as rotations, reflections, stretches and enlargements. They combine two transformations by multiplying their matrices, with the same rule as on this page: ABAB means BB first, then AA. They also interpret the determinant as the area scale factor, including its effect on orientation, and find invariant points and lines - points and lines that the transformation maps onto themselves. The unit vectors that this page calls e1e_1 and e2e_2 are written i\mathbf{i} and j\mathbf{j} at A-level.

In the United States, AP Precalculus ends with the unit Functions Involving Parameters, Vectors, and Matrices. In it, a 2×22 \times 2 matrix acts as a linear transformation of the plane, and the absolute value of its determinant shows how areas are scaled. That unit is not tested on the AP exam: teachers may include it, depending on state or local requirements.

At university, matrix transformations and determinants belong to a first course in linear algebra. In the open textbook Understanding Linear Algebra by David Austin, matrix transformations come in the second chapter, a few sections after the product of a matrix and a vector. The determinant follows in the third chapter, where it is defined as a signed area - the same picture as on this page.

Check yourself

Test yourself

Where does the matrix (3012)\begin{pmatrix} 3 & 0 \\ 1 & 2 \end{pmatrix} send e2e_2?

A figure has area 33. What is the area of its image under the matrix (2314)\begin{pmatrix} 2 & 3 \\ 1 & 4 \end{pmatrix}?

A matrix has determinant −2-2. What happens to areas and figures?

What is the image of the point (2,1)(2, 1) under the matrix (1203)\begin{pmatrix} 1 & 2 \\ 0 & 3 \end{pmatrix}?

For which kk does the matrix (2k13)\begin{pmatrix} 2 & k \\ 1 & 3 \end{pmatrix} flatten the plane onto a line?

Flashcards for review

Flip a card and say whether you knew the answer. The ones you did not know come back at the end of the deck. Why it pays to come back to them in a few days is explained in the guide Spaced repetition.

Flashcards

  1. Where does the matrix (abcd)\begin{pmatrix} a & b \\ c & d \end{pmatrix} send the point (x,y)(x, y)?

    To (ax+by, cx+dy)(ax + by,\ cx + dy).
  2. What are the columns of a 2×22 \times 2 matrix?

    The images of e1=(1,0)e_1 = (1, 0) and e2=(0,1)e_2 = (0, 1): the first column is where e1e_1 goes, and the second is where e2e_2 goes.
  3. How do you work out the determinant of (abcd)\begin{pmatrix} a & b \\ c & d \end{pmatrix}?

    det⁡=ad−bc\det = ad - bc
  4. What does ∣det⁡M∣|\det M| tell you?

    The area scale factor. The image of the unit square has area ∣det⁡M∣|\det M|, and a figure of area SS goes to one of area ∣det⁡M∣⋅S|\det M| \cdot S.
  5. What does a negative determinant mean?

    Figures are mirrored - the orientation is reversed. Areas are still multiplied by ∣det⁡M∣|\det M|.
  6. What does det⁡M=0\det M = 0 mean?

    The columns are parallel. The plane is squashed onto a line or a point, and MM has no inverse.
  7. What is the matrix of the rotation by 90°90° anticlockwise?

    (0−110)\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}. It sends (x,y)(x, y) to (−y,x)(-y, x).
  8. Which matrix stands for “first AA, then BB”?

    BABA - the one done first stands on the right. Usually BA≠ABBA \ne AB.
  9. What is det⁡(BA)\det(BA)?

    det⁡B⋅det⁡A\det B \cdot \det A - first AA scales areas, then BB does.

Sources

We checked the facts on this page against these sources. All of them may be reused freely: they carry an open licence or are not covered by copyright.

  1. David Austin - Understanding Linear Algebra, 2.2 Matrix multiplication and linear combinations (Ax is a combination of the columns; AB is not in general BA) · CC BY 4.0
  2. David Austin - Understanding Linear Algebra, 2.5 Matrix transformations (the j-th column is the image of eⱼ; the rotation by 90°; doing T and then S has the matrix BA) · CC BY 4.0
  3. David Austin - Understanding Linear Algebra, 2.6 The geometry of matrix transformations (linearity, the origin cannot move, the unit square and the grid, a shear, the order matters) · CC BY 4.0
  4. David Austin - Understanding Linear Algebra, 3.4 Determinants (ad − bc as a signed area, the area scale factor, orientation, det = 0 when the columns fold onto a line, det(AB) = det A · det B) · CC BY 4.0
  5. Ken Kuttler (Lyryx) - A First Course in Linear Algebra, 5.1 Linear Transformations (matrix transformations are linear) · CC BY 4.0
  6. Ken Kuttler (Lyryx) - A First Course in Linear Algebra, 5.2 The Matrix of a Linear Transformation I (the image of eᵢ is the i-th column) · CC BY 4.0
  7. Ken Kuttler (Lyryx) - A First Course in Linear Algebra, 5.4 Special Linear Transformations in R² (the rotation by 90°, the reflection in the x-axis, the order of the matrices) · CC BY 4.0
  8. Peter Selinger - Matrix Theory and Linear Algebra, 6.3-6.4 (the columns are the images of e₁ and e₂; the rotation by 90°, the reflection in y = x, a shear; doing S and then T has the matrix BA) and 7.5 (det(AB)) (PDF) · CC BY 4.0
  9. Jim Hefferon - Linear Algebra, Three.IV.2 Matrix Multiplication, Topic: Geometry of Linear Maps and Four.II.1 Determinants as Size Functions (composition is a product and is not commutative; lines go to lines; a shear keeps area; the sign shows orientation) (PDF) · CC BY-SA 2.5
  10. Wikibooks - Linear Algebra/Determinants as Size Functions (the determinant as an area, its sign and orientation, the same factor for every box) · CC BY-SA 4.0
  11. Wikibooks - Linear Algebra/Topic: Geometry of Linear Maps (a shear keeps area; a line goes to a line or a single point) · CC BY-SA 4.0
  12. Wikipedia - Transformation matrix (the columns are the images of the basis vectors; B(Ax) = (BA)x) · CC BY-SA 4.0
  13. Wikipedia - Determinant (ad − bc, area, orientation, invertible exactly when det ≠ 0, the determinant of a product) · CC BY-SA 4.0
  14. Wikipedia - Affine transformation (lines stay lines, parallel lines stay parallel) · CC BY-SA 4.0
  15. Wikipedia - Rotation matrix (the rotation by 90°, rotations have determinant 1) · CC BY-SA 4.0
  16. Wikipedia - Shear mapping (determinant 1, so area is preserved) · CC BY-SA 4.0
  17. Wikipedia - AP Precalculus (Unit 4, with vectors and matrices, is not tested on the exam) · CC BY-SA 4.0

More explainers