← // further maths

// further maths

Simultaneous Equations and Matrices

How to solve simultaneous equations using matrices

created February 9, 2026 updated May 31, 2026 2 min read

Overview

A system of simultaneous equations can be represented compactly using matrices. For example, the system:

{x+6y2z=216x2yz=162x+3y+5z=24}    [162621235][xyz]=[211624]\left\{ \begin{array}{l} -x + 6y - 2z = 21 \\ 6x - 2y - z = -16 \\ -2x + 3y + 5z = 24 \end{array} \right\} \iff \begin{bmatrix} -1 & 6 & 2 \\ 6 & -2 & -1 \\ -2 & 3 & 5 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} 21 \\ -16 \\ 24 \end{bmatrix}

Setting Up the Matrix Equation

Label each part of the equation separately:

A=[162621235],B=[xyz],C=[211624]A = \begin{bmatrix} -1 & 6 & 2 \\ 6 & -2 & -1 \\ -2 & 3 & 5 \end{bmatrix}, \qquad B = \begin{bmatrix} x \\ y \\ z \end{bmatrix}, \qquad C = \begin{bmatrix} 21 \\ -16 \\ 24 \end{bmatrix}

This gives us the matrix equation AB=CAB = C. Our goal is to solve for BB, which contains the unknowns xx, yy, and zz.

Rearranging for B

Multiplying both sides on the left by A1A^{-1}:

A1AB=A1CB=A1C\begin{aligned} A^{-1}AB &= A^{-1}C \\ B &= A^{-1}C \end{aligned}

Solving

Using the method for finding the inverse of a 3×33 \times 3 matrix:

A1=1189[736102891314934]B=1189[736102891314934][211624]=[142]\begin{aligned} A^{-1} &= \frac{1}{189}\begin{bmatrix} 7 & 36 & 10 \\ 28 & 9 & 13 \\ -14 & 9 & 34 \end{bmatrix} \\[10pt] \therefore B &= \frac{1}{189}\begin{bmatrix} 7 & 36 & 10 \\ 28 & 9 & 13 \\ -14 & 9 & 34 \end{bmatrix} \begin{bmatrix} 21 \\ -16 \\ 24 \end{bmatrix} \\[10pt] &= \begin{bmatrix} -1 \\ 4 \\ 2 \end{bmatrix} \end{aligned}

Therefore x=1x = -1, y=4y = 4, and z=2z = 2.