Solving Systems with Matrices (AI HL)
Any system of linear equations can be written as a single matrix equation \(A\mathbf x = \mathbf b\), and then solved in one step by multiplying both sides by \(A^{-1}\). This page covers that method - including what to do when \(A\) turns out to have no inverse - with worked examples and the mistakes that lose the most marks. It's part of the broader Matrices topic.
11 questions on this sub-topic.
Solving \(A\mathbf x = \mathbf b\)
Covered under IB syllabus reference AHL1.14: writing a system of linear equations as \(A\mathbf{x}=\mathbf{b}\) and solving using the inverse matrix - in examinations \(A\) is always invertible.
Solving a linear system
\(A\mathbf{x}=\mathbf{b}\ \Rightarrow\ \mathbf{x}=A^{-1}\mathbf{b}\)
Not listed separately in the formula booklet - it's a direct application of the inverse-matrix definition above. Set up \(A\) and \(\mathbf b\) carefully, then let your GDC compute \(A^{-1}\mathbf b\).
Singular matrices
\[\det A = 0 \Rightarrow A^{-1}\text{ does not exist}\]
A singular matrix has no inverse, and the corresponding system of equations has no unique solution - it is either inconsistent or has infinitely many solutions.
Need the full syllabus wording and formula-booklet reference table? See Matrices. GDC key sequences for matrix mode live in the Matrices GDC section.
Worked examples
Three unknowns \(x,\ y,\) and \(z\) satisfy the equations below. By finding the inverse of the coefficient matrix, solve the system for \(x,\ y,\) and \(z.\)
\(\begin{cases} x + y + z = 6 \\ x - y + 2z = 7 \\ 2x + y - z = 2 \end{cases}\)
Worked solution
Coefficient matrix \(A = \begin{pmatrix}1&1&1\\1&-1&2\\2&1&-1\end{pmatrix},\ \mathbf b\) M1
\(= \begin{pmatrix}6\\7\\2\end{pmatrix}.\) A1
\(\mathbf x = A^{-1}\mathbf b\) M1
\(= (2,1,3).\) A1
A message is encoded two letters at a time using the matrix \(E=\begin{pmatrix}2&3\\1&2\end{pmatrix}\) (with A = 1, B = 2, ..., Z = 26). Each pair of letters is written as a column vector and multiplied by \(E.\) The encoded pairs received are \((29,15)\) and \((64,36).\)
(a) Find \(E^{-1}.\)
(b) Decode the message.
Worked solution
(a) \(\det E = 2(2)-3(1) = 1\) M1
\(E^{-1} = \begin{pmatrix}2&-3\\-1&2\end{pmatrix}.\) A1
(b) \(E^{-1}\begin{pmatrix}29\\15\end{pmatrix} = \begin{pmatrix}2(29)-3(15)\\-1(29)+2(15)\end{pmatrix} = \begin{pmatrix}13\\1\end{pmatrix}\) M1
\((13,1) \to\) M, A. A1
\(E^{-1}\begin{pmatrix}64\\36\end{pmatrix} = \begin{pmatrix}2(64)-3(36)\\-1(64)+2(36)\end{pmatrix} = \begin{pmatrix}20\\8\end{pmatrix}\) M1
\((20,8) \to\) T, H, so the decoded message is MATH. A1
Common mistakes
- Multiplying \(A^{-1}\mathbf b\) in the wrong order. Matrix multiplication is non-commutative - it must be \(A^{-1}\mathbf b\), not \(\mathbf b A^{-1}\), which usually isn't even a valid multiplication for a column vector.
- Missing a sign or entry when reading off the system into \(A\) and \(\mathbf b\). Write each equation in the same variable order first (\(x,y,z\)) before copying coefficients across, so nothing gets transposed by accident.
- Not checking \(\det A \neq 0\) before trusting a unique solution. If the determinant comes out as zero, the system does not have a single \(A^{-1}\mathbf b\) answer - it's either inconsistent or has infinitely many solutions, and needs a different argument.
Ready to practise properly?
11 systems-of-equations questions, marked instantly like the real exam.
Quick answers
How do you solve a system of equations using matrices?
Write the system as \(A\mathbf x=\mathbf b\), then solve for \(\mathbf x\) by computing \(\mathbf x = A^{-1}\mathbf b\). On an IB exam, \(A\) will always be invertible unless you are specifically solving for eigenvectors.
What does it mean if the coefficient matrix has determinant zero?
A determinant of zero means the matrix is singular and has no inverse, so the system has no unique solution - it is either inconsistent (no solutions) or dependent (infinitely many).