Resources For Teachers For Tutors For Students & Parents Pricing
Pre-Calculus Matrices

Solving linear systems with matrices

20 practice questions 0 video lessons Theory + worked examples
Create a free accountTrack your progress and save your work as you go.
Create free account

Theory

A linear system can be packaged as a single matrix equation:

\[AX=B,\]

where \(A\) holds the coefficients, \(X\) the variables, and \(B\) the constants. If \(A\) is invertible, multiply both sides by \(A^{-1}\):

\[X=A^{-1}B.\]

Alternatively, form the augmented matrix \([A\,|\,B]\) and solve by row reduction.

\(\det A=0\) breaks the inverse method: the system then has no solution or infinitely many, not a unique one.
Matrix equation Matrix equation Matrix equation A X = B X = A⁻¹ B (if A is invertible)
Solve \(AX=B\) as \(X=A^{-1}B\) when \(A\) is invertible.
Augmented matrix of a system A linear system can be written as an augmented matrix and solved by row reduction. augmented matrix 2 1 | 5 1 3 | 10
Or solve the augmented matrix by row reduction.

The matrix-equation method:

\[AX=B\ \Rightarrow\ X=A^{-1}B\quad(\det A\neq 0)\]
A X equals B gives X equals A inverse B when the determinant is nonzero
The coefficient matrix must be invertible for a unique solution.

How to solve a system with matrices

  1. Write the system as \(AX=B\).
  2. Check \(\det A\neq 0\).
  3. Compute \(A^{-1}\) and multiply: \(X=A^{-1}B\).
  4. Verify the solution in the original equations.
Example 1 — Write in matrix form
Write the system \(\begin{cases}2x+y=5\\x+3y=10\end{cases}\) as \(AX=B\).
Solution

Coefficients form \(A\), variables \(X\), constants \(B\).

\[\begin{bmatrix}2&1\\1&3\end{bmatrix}\begin{bmatrix}x\\y\end{bmatrix}=\begin{bmatrix}5\\10\end{bmatrix}\]
the system becomes A X equals B
Example 2 — Solve with the inverse
Solve that system using \(X=A^{-1}B\).
Solution

\(\det A=2(3)-1(1)=5\), so \(A^{-1}=\dfrac{1}{5}\begin{bmatrix}3&-1\\-1&2\end{bmatrix}\).

\[X=\dfrac{1}{5}\begin{bmatrix}3&-1\\-1&2\end{bmatrix}\begin{bmatrix}5\\10\end{bmatrix}=\dfrac{1}{5}\begin{bmatrix}5\\15\end{bmatrix}=\begin{bmatrix}1\\3\end{bmatrix}\]

So \(x=1,\ y=3\).

x equals 1 and y equals 3
Example 3 — Check the solution
Verify \(x=1,\ y=3\) in the original system.
Solution

Substitute into both equations.

\(2(1)+3\)\(=\)\(5\ \checkmark\)
\(1+3(3)\)\(=\)\(10\ \checkmark\)
both equations check
Example 4 — No unique solution
What does \(\det A=0\) mean for the system \(AX=B\)?
Solution

\(A\) has no inverse, so \(X=A^{-1}B\) fails; the system has either no solution or infinitely many.

\(\det A=0\)\(\Rightarrow\)\(\text{no unique solution}\)
a zero determinant means no unique solution

Common pitfalls

Multiply in the right order. \(X=A^{-1}B\), with \(A^{-1}\) on the left of \(B\).
Check invertibility first. If \(\det A=0\), the inverse method doesn't apply.
Keep the augmented bar straight. Row operations act on the whole row, constants included.

Frequently asked questions

How do you write a system as a matrix equation?

Put the coefficients in \(A\), the variables in \(X\), and the constants in \(B\), giving \(AX=B\).

How do you solve AX = B with an inverse?

If \(A\) is invertible, \(X=A^{-1}B\). Compute the inverse and multiply.

What if the determinant is zero?

Then \(A\) has no inverse and the system has either no solution or infinitely many.

What is an augmented matrix?

The coefficient matrix with the constants attached as an extra column, \([A\,|\,B]\), used for row reduction.