Solving Systems of Equations with Matrices Examples in Math

Start with the recap, study the fully worked examples, then use the practice problems to check your understanding of Solving Systems of Equations with Matrices.

This page combines explanation, solved examples, and follow-up practice so you can move from recognition to confident problem-solving in Math.

Concept Recap

Systems of linear equations can be represented as the matrix equation Ax=bAx = b and solved using augmented matrices with row reduction (Gaussian elimination), matrix inverses (x=Aβˆ’1bx = A^{-1}b), or Cramer's rule (using determinants).

Instead of juggling multiple equations with substitution or elimination, pack everything into a matrix and use systematic row operations. It is like organizing a messy deskβ€”once the equations are neatly arranged in a matrix, a mechanical process (row reduction) reveals the answer. Each row operation is an allowed algebraic move (swap equations, scale an equation, add equations) performed on the matrix.

Read the full concept explanation β†’

How to Use These Examples

  • Read the first worked example with the solution open so the structure is clear.
  • Try the practice problems before revealing each solution.
  • Use the related concepts and background knowledge badges if you feel stuck.

What to Focus On

Core idea: Write the system as a matrix equation and solve by row reduction, x=Aβˆ’1bx=A^{-1}b, or Cramer's rule.

Common stuck point: The procedure for solving systems of equations with matrices is the easy part; the trap is using x=Aβˆ’1bx=A^{-1}b when det⁑A=0\det A=0. Asking "Can I write the system as Ax=bAx=b and solve mechanically by row ops, inverse, or determinants?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

Sense of Study hint: Ask: Can I write the system as Ax=bAx=b and solve mechanically by row ops, inverse, or determinants?

Worked Examples

Example 1

medium
Solve using the inverse matrix: {2x+y=5xβˆ’y=1\begin{cases} 2x + y = 5 \\ x - y = 1 \end{cases}

Answer

x=2,y=1x = 2, y = 1

First step

1
Step 1: Write as Ax=bAx = b: [211βˆ’1][xy]=[51]\begin{bmatrix} 2 & 1 \\ 1 & -1 \end{bmatrix}\begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 5 \\ 1 \end{bmatrix}.

See the full worked solution + why-it-works coaching

SetupKey insightWhy it worksCommon pitfallConnection

Unlock answer keys One Family plan β€” every worked solution, all subjects

Example 2

hard
Use Cramer's rule to solve: {3x+2y=7xβˆ’y=1\begin{cases} 3x + 2y = 7 \\ x - y = 1 \end{cases}

Example 3

easy
Solve by inspection: (100010001)(xyz)=(4βˆ’27)\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}\begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} 4 \\ -2 \\ 7 \end{pmatrix}.

Example 4

medium
Use x=Aβˆ’1bx = A^{-1}b to solve Ax=bA x = b where A=(2153)A = \begin{pmatrix} 2 & 1 \\ 5 & 3 \end{pmatrix} and b=(411)b = \begin{pmatrix} 4 \\ 11 \end{pmatrix}.

Example 5

hard
Solve using row reduction: {x+y+z=4xβˆ’y+z=2x+2yβˆ’z=1\begin{cases} x + y + z = 4 \\ x - y + z = 2 \\ x + 2y - z = 1 \end{cases}.

Practice Problems

Try these problems on your own first, then open the solution to compare your method.

Example 1

easy
Write the system {x+3y=72xβˆ’y=4\begin{cases} x + 3y = 7 \\ 2x - y = 4 \end{cases} as a matrix equation Ax=bAx = b.

Example 2

medium
Solve using the inverse: {x+2y=83x+5y=19\begin{cases} x + 2y = 8 \\ 3x + 5y = 19 \end{cases}

Example 3

easy
Write the coefficient matrix for {2x+3y=5xβˆ’y=1\begin{cases} 2x + 3y = 5 \\ x - y = 1 \end{cases}.

Example 4

easy
Write the augmented matrix for {x+2y=43x+y=5\begin{cases} x + 2y = 4 \\ 3x + y = 5 \end{cases}.

Example 5

easy
In Ax=bAx = b, what does the vector xx represent?

Example 6

easy
If the coefficient matrix has determinant 0, what does it tell you about the solution?

Example 7

easy
Write {x=3y=5\begin{cases} x = 3 \\ y = 5 \end{cases} as a solution vector.

Example 8

easy
How many equations and variables does a 3Γ—33 \times 3 coefficient matrix represent?

Example 9

easy
What row operation scales row 1 of (246112)\left(\begin{array}{cc|c} 2 & 4 & 6 \\ 1 & 1 & 2 \end{array}\right) to make its leading entry 1?

Example 10

easy
In Cramer's rule for Ax=bAx = b, what is each variable a ratio of?

Example 11

medium
Solve {x+y=5xβˆ’y=1\begin{cases} x + y = 5 \\ x - y = 1 \end{cases} by elimination.

Example 12

medium
Use Cramer's rule to solve {2x+y=5x+3y=10\begin{cases} 2x + y = 5 \\ x + 3y = 10 \end{cases}.

Example 13

medium
Row reduce (124259)\left(\begin{array}{cc|c} 1 & 2 & 4 \\ 2 & 5 & 9 \end{array}\right) and solve.

Example 14

medium
Solve using x=Aβˆ’1bx = A^{-1}b for A=(1112)A = \begin{pmatrix} 1 & 1 \\ 1 & 2 \end{pmatrix}, b=(35)b = \begin{pmatrix} 3 \\ 5 \end{pmatrix}.

Example 15

medium
Does {x+y=22x+2y=5\begin{cases} x + y = 2 \\ 2x + 2y = 5 \end{cases} have a solution? Use the determinant.

Example 16

medium
Solve {x+y+z=6y+z=5z=3\begin{cases} x + y + z = 6 \\ y + z = 5 \\ z = 3 \end{cases} by back-substitution.

Example 17

medium
What does an augmented matrix row (004)\left(\begin{array}{cc|c} 0 & 0 & 4 \end{array}\right) indicate?

Example 18

medium
Solve {2x+y=7xβˆ’y=2\begin{cases} 2x + y = 7 \\ x - y = 2 \end{cases} by elimination.

Example 19

medium
Find det⁑(A)\det(A) for A=(3214)A = \begin{pmatrix} 3 & 2 \\ 1 & 4 \end{pmatrix} to confirm a unique solution exists.

Example 20

challenge
Solve the system {2x+y=4xβˆ’y=βˆ’1\begin{cases} 2x + y = 4 \\ x - y = -1 \end{cases} three ways agree: give the solution.

Example 21

challenge
For what kk does {x+2y=32x+ky=6\begin{cases} x + 2y = 3 \\ 2x + ky = 6 \end{cases} have infinitely many solutions?

Example 22

challenge
Use Cramer's rule to find only yy in {3x+2y=7x+4y=9\begin{cases} 3x + 2y = 7 \\ x + 4y = 9 \end{cases}.

Example 23

easy
Compute det⁑(2134)\det\begin{pmatrix} 2 & 1 \\ 3 & 4 \end{pmatrix}.

Example 24

easy
What is the augmented matrix of {2xβˆ’y=3x+4y=7\begin{cases} 2x - y = 3 \\ x + 4y = 7 \end{cases}?

Example 25

easy
Identify the coefficient matrix of {x+y+z=12yβˆ’z=0x+z=5\begin{cases} x + y + z = 1 \\ 2y - z = 0 \\ x + z = 5 \end{cases}.

Example 26

easy
Find Aβˆ’1A^{-1} for A=(2003)A = \begin{pmatrix} 2 & 0 \\ 0 & 3 \end{pmatrix}.

Example 27

easy
Compute det⁑(4623)\det\begin{pmatrix} 4 & 6 \\ 2 & 3 \end{pmatrix}.

Example 28

medium
Solve {3xβˆ’y=52x+y=5\begin{cases} 3x - y = 5 \\ 2x + y = 5 \end{cases} by elimination.

Example 29

medium
Find Aβˆ’1A^{-1} for A=(2153)A = \begin{pmatrix} 2 & 1 \\ 5 & 3 \end{pmatrix}.

Example 30

medium
Use Cramer's rule to solve {4x+y=6x+2y=5\begin{cases} 4x + y = 6 \\ x + 2y = 5 \end{cases}.

Example 31

medium
Row-reduce (1βˆ’232βˆ’35)\left(\begin{array}{cc|c} 1 & -2 & 3 \\ 2 & -3 & 5 \end{array}\right) to find (x,y)(x, y).

Example 32

medium
Compute det⁑(120034005)\det\begin{pmatrix} 1 & 2 & 0 \\ 0 & 3 & 4 \\ 0 & 0 & 5 \end{pmatrix}.

Example 33

medium
For what kk is (123k)\begin{pmatrix} 1 & 2 \\ 3 & k \end{pmatrix} singular?

Example 34

hard
Solve {x+y+z=62xβˆ’y+z=3x+2yβˆ’z=2\begin{cases} x + y + z = 6 \\ 2x - y + z = 3 \\ x + 2y - z = 2 \end{cases}.

Example 35

hard
Compute det⁑(123014560)\det\begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 5 & 6 & 0 \end{pmatrix}.

Example 36

hard
Use Cramer's rule to find only xx in {2x+yβˆ’z=3xβˆ’y+z=0x+2y+z=6\begin{cases} 2x + y - z = 3 \\ x - y + z = 0 \\ x + 2y + z = 6 \end{cases}.

Example 37

hard
Find the inverse of A=(1237)A = \begin{pmatrix} 1 & 2 \\ 3 & 7 \end{pmatrix}.

Example 38

hard
Find all kk for which {x+2y=k2x+4y=6\begin{cases} x + 2y = k \\ 2x + 4y = 6 \end{cases} has infinitely many solutions.

Example 39

hard
Compute Aβˆ’1bA^{-1}b for A=(2111)A = \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix} and b=(74)b = \begin{pmatrix} 7 \\ 4 \end{pmatrix}.

Example 40

hard
Show that {x+y+z=12x+2y+2z=3\begin{cases} x + y + z = 1 \\ 2x + 2y + 2z = 3 \end{cases} has no solution using the augmented matrix.

Example 41

challenge
Find det⁑ ⁣(1aa21bb21cc2)\det\!\begin{pmatrix} 1 & a & a^2 \\ 1 & b & b^2 \\ 1 & c & c^2 \end{pmatrix} in factored form.

Example 42

challenge
If AA is invertible and det⁑A=4\det A = 4, what is det⁑(2Aβˆ’1)\det(2A^{-1}) for a 3Γ—33\times 3 matrix?

Background Knowledge

These ideas may be useful before you work through the harder examples.

systems of equationsinverse matrixdeterminant