Solution of simultaneous equations using matrices
Learn to solve simultaneous equations using matrices for Year 11 Specialist Mathematics in Queensland (QCAA). A pair of linear equations is packaged as one matrix equation and solved using the inverse matrix.
You will find the determinant and inverse of a two-by-two matrix, solve the system in one step, and read the determinant to decide whether it has one solution, none, or infinitely many — groundwork for modelling with matrices.
Theory
A pair of simultaneous linear equations can be written in one matrix line \(AX=B\) and solved in a single step, \(X=A^{-1}B\). This is a core skill of Matrix arithmetic and algebra in Year 11 Specialist Mathematics (QCAA, Queensland). The determinant also reveals at once whether the system has one solution, none, or infinitely many.
A \(2\times2\) system such as \(ax+by=e\) and \(cx+dy=f\) can be packaged as a single matrix equation \(AX=B\).
The coefficient matrix \(A=\begin{pmatrix}a&b\\c&d\end{pmatrix}\) holds the coefficients, the variable matrix \(X=\begin{pmatrix}x\\y\end{pmatrix}\) holds the unknowns, and the constant matrix \(B=\begin{pmatrix}e\\f\end{pmatrix}\) holds the right-hand sides.
The determinant \(\det(A)=ad-bc\) decides whether \(A\) can be inverted. When \(\det(A)\neq0\), the inverse \(A^{-1}\) exists and the system has a unique solution \(X=A^{-1}B\) — the two lines cross at one point.
When \(\det(A)=0\) the matrix is singular: no inverse exists, and the lines are either parallel and distinct (no solution) or coincident (infinitely many solutions). Order matters: because matrix multiplication is not commutative, you must left-multiply, \(X=A^{-1}B\), not \(BA^{-1}\).
Write the system as a matrix equation:
The determinant and the inverse of a \(2\times2\) matrix:
Solve by left-multiplying by the inverse:
How to solve a system with matrices
- Write \(AX=B\): put the coefficients in \(A\), the unknowns in \(X\), and the constants in \(B\).
- Find the determinant \(\det(A)=ad-bc\). If it is zero, stop: there is no unique solution — check whether the lines are parallel (none) or coincident (infinitely many).
- Write the inverse \(A^{-1}=\dfrac{1}{ad-bc}\begin{pmatrix}d&-b\\-c&a\end{pmatrix}\): swap \(a\) and \(d\), negate \(b\) and \(c\), divide by the determinant.
- Multiply \(X=A^{-1}B\) and read off \(x\) and \(y\). Substitute back to check.
Write \(AX=B\), then find the determinant of \(A\):
| \(A\) | \(=\) | \(\begin{pmatrix}3&1\\1&2\end{pmatrix}\) |
| \(\det(A)\) | \(=\) | \((3)(2)-(1)(1)\) |
| \(=\) | \(5\) |
Write the inverse (swap 3 and 2, negate the off-diagonal, divide by 5):
| \(A^{-1}\) | \(=\) | \(\dfrac{1}{5}\begin{pmatrix}2&-1\\-1&3\end{pmatrix}\) |
Multiply \(X=A^{-1}B\):
| \(X\) | \(=\) | \(\dfrac{1}{5}\begin{pmatrix}2&-1\\-1&3\end{pmatrix}\begin{pmatrix}10\\5\end{pmatrix}\) |
| \(=\) | \(\dfrac{1}{5}\begin{pmatrix}20-5\\-10+15\end{pmatrix}\) | |
| \(=\) | \(\begin{pmatrix}3\\1\end{pmatrix}\) |
\(x=3,\ y=1\). Check: \(3(3)+1=10\) and \(3+2(1)=5\).
Find the determinant first:
| \(\det(A)\) | \(=\) | \((4)(5)-(3)(2)\) |
| \(=\) | \(20-6\) | |
| \(=\) | \(14\) |
Swap the leading diagonal, negate the other two, then divide by the determinant:
| \(A^{-1}\) | \(=\) | \(\dfrac{1}{14}\begin{pmatrix}5&-3\\-2&4\end{pmatrix}\) |
\(A^{-1}=\dfrac{1}{14}\begin{pmatrix}5&-3\\-2&4\end{pmatrix}\).
Let a pie cost \(x\) and a drink \(y\); form and solve \(AX=B\):
| \(2x+y\) | \(=\) | \(8,\quad x+3y=14\) |
| \(A\) | \(=\) | \(\begin{pmatrix}2&1\\1&3\end{pmatrix},\ \det(A)=6-1=5\) |
| \(X\) | \(=\) | \(\dfrac{1}{5}\begin{pmatrix}3&-1\\-1&2\end{pmatrix}\begin{pmatrix}8\\14\end{pmatrix}\) |
| \(=\) | \(\dfrac{1}{5}\begin{pmatrix}24-14\\-8+28\end{pmatrix}\) | |
| \(=\) | \(\begin{pmatrix}2\\4\end{pmatrix}\) |
A pie costs \(\$2\) and a drink costs \(\$4\).
A unique solution fails exactly when the coefficient determinant is zero:
| \(\det\begin{pmatrix}k&3\\2&1\end{pmatrix}\) | \(=\) | \((k)(1)-(3)(2)\) |
| \(=\) | \(k-6\) | |
| \(k-6\) | \(=\) | \(0\) |
| \(k\) | \(=\) | \(6\) |
\(k=6\); then the lines are parallel, so there is no unique solution.
Common pitfalls
Frequently asked questions
How do you solve simultaneous equations using matrices?
Write the system as \(AX=B\), find \(\det(A)\), form the inverse \(A^{-1}\), then compute \(X=A^{-1}B\) to get \(x\) and \(y\).
What does the determinant tell you about the solutions?
If \(\det(A)\neq0\) there is exactly one solution. If \(\det(A)=0\) the matrix is singular, so there is either no solution or infinitely many.
What is the inverse of a 2×2 matrix?
For \(A=\begin{pmatrix}a&b\\c&d\end{pmatrix}\), \(A^{-1}=\dfrac{1}{ad-bc}\begin{pmatrix}d&-b\\-c&a\end{pmatrix}\), provided \(ad-bc\neq0\).
Why must you write \(X=A^{-1}B\) and not \(BA^{-1}\)?
Matrix multiplication is not commutative. Left-multiplying \(AX=B\) by \(A^{-1}\) gives \(X=A^{-1}B\); the other order is not defined the same way and gives the wrong result.
How do you tell no solution from infinitely many when the determinant is zero?
Simplify both equations. If they reduce to the same line, there are infinitely many solutions (coincident); if they contradict, there is no solution (parallel and distinct).