M5.6.8 Chapter 8
Inverse matrices and equations
Can a matrix be undone, the way subtracting undoes adding?
Your guess
Pick one before you read on. It is fine to be wrong.
By the end you can
- Find the inverse of a 2 by 2 matrix
- Solve two simultaneous equations with an inverse matrix
With numbers, you undo multiplying by 5 by multiplying by 1/5. The two together give 1. A matrix works the same way. The inverse of a square matrix A is the matrix A⁻¹ with A A⁻¹ = I and A⁻¹ A = I, where I is the identity matrix. Doing A and then A⁻¹ changes nothing, so A⁻¹ undoes A.
For a 2 × 2 matrix with rows (a, b) and (c, d), there is a short rule. Swap a and d. Change the signs of b and c. Then divide every entry by the determinant ad − bc. So A⁻¹ = (1 ÷ (ad − bc)) times the matrix with rows (d, −b) and (−c, a).
Why does this work? Multiply A by the matrix with the swapped entries and the changed signs, and see what you get. The picture does it for one matrix. The product is not I, but twice I. The number 2 is the determinant. Dividing by it leaves I. In general the product is (ad − bc) times I, which is why we divide by the determinant.
Worked example
Find the inverse of the matrix A with rows (4, 3) and (1, 2).
- The determinant is not 0, so the inverse exists. It is ad − bc = 4 × 2 − 3 × 1 = 5.
- Swap a and d: the diagonal becomes 2 and 4. Change the signs of b and c: they become −3 and −1.
- This gives the matrix with rows (2, −3) and (−1, 4).
- Divide every entry by 5. The inverse has rows (0.4, −0.6) and (−0.2, 0.8).
- Check the top left entry of A A⁻¹: 4 × 0.4 + 3 × (−0.2) = 1. It is the top left entry of the identity.
Answer: The inverse has rows (0.4, −0.6) and (−0.2, 0.8).
Notice what a zero determinant does. The rule divides by ad − bc, which cannot be done when it is 0. A matrix with determinant 0 squashes the plane onto a line, as we saw in the last chapter. Two different points land on the same place, and no matrix can tell them apart again. So a singular matrix has no inverse.
Now to the main use. Two simultaneous equations such as 2x + y = 8 and x + y = 5 can be written as one matrix equation. The coefficients make a matrix, the unknowns make a column vector, and the right hand sides make another column vector. The matrix times the vector (x, y) gives (8, 5).
If the matrix is A, the vector of unknowns is v, and the right hand side is c, then A v = c. Multiply both sides on the left by A⁻¹. Since A⁻¹ A = I and I v = v, we get v = A⁻¹ c. The inverse is on the left of c, the same side that it was written on in the first step.
Worked example
Solve 2x + y = 8 and x + y = 5 with an inverse matrix.
- Write the equations as a matrix equation: the matrix with rows (2, 1) and (1, 1) times (x, y) equals (8, 5).
- The determinant is 2 × 1 − 1 × 1 = 1, so the inverse exists.
- The inverse has rows (1, −1) and (−1, 2).
- Then (x, y) = the inverse times (8, 5). The top number is 1 × 8 + (−1) × 5 = 3.
- The bottom number is −1 × 8 + 2 × 5 = 2.
- So x = 3 and y = 2. Check in the first equation: 2 × 3 + 1 × 2 = 8.
Answer: x = 3 and y = 2
Worked example
Solve 4x + 3y = 10 and x + 2y = 5, using the inverse found above.
- The matrix is the one with rows (4, 3) and (1, 2), and the right hand side is (10, 5). We found its inverse: rows (0.4, −0.6) and (−0.2, 0.8).
- The top number is 0.4 × 10 + (−0.6) × 5 = 1.
- The bottom number is −0.2 × 10 + 0.8 × 5 = 2.
- So x = 1 and y = 2. Check in the second equation: 1 + 2 × 2 = 5.
Answer: x = 1 and y = 2
What if the determinant is 0? Then there is no inverse, and the method stops. Look at x + 2y = 5 and 2x + 4y = 6. The matrix has determinant 1 × 4 − 2 × 2 = 0. The second equation is 2 times x + 2y = 3, but the first says x + 2y = 5. The equations disagree, so there is no solution. Their lines are parallel.
See it three ways
With things
A seller packs a small basket with 2 mangoes and 1 papaya, and a large basket with 4 mangoes and 3 papayas. An order needs 20 mangoes and 12 papayas in all. How many baskets of each kind should be packed?
As a picture
In words
The matrix packs baskets into fruit. The inverse unpacks the fruit into baskets. The determinant is 2 × 3 − 4 × 1 = 2, so the inverse exists, and it gives 6 small baskets and 2 large ones.
In symbols
If A v = c, then v = A⁻¹ c. Here the inverse has rows (1.5, −2) and (−0.5, 1), and v = (6, 2).
Try it
Move a triangle and move it back
You need: squared paper, a ruler, a pencil.
- Draw axes. Mark the corners (1, 0), (3, 0), (1, 1) of a triangle.
- Use the matrix with rows (0, −2) and (2, 0) on each corner. For example, (1, 0) goes to (0, 2). Mark the three image points and join them.
- Now use the inverse, with rows (0, 0.5) and (−0.5, 0), on each image point. The point (0, 2) should go back to (1, 0).
- Compare the last three points with the first three.
What you will see: Every point comes back to where it started. The inverse has undone the matrix.
A wrong idea many people have
To find the inverse of a matrix, replace each entry by 1 divided by it.
Why it feels right: The inverse of the number 5 is 1/5, so the inverse of a matrix of numbers seems to be a matrix of such inverses.
The test that breaks it: Take A with rows (4, 3) and (1, 2). Replacing each entry by 1 divided by it gives rows (0.25, 0.333) and (1, 0.5). The top left entry of the product is 4 × 0.25 + 3 × 1 = 4, and the identity needs 1.
What is true: The inverse is found with the determinant: swap a and d, change the signs of b and c, and divide by ad − bc. Check any inverse by multiplying: A A⁻¹ must be I.
A wrong idea many people have
Every square matrix has an inverse.
Why it feels right: Every non-zero number has an inverse, so every non-zero matrix seems to have one.
The test that breaks it: Take the matrix with rows (1, 2) and (2, 4). It is not the zero matrix, but its determinant is 0. The formula needs a division by 0, which cannot be done. It squashes the unit square onto a line, so two points share an image.
What is true: A matrix has an inverse only when its determinant is not 0. A non-zero matrix with determinant 0 is singular and has no inverse.
Key words
- inverse
- the matrix A⁻¹ that undoes A, so that A A⁻¹ = A⁻¹ A = I.
- singular
- a matrix with determinant 0, which has no inverse.
- matrix equation
- an equation A v = c, where A is a matrix and v and c are column vectors.
- identity matrix
- the matrix I with 1s on the diagonal and 0s elsewhere, which leaves a matrix unchanged.
Back to your guess
The answer is B: The matrix with rows (0, −1) and (1, 0) turns the plane 90° anticlockwise. A turn of 90° clockwise undoes it.
To undo a turn of 90° anticlockwise you turn 90° clockwise. The matrix for that has rows (0, 1) and (−1, 0). The two matrices multiply to the identity: rows (1, 0) and (0, 1). The matrix that undoes another is its inverse, and this chapter shows how to find it and use it.
Check yourself
Try each one before you look. A wrong answer tells you where to go next.
What is the inverse of the matrix with rows (3, 2) and (4, 3)?
See the answer
rows (3, −2) and (−4, 3)
The determinant is 3 × 3 − 2 × 4 = 1. Swap a and d, change the signs of b and c, and divide by 1: rows (3, −2) and (−4, 3).
- If you chose A: This is the matrix itself. Its product with itself is not the identity. Read this page again.
- If you chose B: You changed the signs of the diagonal and kept the signs of the other two. Swap the diagonal, and change the signs of b and c. Read this page again.
- If you chose D: This swaps the rows and columns, which is a different operation. The inverse swaps a and d and changes the signs of b and c. Read this page again.
Which of these matrices has no inverse?
See the answer
rows (2, 3) and (4, 6)
The determinant of the matrix with rows (2, 3) and (4, 6) is 2 × 6 − 3 × 4 = 0. A matrix with determinant 0 has no inverse.
- If you chose B: Its determinant is −2, not 0, so it has an inverse. Read this page again.
- If you chose C: Its determinant is −2, not 0, so it has an inverse. Read this page again.
- If you chose D: Its determinant is 2, not 0, so it has an inverse. Read this page again.
A matrix has determinant 8. What is the determinant of its inverse?
See the answer
0.125
A and its inverse multiply to I, and the determinant of I is 1. Determinants multiply, so det A × det A⁻¹ = 1 and det A⁻¹ = 1 ÷ 8 = 0.125.
- If you chose A: This is the determinant of the matrix itself. Undoing a stretch of 8 in area shrinks areas by 8. Read this page again.
- If you chose B: The sign does not change. The matrix and its inverse both keep or both flip the shape. Read this page again.
- If you chose C: The determinant of the identity is 1, and that is the product of the two determinants, not the determinant of the inverse. Read this page again.
The picture shows the lines x + y = 7 and x + 2y = 10. What is the solution of the two equations?
See the answer
x = 4 and y = 3
The solution is the point where the lines cross. As a check, the matrix with rows (1, 1) and (1, 2) has the inverse with rows (2, −1) and (−1, 1). The inverse times (7, 10) is (4, 3).
- If you chose A: These are the right hand sides of the equations, not the solution. The solution is the point where the two lines cross. Read this page again.
- If you chose C: You may have swapped x and y. Read the x number first: it is how far along the x axis the point P is. Read this page again.
- If you chose D: Check it in the equations: this point is not on both lines. Read this page again.
From an earlier chapter
A matrix has determinant −2 and moves a shape with area 7 cm². What is the area of the image?
See the answer
14 cm²
The area is multiplied by |−2| = 2, so it becomes 2 × 7 = 14 cm².
Find the inverse of the matrix with rows (7, 2) and (3, 1). Give the four entries of the inverse, row by row.
See the answer
rows (1, −2) and (−3, 7)
The determinant is 1. Swap the diagonal and change the signs of the others: rows (1, −2) and (−3, 7).
Solve 5x + 2y = 14 and 2x + y = 5 with an inverse matrix. Give x and y.
See the answer
x = 4 and y = −3
The matrix with rows (5, 2) and (2, 1) has determinant 1 and inverse rows (1, −2) and (−2, 5). The inverse times (14, 5) is (4, −3).
Find the inverse of the matrix with rows (2, 1) and (4, 3). Give the four entries of the inverse, row by row.
See the answer
rows (1.5, −0.5) and (−2, 1)
The determinant is 2 × 3 − 1 × 4 = 2. Swap the diagonal, change the signs of the others, and divide by 2: rows (1.5, −0.5) and (−2, 1).
A bundle P holds 3 sticks and 2 stones. A bundle Q holds 2 sticks and 1 stone. An order needs 16 sticks and 9 stones. Use an inverse matrix to find how many bundles of P and Q to pack.
See the answer
2 of P and 5 of Q
With p bundles of P and q of Q, 3p + 2q = 16 and 2p + q = 9. The determinant is −1 and the inverse is rows (−1, 2) and (2, −3). So (p, q) = (2, 5). Check: 3 × 2 + 2 × 5 = 16.
The equations are written as A v = c, and A has an inverse. Which line gives v?
See the answer
v = A⁻¹c
Multiply both sides of A v = c on the left by the inverse. A⁻¹ A v = A⁻¹ c, and A⁻¹ A = I, so v = A⁻¹ c. The inverse goes on the left.
- If you chose A: The inverse must multiply on the same side as A did, which is the left. Matrix multiplication depends on the order, so c A⁻¹ is not A⁻¹ c. Read this page again.
- If you chose C: There is no division of matrices. We multiply by the inverse instead. Read this page again.
Keep it
Copy this into your exercise book.
A A⁻¹ = I. For rows (a, b), (c, d): swap a and d, change signs of b and c, divide by ad − bc. No inverse if ad − bc = 0. A v = c gives v = A⁻¹ c.
Draw: Two lines crossing at a point, with the matrix equation written beside them.