Matrix solution of larger systems
Master the matrix solution of larger systems for Year 12 Specialist Mathematics in Queensland (QCAA). A system of linear equations in several unknowns is written as one matrix equation \(A\mathbf{x}=\mathbf{b}\), then solved by the matrix method \(\mathbf{x}=A^{-1}\mathbf{b}\) for \(3\times3\) and larger systems.
You will learn to build the coefficient matrix, variable vector and constant vector, decide when the method applies using the determinant, rearrange the matrix-equation forms \(AX=B\), \(XA=B\) and \(AX+C=B\), and recognise the no-inverse case of a singular matrix — core skills of further matrices.
Theory
A system of linear equations in several unknowns can be written as a single matrix equation \(A\mathbf{x}=\mathbf{b}\). In Year 12 Specialist Mathematics (QCAA, Queensland) you solve larger systems (\(3\times3\) and beyond) by the matrix method \(\mathbf{x}=A^{-1}\mathbf{b}\), which works exactly when \(A\) is non-singular (\(\det A\neq0\)). This page shows how to set the system up, when the method applies, and what the no-inverse case means.
Every linear equation in \(x,y,z\) can be read as one row of a matrix product. A whole system of linear equations is therefore packed into a single matrix equation \(A\mathbf{x}=\mathbf{b}\), where \(A\) is the coefficient matrix (its rows are the coefficients of each equation), \(\mathbf{x}\) is the variable vector \((x,y,z)\), and \(\mathbf{b}\) is the constant vector of right-hand sides.
For a system in three unknowns \(A\) is \(3\times3\); for larger systems it is \(n\times n\). The equation \(A\mathbf{x}=\mathbf{b}\) is solved by the matrix method: if the inverse \(A^{-1}\) exists, left-multiply both sides to get \(\mathbf{x}=A^{-1}\mathbf{b}\). This is the unique solution.
The inverse \(A^{-1}\) exists exactly when \(A\) is non-singular, that is \(\det A\neq0\). Then the system has one unique solution — geometrically, three planes meeting at a single point. You find \(A^{-1}\) (and the product \(A^{-1}\mathbf{b}\)) with technology for \(3\times3\) and larger.
The no-inverse case: if \(\det A=0\) then \(A\) is singular, \(A^{-1}\) does not exist, and there is no unique solution — either no solution at all (inconsistent equations) or infinitely many. The same rearranging works for other matrix equations: \(XA=B\) gives \(X=BA^{-1}\), and \(AX+C=B\) gives \(X=A^{-1}(B-C)\), provided \(A^{-1}\) exists.
Write the system as a matrix equation, with the coefficients as the rows of \(A\):
If \(A\) is non-singular, left-multiply by \(A^{-1}\) to solve:
The same idea rearranges any matrix equation — watch which side \(A\) sits on, because matrix products do not commute:
How to solve a system by the matrix method
- Set up \(A\mathbf{x}=\mathbf{b}\): line up the equations in the same variable order, then read each equation's coefficients into a row of \(A\), the variables into \(\mathbf{x}\), and the right-hand sides into \(\mathbf{b}\).
- Check \(A\) is non-singular: find \(\det A\). If \(\det A=0\) stop — \(A^{-1}\) does not exist, so there is no unique solution (the no-inverse case).
- Solve \(\mathbf{x}=A^{-1}\mathbf{b}\): for a matrix equation of the form \(XA=B\) or \(AX+C=B\), rearrange first, keeping \(A^{-1}\) on the correct side; compute the inverse and product with technology.
- Read off and interpret: take the components of \(\mathbf{x}\) as the values of \(x,y,z\) and translate them back into the context.
Read each equation's coefficients, in the order \(x,y,z\), into a row of \(A\); the constants form \(\mathbf{b}\):
| \(3x+2y-z\) | \(=\) | \(4\ \Rightarrow\ (3,\ 2,\ -1)\) |
| \(x-y+2z\) | \(=\) | \(5\ \Rightarrow\ (1,\ -1,\ 2)\) |
| \(2x+y+z\) | \(=\) | \(7\ \Rightarrow\ (2,\ 1,\ 1)\) |
Assemble the coefficient matrix, variable vector and constant vector:
| \(A\) | \(=\) | \(\begin{pmatrix}3&2&-1\\1&-1&2\\2&1&1\end{pmatrix}\) |
| \(\mathbf{x}\) | \(=\) | \(\begin{pmatrix}x\\y\\z\end{pmatrix}\) |
| \(\mathbf{b}\) | \(=\) | \(\begin{pmatrix}4\\5\\7\end{pmatrix}\) |
\(\begin{pmatrix}3&2&-1\\1&-1&2\\2&1&1\end{pmatrix}\begin{pmatrix}x\\y\\z\end{pmatrix}=\begin{pmatrix}4\\5\\7\end{pmatrix}\).
Set up \(A\mathbf{x}=\mathbf{b}\) and check \(A\) is non-singular:
| \(A\) | \(=\) | \(\begin{pmatrix}2&1&1\\1&3&1\\1&1&2\end{pmatrix},\quad \mathbf{b}=\begin{pmatrix}7\\10\\9\end{pmatrix}\) |
| \(\det A\) | \(=\) | \(2(6-1)-1(2-1)+1(1-3)\) |
| \(=\) | \(10-1-2\) | |
| \(=\) | \(7\neq0\) |
A non-zero determinant means \(A^{-1}\) exists, so solve with technology:
| \(\mathbf{x}\) | \(=\) | \(A^{-1}\mathbf{b}\) |
| \(=\) | \(A^{-1}\begin{pmatrix}7\\10\\9\end{pmatrix}\) | |
| \(=\) | \(\begin{pmatrix}1\\2\\3\end{pmatrix}\) |
Check by substituting back into the first equation:
| \(2(1)+2+3\) | \(=\) | \(7\ \checkmark\) |
\(x=1,\ y=2,\ z=3\).
Form \(A\) and test the determinant (row \(2\) is twice row \(1\)):
| \(A\) | \(=\) | \(\begin{pmatrix}1&2&3\\2&4&6\\1&0&1\end{pmatrix}\) |
| \(\det A\) | \(=\) | \(0\) |
Because \(\det A=0\), \(A\) is singular, so \(A^{-1}\) does not exist — the matrix method cannot be used. Check consistency:
| \(2\times(x+2y+3z=4)\) | \(\Rightarrow\) | \(2x+4y+6z=8\) |
| \(\text{but equation 2}\) | \(\Rightarrow\) | \(2x+4y+6z=9\) |
| \(8\) | \(\neq\) | \(9\) |
\(A\) is singular, so there is no inverse; here the equations are inconsistent, so the system has no solution.
Let \(x,y,z\) be the prices (in dollars) of a mango, pineapple and melon; set up \(A\mathbf{x}=\mathbf{b}\):
| \(A\) | \(=\) | \(\begin{pmatrix}2&1&1\\1&3&2\\3&1&2\end{pmatrix},\quad \mathbf{b}=\begin{pmatrix}8\\13\\11\end{pmatrix}\) |
| \(\det A\) | \(=\) | \(4\neq0\) |
The matrix is non-singular, so solve with technology:
| \(\mathbf{x}\) | \(=\) | \(A^{-1}\begin{pmatrix}8\\13\\11\end{pmatrix}\) |
| \(=\) | \(\begin{pmatrix}2\\3\\1\end{pmatrix}\) |
A mango costs \(\$2\), a pineapple \(\$3\) and a melon \(\$1\).
Common pitfalls
Frequently asked questions
How do you write a system of equations as a matrix equation?
Line the equations up in the same variable order, then read each equation’s coefficients into a row of the coefficient matrix \(A\), put the variables in the column vector \(\mathbf{x}\), and the right-hand sides in \(\mathbf{b}\), giving \(A\mathbf{x}=\mathbf{b}\).
How do you solve \(A\mathbf{x}=\mathbf{b}\) using the inverse?
If \(A\) is non-singular, left-multiply both sides by \(A^{-1}\): \(\mathbf{x}=A^{-1}\mathbf{b}\). For a \(3\times3\) or larger matrix you compute \(A^{-1}\) and the product with technology.
When can you use the matrix method \(\mathbf{x}=A^{-1}\mathbf{b}\)?
Exactly when \(A\) is non-singular, that is \(\det A\neq0\). Then \(A^{-1}\) exists and the system has one unique solution.
What happens when \(\det A=0\)?
The matrix \(A\) is singular, so \(A^{-1}\) does not exist and there is no unique solution — either no solution (inconsistent equations) or infinitely many.
How do you solve \(XA=B\) or \(AX+C=B\)?
Rearrange keeping \(A^{-1}\) on the correct side: \(XA=B\) gives \(X=BA^{-1}\); \(AX+C=B\) gives \(AX=B-C\), so \(X=A^{-1}(B-C)\). Order matters because matrix products do not commute.
What does a unique solution mean geometrically?
Each equation in three unknowns is a plane. A unique solution means the three planes meet at a single point, which happens exactly when \(\det A\neq0\).