MathsMatrices › Matrix algebra and transformations

Matrix algebra and transformations

Grids of numbers with their own arithmetic, and a second life as movements of space. Rotations, reflections, stretches and enlargements all fit in a handful of entries.

Builds on Vectors in two dimensions and Graphs, proportion and transformations.

IN THIS TOPIC

  • Add and multiply matrices, respecting the size rules and the order of factors.
  • Use the zero and identity matrices, and say why AB = 0 does not force A or B to be zero.
  • Read a transformation matrix from the images of the unit vectors.
  • Identify and construct rotations, reflections, stretches and enlargements in the plane.
  • Write down the standard 3 × 3 reflections in coordinate planes and rotations about axes.

COMMON MISCONCEPTION

Matrix multiplication, like ordinary multiplication, gives the same answer in either order.

An arithmetic for grids

A matrix is a rectangular grid of numbers, added entry by entry when the shapes match. Multiplication is stranger and far more useful. The entry in row i, column j of AB comes from row i of A paired with column j of B, products summed. AB exists only when A has as many columns as B has rows.

WORKED EXAMPLE

A product, row by column

For A with rows (2, 1), (0, 3) and B with rows (1, 4), (2, 5), find AB and BA.

AB: top-left is 2 × 1 + 1 × 2 = 4; top-right 2 × 4 + 1 × 5 = 13; the bottom row gives 6 and 15. So AB has rows (4, 13), (6, 15).

BA: the same recipe gives rows (2, 13), (4, 17).

AB ≠ BA. Matrix multiplication does not commute in general; only special pairs commute.

The identity matrix I, ones on the diagonal and zeros elsewhere, multiplies like the number 1, so AI = IA = A. It is the do-nothing grid, and it anchors the inverse in the next lesson.

The zero matrix 0 has every entry zero. It behaves as you would hope under addition, since A + 0 = A, and it swallows products, since A0 = 0A = 0. One familiar rule does not survive the move. With numbers, ab = 0 forces a or b to be zero. With matrices it forces nothing.

WORKED EXAMPLE

A zero product from two matrices that are not zero

Let A have rows (1, 1), (1, 1) and let B have rows (1, 1), (−1, −1). Find AB.

Top-left is 1 × 1 + 1 × (−1) = 0, and every other entry works out the same way, so AB is the zero matrix.

Neither factor is the zero matrix. Both are singular, and in the 2 × 2 case that is what makes a zero product possible.

BA has rows (2, 2), (−2, −2), so the order matters here too.

The consequence is a rule you must not use. AB = 0 does not let you conclude A = 0 or B = 0, though it does constrain the pair: A must send every column of B to zero, which is why both factors here are singular. AB = AC does not let you cancel the A either, unless A is known to be invertible; multiply by A⁻¹ and the cancellation becomes legitimate.

Matrices that move the plane

A 2 × 2 matrix acts on column vectors, and the action is a linear transformation. The origin stays put and straight lines stay straight. The matrix also wears its own description openly, because its first column is the image of i and its second is the image of j. Watch where the two unit vectors go and the matrix writes itself.

Rotation by 90 degrees anticlockwise, matrix rows (0, -1) and (1, 0): the unit square swings into the second quadrant(1, 0) → (0, 1)beforeafter
FIG. 1Rotation by 90° anticlockwise sends i to (0, 1) and j to (−1, 0); those images are the columns of the matrix.

The standard catalogue follows from that one fact. Rotation anticlockwise by θ about the origin has columns (cos θ, sin θ) and (−sin θ, cos θ). Reflection in y = x swaps the unit vectors, so its columns are (0, 1) and (1, 0). Reflection in y = −x swaps them and negates both, giving columns (0, −1) and (−1, 0). Enlargement by scale factor k about the origin is k times the identity, and k is allowed to be negative.

A stretch parallel to the x-axis with scale factor a multiplies every x coordinate by a and leaves y untouched. So i lands on (a, 0), j does not move, and the matrix has rows (a, 0) and (0, 1). A stretch parallel to the y-axis is the mirror image of that argument, with rows (1, 0) and (0, b). Apply both and you get rows (a, 0) and (0, b), which is an enlargement in the one case where a and b agree.

A stretch parallel to the x-axis, scale factor 2, with matrix rows (2, 0) and (0, 1): the unit square doubles in width and keeps its heightbeforeafterdet = 2(1, 1) → (2, 1)
FIG. 2A stretch parallel to the x-axis with scale factor 2: i doubles to (2, 0), j stays at (0, 1), and the unit square becomes a rectangle of area 2.

The determinant ad − bc measures what a transformation does to area, and it puts a number on the whole catalogue: areas scale by its absolute value, while its sign records orientation. The x-stretch has determinant a, so areas scale by |a|. Enlargement by k has determinant k², because both directions grow at once. Rotations have determinant 1 and reflections have determinant −1, area preserved either way, with the minus sign recording that a reflection reverses orientation.

GUIDED PRACTICE

From picture to matrix

Write down the matrices for reflection in y = −x, and for the stretch parallel to the y-axis with scale factor 3. Give the area scale factor of each.

Show the working

Reflection in y = −x sends i to (0, −1) and j to (−1, 0), so the matrix has rows (0, −1) and (−1, 0). Its determinant is 0 × 0 − (−1)(−1) = −1, so areas are unchanged and the orientation flips.

The stretch leaves i at (1, 0) and sends j to (0, 3), so the matrix has rows (1, 0) and (0, 3). Its determinant is 3, so areas triple.

Both answers came from the same two questions. Where does i go, and where does j go.

Composition is multiplication

Applying transformation B and then transformation A is the single transformation with matrix AB. The right-hand factor acts first, because it sits next to the vector in ABv. Order matters exactly because multiplication does not commute, so a rotation followed by a reflection generally lands somewhere different from the reflection followed by the rotation. Candidates who write the matrices in reading order lose the accuracy mark and often the follow-through too.

Into three dimensions

The syllabus keeps 3 × 3 transformations to a short list, and every one of them is again read off the images of i, j and k. Reflection in the plane x = 0 negates the first coordinate, giving the diagonal matrix diag(−1, 1, 1), and reflections in y = 0 and z = 0 negate the second and third instead. Rotation about the z-axis leaves k alone and rotates the x and y coordinates, so it is the familiar 2 × 2 rotation sitting in the top-left corner with a 1 in the bottom-right.

Rotation about the x-axis works the same way in the lower-right corner. Rotation about the y-axis is the awkward one, because its sine signs sit the opposite way round, with rows (cos θ, 0, sin θ), (0, 1, 0) and (−sin θ, 0, cos θ). Check any of them by rotating a unit vector through 90° and seeing whether the answer points where your right hand says it should.

ASSESSMENT FOCUS

  • Check sizes before multiplying. A product taken the wrong way round may not even exist.
  • Quote the columns-are-images fact when building a matrix; it justifies the answer in one line.
  • Describing a stretch needs the direction and the scale factor. The word alone is incomplete.
  • For combined transformations, write the first-applied matrix on the right.
  • Rotation matrices in the booklet are anticlockwise. A clockwise question uses −θ, so the sine signs flip.
  • Cancel a matrix off both sides of an equation only once it is known to be invertible. AB = AC forces B = C only when A has an inverse.

CHECK YOURSELF

Find the single matrix for reflection in y = x followed by enlargement, scale factor 3, about the origin.

Show a hint

Write the enlargement matrix on the left of the reflection matrix.

Show the answer

The reflection has rows (0, 1), (1, 0), and the enlargement is 3I with rows (3, 0), (0, 3). The composite is (3I)(reflection), with rows (0, 3), (3, 0). Each unit vector is swapped and then tripled.

A matrix's columns are the images of the unit vectors, so a stretch parallel to the axes reads as rows (a, 0) and (0, b) and the size of the determinant gives the area scale factor.

Doing B then A is the product AB, with the first-applied matrix nearest the vector.

In 3-D, reflections in coordinate planes flip one sign; rotations put a 2 × 2 rotation into the other two coordinates.

AB = 0 does not make A or B zero, so cancelling a matrix off both sides needs that matrix to be invertible.

WORKBOOK

Printable practice for this topic: original exam-style questions with room to work, and a fully worked answer book. Free to use; please do not redistribute or sell.

7 questions on this topicAnswer them one at a time and mark yourself against the worked answer.Practise this topic

Or read them with their worked answers on the matrix algebra and transformations questions page.

CHECK YOUR PROGRESS

Rate how confident you feel with each objective for this lesson. Ratings are saved in this browser, on this device, unless you sign in.

  • Add and multiply matrices, respecting the size rules and the order of factors.
  • Use the zero and identity matrices, and say why AB = 0 does not force A or B to be zero.
  • Read a transformation matrix from the images of the unit vectors.
  • Identify and construct rotations, reflections, stretches and enlargements in the plane.
  • Write down the standard 3 × 3 reflections in coordinate planes and rotations about axes.

Open the full revision checklist to see every objective in the course in one place.