Skip to content
SPM Tuition
Mathematics · Matrices

Solving simultaneous equations using matrices

You can find the inverse, but turning two equations into a matrix statement feels like a leap.

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.

Common questions

How do I write two equations as a matrix equation?

Put the coefficients of x and y in a 2 × 2 matrix, the unknowns x and y in a column, and the right-hand sides in another column. Multiplying out the left side must give back both original equations.

Why must I multiply the inverse on the left?

The unknown column is on the right of the coefficient matrix. To cancel that matrix you must place its inverse directly in front of it on both sides. Putting it behind gives a product that does not exist.

What if the determinant is zero?

Then the coefficient matrix has no inverse and this method fails. The equations have either no solution or infinitely many solutions. State that the determinant is zero.

Do I still need to check my answer?

Yes. Substitute x and y into both original equations. A check takes under a minute and catches sign slips in the inverse.

If you can solve the equations by elimination but lose the method marks here, a one-to-one Mathematics teacher can practise the matrix layout with you until it is automatic.

  • Online one-to-one lessons for your child with an experienced teacher.
  • Your first class is a one-hour trial, from RM50. The fee is agreed before you book.
  • Happy with the teacher? Continue with lessons of about 1.5 hours. If not, ask for another teacher.