Back to the on-screen lesson ·

Solving systems with matrices

A pair of simultaneous equations written as one matrix equation, solved with the inverse of a 2x2 matrix, and what a zero determinant says about the system.

Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.

1. What you will learn

In this lesson a pair of simultaneous equations becomes a single object. Written as $AX = B$, the whole system is one multiplication, and solving it is undoing that multiplication with the inverse matrix — a rule you can write down once and then apply to any system of the same size. You will build the inverse of a two-by-two matrix, use it to solve, and read the determinant for what it really says: not a step in the arithmetic, but the answer to whether the system has one solution at all.

2. What you bring to this

You can solve a pair of simultaneous equations by elimination or substitution, and you have just learned to multiply matrices and to compute a determinant. This lesson connects the two: the same pair of equations, written once as a single matrix equation, and solved by undoing a multiplication rather than by juggling the lines.

3. Words you will need

Coefficient matrix: the grid of numbers multiplying the unknowns.

Matrix equation: $AX = B$, with $X$ the column of unknowns and $B$ the column of constants.

Inverse matrix $A^{-1}$: the matrix with $A^{-1}A = AA^{-1} = I$.

Singular: having determinant zero, and therefore no inverse.

Consistent: having at least one solution.

Unique solution: exactly one — what an invertible coefficient matrix guarantees.

4. One equation instead of two

The system $$\begin{aligned} ax + by &= e\\ cx + dy &= f \end{aligned}$$ is the single matrix equation $AX = B$ with $A = \begin{pmatrix} a & b \\ c & d\end{pmatrix}$, $X = \begin{pmatrix} x \\ y\end{pmatrix}$ and $B = \begin{pmatrix} e \\ f\end{pmatrix}$: multiplying row by column reproduces the two lines exactly. If $A$ has an inverse, multiply on the left by it — the side $A$ is on — to get $X = A^{-1}B$, and that is the whole solution. For a $2\times2$ matrix the inverse is $$A^{-1} = \frac{1}{ad - bc}\begin{pmatrix} d & -b \\ -c & a\end{pmatrix}:$$ swap the main diagonal, negate the other, divide by the determinant. So $\begin{pmatrix} 2 & 1 \\ 1 & 1\end{pmatrix}$ has determinant $1$ and inverse $\begin{pmatrix} 1 & -1 \\ -1 & 2\end{pmatrix}$. When the determinant is zero there is no inverse and no unique solution: the rows are proportional, the two lines are parallel, and the system has either none (parallel and apart) or infinitely many (the same line twice). The determinant is therefore not a step in the calculation — it is the answer to whether the calculation is possible at all.

Another way: picture

Two pairs of axes. On the left, two lines crossing at a single marked point, with $\det A \ne 0$ written beneath. On the right, two parallel lines that never meet, with $\det A = 0$ beneath — the same picture the algebra is describing.

Another way: steps

  1. Write the system as $AX = B$, one row per equation.
  2. Compute $\det A = ad - bc$.
  3. If it is not zero, form $A^{-1}$ by swapping, negating and dividing, then multiply: $X = A^{-1}B$.
  4. If it is zero, decide between no solution and infinitely many by checking whether the constants are in the same ratio as the coefficients.
  5. Substitute the answer back into both original equations.

5. Three things that trip people up

"$X = B/A$." There is no division of matrices. You multiply by the inverse, and you must do it on the correct side: from $AX = B$ you get $X = A^{-1}B$, not $BA^{-1}$.

"Determinant zero means no solution." It means no unique solution. The two equations may describe the very same line, in which case there are infinitely many. Deciding which needs a look at the constants, not just at the determinant.

Forgetting the $\frac{1}{ad-bc}$. The inverse of $\begin{pmatrix} a & b \\ c & d\end{pmatrix}$ is $\frac{1}{ad-bc}\begin{pmatrix} d & -b \\ -c & a\end{pmatrix}$. Swapping and negating without dividing gives a matrix whose product with the original is $(ad-bc)I$, not $I$.

6. Solve $x + y = 5$, $x - y = 1$ with matrices

  1. $A = \begin{pmatrix} 1 & 1 \\ 1 & -1\end{pmatrix}$, $B = \begin{pmatrix} 5 \\ 1\end{pmatrix}$, and $\det A = -1 - 1 = -2 \ne 0$.

    A non-zero determinant promises exactly one solution.

  2. $A^{-1} = -\tfrac{1}{2}\begin{pmatrix} -1 & -1 \\ -1 & 1\end{pmatrix} = \begin{pmatrix} \tfrac12 & \tfrac12 \\ \tfrac12 & -\tfrac12\end{pmatrix}$.

    Swap, negate, divide.

  3. $X = A^{-1}B = \begin{pmatrix} \tfrac52 + \tfrac12 \\ \tfrac52 - \tfrac12\end{pmatrix} = \begin{pmatrix} 3 \\ 2\end{pmatrix}$, so $x = 3$, $y = 2$ — and both equations check out.

7. Why $2x + 4y = 6$, $3x + 6y = 10$ has no solution

  1. $\det\begin{pmatrix} 2 & 4 \\ 3 & 6\end{pmatrix} = 12 - 12 = 0$, so there is no unique solution.

    Singular, so decide between the two remaining cases.

  2. The coefficients are in the ratio $2:3$ but the constants are $6:10$, which is not $2:3$. The lines are parallel and apart: no solution at all.

8. Your turn: the inverse of $\begin{pmatrix} 3 & 1 \\ 5 & 2\end{pmatrix}$

  1. The determinant is $6 - 5 = 1$, so there is nothing to divide by.

  2. Your turn: work this step out. Its working is at the end of the packet.

    Swap the main diagonal and negate the other: $\begin{pmatrix} 2 & -1 \\ -5 & 3\end{pmatrix}$.

9. Guided practice

Solve the system $5x + 4y = 28$ and $x + 4y = 12$.

x = x, y = y

10. Guided practice

Enter the inverse of $\begin{pmatrix} 7 & 3 \\ 2 & 1 \end{pmatrix}$.

This task has no paper form; do it on a device.

11. Practice

For which value of $k$ does $\begin{pmatrix} 3 & 7 \\ 6 & k \end{pmatrix}$ fail to have an inverse?

Answer:

12. Practice

The coefficient matrix of a system of two equations in two unknowns has determinant zero. What follows about the system?

13. Practice

$A$ is invertible and $AX = B$. Which of these is $X$?

14. Somewhere new

A café sells only tea and coffee. One receipt shows $6$ teas and $5$ coffees for $22$ pounds. A second shows $12$ teas and $10$ coffees for $44$ pounds. Can the two prices be worked out from these receipts?

15. Somewhere new

A blender takes $x$ scoops of oats and $y$ scoops of nuts. Every scoop of oats adds $4$ g of fibre and $2$ g of fat; every scoop of nuts adds $1$ g of fibre and $3$ g of fat. The finished mix is measured at $16$ g of fibre and $28$ g of fat. How many scoops of each went in?

oats = x scoops, nuts = y scoops

16. Lesson test

Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.

17. Test question

Solve the system $2x + 4y = 2$ and $3x + 4y = -3$.

x = x, y = y

18. What you can do now

You can solve a two-by-two system with matrices and say what a zero determinant means. From memory: why is the solution of $AX = B$ written $A^{-1}B$ and not $BA^{-1}$, and what are the two things a zero determinant leaves open?

Working for the steps left to you

8. Your turn: the inverse of $\begin{pmatrix} 3 & 1 \\ 5 & 2\end{pmatrix}$, step 2