Further Maths/Lessons/Matrices/Solving Systems of Equations Using Matrices
Core Pure · Matrices · Year 1

Solving Systems of Equations Using Matrices

A system of linear equations is one matrix equation in disguise — once you have the inverse, solving it is a single multiplication.

16 min read 5 worked examples

Writing a system as a matrix equation

Definition 23.1 — matrix form of a linear system

A system of linear equations can be written $A\mathbf{x}=\mathbf{b}$, where $A$ is the matrix of coefficients, $\mathbf{x}$ is the column vector of unknowns, and $\mathbf{b}$ is the column vector of constants. If $A$ is non-singular, pre-multiplying both sides by $A^{-1}$ gives $\mathbf{x}=A^{-1}\mathbf{b}$.

Exam technique

You must pre-multiply both sides by $A^{-1}$ (multiply on the left), since $A^{-1}A\mathbf{x}=I\mathbf{x}=\mathbf{x}$ only works that way round — post-multiplying gives $A\mathbf{x}A^{-1}$, which isn't even always defined and doesn't isolate $\mathbf{x}$.

Example 1 · A 2×2 system
Solve the system $2x+y=5$, $x-y=1$ using matrices.

Write as $A\mathbf{x}=\mathbf{b}$: $\begin{pmatrix}2&1\\1&-1\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}5\\1\end{pmatrix}$.

$\det(A)=2(-1)-1(1)=-3$, so $A^{-1}=\dfrac{1}{-3}\begin{pmatrix}-1&-1\\-1&2\end{pmatrix}$.

$$\begin{pmatrix}x\\y\end{pmatrix}=\frac{1}{-3}\begin{pmatrix}-1&-1\\-1&2\end{pmatrix}\begin{pmatrix}5\\1\end{pmatrix}=\frac{1}{-3}\begin{pmatrix}-6\\-3\end{pmatrix}=\begin{pmatrix}2\\1\end{pmatrix}$$

So $x=2$, $y=1$.

Example 2 · A 3×3 system
Solve the system below using $M^{-1}$, where $M=\begin{pmatrix}2&1&0\\1&1&1\\0&1&3\end{pmatrix}$ has inverse $M^{-1}=\begin{pmatrix}2&-3&1\\-3&6&-2\\1&-2&1\end{pmatrix}$ (found in the previous lesson). $$\begin{cases}2x+y=3\\x+y+z=4\\y+3z=7\end{cases}$$
$$\begin{pmatrix}x\\y\\z\end{pmatrix}=\begin{pmatrix}2&-3&1\\-3&6&-2\\1&-2&1\end{pmatrix}\begin{pmatrix}3\\4\\7\end{pmatrix}=\begin{pmatrix}2(3)-3(4)+1(7)\\-3(3)+6(4)-2(7)\\1(3)-2(4)+1(7)\end{pmatrix}=\begin{pmatrix}1\\1\\2\end{pmatrix}$$

So $x=1$, $y=1$, $z=2$. Checking: $2(1)+1=3$ ✓, $1+1+2=4$ ✓, $1+3(2)=7$ ✓.

When the coefficient matrix is singular

Interpreting det(A) = 0

If $\det(A)=0$, the matrix method breaks down — the system either has no solutions (inconsistent, e.g. parallel planes that never meet) or infinitely many solutions (the equations are dependent, e.g. one plane contains the intersection line of the other two). Distinguishing between these cases requires substituting back into the original equations or using row-reduction, not the inverse-matrix method.

Example 3 · Recognising a singular system
Show that the system $x+2y=5$, $2x+4y=9$ cannot be solved using an inverse matrix, and explain why.

$A=\begin{pmatrix}1&2\\2&4\end{pmatrix}$, $\det(A)=1(4)-2(2)=0$.

Since $A$ is singular, no inverse exists. Geometrically, the two lines $x+2y=5$ and $2x+4y=9$ are parallel (same gradient) but not identical, so they never meet — the system has no solution.

Example 4 · A 3×3 system with a real-world context
Three types of tickets cost $x$, $y$, $z$ pounds. Three separate group orders give the system below. Use the inverse $M^{-1}=\begin{pmatrix}2&-3&1\\-3&6&-2\\1&-2&1\end{pmatrix}$ of $M=\begin{pmatrix}2&1&0\\1&1&1\\0&1&3\end{pmatrix}$ to find the price of each ticket type. $$\begin{cases}2x+y=4\\x+y+z=5\\y+3z=10\end{cases}$$
$$\begin{pmatrix}x\\y\\z\end{pmatrix}=\begin{pmatrix}2&-3&1\\-3&6&-2\\1&-2&1\end{pmatrix}\begin{pmatrix}4\\5\\10\end{pmatrix}=\begin{pmatrix}2(4)-3(5)+1(10)\\-3(4)+6(5)-2(10)\\1(4)-2(5)+1(10)\end{pmatrix}=\begin{pmatrix}3\\-2\\4\end{pmatrix}$$

So $x=3$, $y=-2$, $z=4$. Since a negative ticket price makes no sense, this signals the model itself needs revisiting — a useful reminder that solving the algebra correctly is not the same as the answer being realistic in context.

Example 5 · Recognising infinitely many solutions
Show that the system $x-y=2$, $2x-2y=4$ does not have a unique solution, and determine whether it is consistent.

$A=\begin{pmatrix}1&-1\\2&-2\end{pmatrix}$, $\det(A)=1(-2)-(-1)(2)=-2+2=0$, so $A$ is singular and the inverse-matrix method cannot be used.

The second equation is exactly twice the first ($2x-2y=2(x-y)=2(2)=4$), so every $(x,y)$ satisfying $x-y=2$ satisfies both equations — the two lines are identical. The system is consistent with infinitely many solutions (the whole line $x-y=2$), rather than being inconsistent.

Theorem 23.2 — the singular case in general

When $\det(A)=0$ for a linear system, there is no unique solution. For two variables this means the corresponding lines are either parallel and distinct (no solution) or the same line (infinitely many solutions). For three variables, the corresponding planes fail to meet at a single point — they may form a prism-like arrangement with no common point (no solution), or intersect along a shared line or coincide entirely (infinitely many solutions). Distinguishing the two singular cases always requires checking the equations directly, not just the determinant.

Exam-style questions

Question 1 6 marks

Solve the system $3x+2y=16$, $x-y=2$ using matrices.

$A=\begin{pmatrix}3&2\\1&-1\end{pmatrix}$, $\det(A)=3(-1)-2(1)=-5$ (M1, A1)

$A^{-1}=\dfrac{1}{-5}\begin{pmatrix}-1&-2\\-1&3\end{pmatrix}$ (M1)

$\begin{pmatrix}x\\y\end{pmatrix}=\dfrac{1}{-5}\begin{pmatrix}-1&-2\\-1&3\end{pmatrix}\begin{pmatrix}16\\2\end{pmatrix}=\dfrac{1}{-5}\begin{pmatrix}-20\\-10\end{pmatrix}=\begin{pmatrix}4\\2\end{pmatrix}$ (M1, A1)

$x=4$, $y=2$ (A1)

Question 2 4 marks

Using $M^{-1}=\begin{pmatrix}2&-3&1\\-3&6&-2\\1&-2&1\end{pmatrix}$, solve $M\mathbf{x}=\begin{pmatrix}5\\6\\10\end{pmatrix}$.

$\begin{pmatrix}x\\y\\z\end{pmatrix}=\begin{pmatrix}2(5)-3(6)+1(10)\\-3(5)+6(6)-2(10)\\1(5)-2(6)+1(10)\end{pmatrix}=\begin{pmatrix}2\\1\\3\end{pmatrix}$ (M1, A1, A1)

$x=2$, $y=1$, $z=3$ (A1)

Question 3 5 marks

Show that the system $2x-y=4$, $-6x+3y=-8$ has no solution, giving a geometric reason.

$\det\begin{pmatrix}2&-1\\-6&3\end{pmatrix}=2(3)-(-1)(-6)=6-6=0$ (M1, A1)

Since the determinant is $0$, no inverse exists; the two lines have the same gradient (parallel) but different intercepts, so they never meet and the system has no solution. (B1, B1, B1)