To solve two simultaneous equations with matrices, write them as AX = B, find A⁻¹, and calculate X = A⁻¹B. The inverse must go on the left.
This lesson brings together reading order, multiplying matrices and finding the inverse. It belongs to the SPM Mathematics matrices chapter.
How do you set up the matrix equation?
Line up the equations so x and y have the same positions in each. Then collect coefficients.
For 3x + 2y = 13 and 4x + 3y = 18:
| 3 2 | | x | | 13 |
| 4 3 | | y | = | 18 |
Multiplying the left side gives 3x + 2y in row 1 and 4x + 3y in row 2, so the statement matches the equations. This is AX = B.
Worked example: solving it
A has rows (3, 2) and (4, 3). The determinant is 3(3) − 2(4) = 1.
So A⁻¹ has rows (3, −2) and (−4, 3).
Multiply both sides on the left: X = A⁻¹B.
- x = 3(13) + (−2)(18) = 39 − 36 = 3
- y = (−4)(13) + 3(18) = −52 + 54 = 2
So x = 3 and y = 2.
Check in the originals: 3(3) + 2(2) = 13, and 4(3) + 3(2) = 18. Both match.
Worked example from words
Two pens and three notebooks cost RM13. One pen and two notebooks cost RM8. Let p be the price of a pen and n the price of a notebook.
The equations are 2p + 3n = 13 and p + 2n = 8. The coefficient matrix has rows (2, 3) and (1, 2), with determinant 2(2) − 3(1) = 1.
The inverse has rows (2, −3) and (−1, 2). Then p = 2(13) − 3(8) = 2 and n = −1(13) + 2(8) = 3.
A pen costs RM2 and a notebook costs RM3. Check: 2(2) + 3(3) = 13, and 2 + 2(3) = 8.
The mistake that costs marks
The common slip is to put the inverse on the wrong side and write X = BA⁻¹. Here B is a 2 × 1 column and A⁻¹ is 2 × 2, so the product does not exist.
| Wrong | Right | |
|---|---|---|
| Step | X = BA⁻¹ | X = A⁻¹B |
| Orders | 2 × 1 times 2 × 2 | 2 × 2 times 2 × 1 |
| Result | Not defined | A 2 × 1 column (x, y) |
Checking the orders before multiplying would have caught it.
Check yourself
Solve 3x + y = 11 and 5x + 2y = 18 using matrices.
Answer
The coefficient matrix has rows (3, 1) and (5, 2). The determinant is 3(2) − 1(5) = 1.
The inverse has rows (2, −1) and (−5, 3).
x = 2(11) + (−1)(18) = 22 − 18 = 4. y = (−5)(11) + 3(18) = −55 + 54 = −1.
x = 4 and y = −1. Check: 3(4) + (−1) = 11, and 5(4) + 2(−1) = 18.
What to study next
Test all four matrix skills together in the matrices practice set. Try your own equations in the two-by-two matrix operations tutor, and log slips in the mistake log and paper-error review.
If you want a teacher to check your layout and working, see online one-to-one Mathematics tuition.