Resources For Teachers For Tutors For Students & Parents Pricing
Year 12 Specialist (Unit 3 & 4) Further matrices

Matrix solution of larger systems

20 practice questions 0 video lessons Theory + worked examples

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.

Create a free accountTrack your progress and save your work as you go.
Create free account

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.

Structure of the matrix equation A x = b A three by three coefficient matrix A multiplied by the column of variables x, y, z equals the column of constants b. The coefficient matrix, the variable vector and the constant vector are each labelled. 2 1 1 1 3 1 1 1 2 coefficient matrix A x y z variables x = 7 10 9 constants b solve x = A^-1 b (valid when det A is not 0)
Structure of \(A\mathbf{x}=\mathbf{b}\): the coefficient matrix \(A\), the variable vector \(\mathbf{x}\) and the constant vector \(\mathbf{b}\), solved by \(\mathbf{x}=A^{-1}\mathbf{b}\).
Three planes meeting at one point Three planes, shown as the three faces meeting at a corner, intersect at a single point marked in gold. When the coefficient matrix is non-singular the system has this one unique solution. P1 P2 P3 one meeting point: the unique solution
When \(\det A\neq0\) the three planes meet at one point: a unique solution.

Write the system as a matrix equation, with the coefficients as the rows of \(A\):

\[ A\mathbf{x}=\mathbf{b} \]
Ax=b

If \(A\) is non-singular, left-multiply by \(A^{-1}\) to solve:

\[ \mathbf{x}=A^{-1}\mathbf{b}\qquad(\det A\neq0) \]
x=A1b

The same idea rearranges any matrix equation — watch which side \(A\) sits on, because matrix products do not commute:

\[ AX=B\ \Rightarrow\ X=A^{-1}B \]
AX=BX=A1B
\[ XA=B\ \Rightarrow\ X=BA^{-1} \]
XA=BX=BA1
\[ AX+C=B\ \Rightarrow\ X=A^{-1}(B-C) \]
AX+C=BX=A1(BC)
Unique solution test. The system \(A\mathbf{x}=\mathbf{b}\) has exactly one solution \(\Longleftrightarrow\) \(A\) is non-singular \(\Longleftrightarrow\) \(\det A\neq0\). If \(\det A=0\), \(A^{-1}\) does not exist and there is no unique solution.

How to solve a system by the matrix method

  1. 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}\).
  2. 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).
  3. 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.
  4. Read off and interpret: take the components of \(\mathbf{x}\) as the values of \(x,y,z\) and translate them back into the context.
Example 1 — Write a system as \(A\mathbf{x}=\mathbf{b}\)
Express the system \(3x+2y-z=4\), \(x-y+2z=5\), \(2x+y+z=7\) in the matrix form \(A\mathbf{x}=\mathbf{b}\).
Solution

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}\).

Example 2 — Solve a \(3\times3\) system by \(\mathbf{x}=A^{-1}\mathbf{b}\)
Solve \(2x+y+z=7\), \(x+3y+z=10\), \(x+y+2z=9\) using the matrix method.
Solution

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\).

Example 3 — The no-inverse case (singular \(A\))
Can the system \(x+2y+3z=4\), \(2x+4y+6z=9\), \(x+z=2\) be solved by \(\mathbf{x}=A^{-1}\mathbf{b}\)?
Solution

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.

Example 4 — A worded problem solved by matrices
At a market stall, \(2\) mangoes, \(1\) pineapple and \(1\) melon cost \(\$8\); \(1\) mango, \(3\) pineapples and \(2\) melons cost \(\$13\); and \(3\) mangoes, \(1\) pineapple and \(2\) melons cost \(\$11\). Find the price of each fruit.
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

Putting \(A^{-1}\) on the wrong side. Matrix products do not commute, so \(A\mathbf{x}=\mathbf{b}\) gives \(\mathbf{x}=A^{-1}\mathbf{b}\), never \(\mathbf{b}A^{-1}\). For \(XA=B\) you must right-multiply, giving \(X=BA^{-1}\).
Skipping the determinant check. Always confirm \(\det A\neq0\) before inverting. If \(\det A=0\) the inverse does not exist and \(\mathbf{x}=A^{-1}\mathbf{b}\) is meaningless.
Reading coefficients in the wrong order. Line every equation up in the same variable order first, and insert a \(0\) for any missing variable, before reading the rows of \(A\).
Assuming a singular system has no solution. A singular \(A\) means no unique solution — that can be either no solution or infinitely many; test the equations for consistency to tell which.

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\).