Solving systems of linear equations with matrices

About this lesson

Precalculus › Matrices

To save a PDF, choose “Save as PDF” in the print dialog.

Solving systems of linear equations with matrices

Matrices. matrices, matrix multiplication, determinant, inverse matrix, vectors, transformations

Warm-up

Three quick questions from earlier lessons.

Discover

To solve 5x = 20 you multiply both sides by 1/5. What does that give?

  1. x = 4
  2. x = 100

Key idea

A system is one matrix equation AX = B; X = A⁻¹B.

Write the coefficients as a matrix AA (one row per equation), the unknowns as X=(xy)X = \begin{pmatrix} x \\ y \end{pmatrix} and the constants as BB: then AX=BAX = B. If det⁡A≠0\det A \ne 0, X=A−1BX = A^{-1}B, the only solution.

Worked example

Solve 2x + y = 5, x + y = 3.

A=(2111)A = \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix}, det = 1
Matrix.
A−1=(1−1−12)A^{-1} = \begin{pmatrix} 1 & -1 \\ -1 & 2 \end{pmatrix}
Inverse.
x = 5 − 3 = 2, y = −5 + 6 = 1
Multiply.

Your turn, guided

Your turn: in that system, what is det A?

11
2 · 1 − 1 · 1.

Practice ★

  1. Which matrix equation represents the system 4x + 5y = 18 and 4x + 2y = 35?
    1. (4542)(xy)\begin{pmatrix} 4 & 5 \\ 4 & 2 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = (1835)\begin{pmatrix} 18 \\ 35 \end{pmatrix}
    2. (4452)(xy)\begin{pmatrix} 4 & 4 \\ 5 & 2 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = (1835)\begin{pmatrix} 18 \\ 35 \end{pmatrix}
    3. (4542)(1835)\begin{pmatrix} 4 & 5 \\ 4 & 2 \end{pmatrix}\begin{pmatrix} 18 \\ 35 \end{pmatrix} = (xy)\begin{pmatrix} x \\ y \end{pmatrix}
  2. Which matrix equation represents the system 9x + 9y = 13 and 2x + 4y = 10?
    1. (9924)(xy)\begin{pmatrix} 9 & 9 \\ 2 & 4 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = (1310)\begin{pmatrix} 13 \\ 10 \end{pmatrix}
    2. (9294)(xy)\begin{pmatrix} 9 & 2 \\ 9 & 4 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = (1310)\begin{pmatrix} 13 \\ 10 \end{pmatrix}
    3. (9924)(1310)\begin{pmatrix} 9 & 9 \\ 2 & 4 \end{pmatrix}\begin{pmatrix} 13 \\ 10 \end{pmatrix} = (xy)\begin{pmatrix} x \\ y \end{pmatrix}
  1. Solve the system 4x + 4y = 0 and 3x + 1y = 10 by multiplying by the inverse of the coefficient matrix. What is x?

Watch out!

Practice ★★

  1. Solve the system 4x + 4y = 0 and 3x + 1y = 10 by multiplying by the inverse of the coefficient matrix. What is x?
  2. Solve the system 4x + 1y = 20 and 1x + 1y = 5 by multiplying by the inverse of the coefficient matrix. What is x?
  1. Which matrix equation represents the system 4x + 5y = 18 and 4x + 2y = 35?
    1. (4542)(xy)\begin{pmatrix} 4 & 5 \\ 4 & 2 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = (1835)\begin{pmatrix} 18 \\ 35 \end{pmatrix}
    2. (4452)(xy)\begin{pmatrix} 4 & 4 \\ 5 & 2 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = (1835)\begin{pmatrix} 18 \\ 35 \end{pmatrix}
    3. (4542)(1835)\begin{pmatrix} 4 & 5 \\ 4 & 2 \end{pmatrix}\begin{pmatrix} 18 \\ 35 \end{pmatrix} = (xy)\begin{pmatrix} x \\ y \end{pmatrix}

Exit ticket

Three questions to check you have got it.

  1. Which matrix equation represents the system 4x + 5y = 18 and 4x + 2y = 35?
    1. (4542)(xy)\begin{pmatrix} 4 & 5 \\ 4 & 2 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = (1835)\begin{pmatrix} 18 \\ 35 \end{pmatrix}
    2. (4452)(xy)\begin{pmatrix} 4 & 4 \\ 5 & 2 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = (1835)\begin{pmatrix} 18 \\ 35 \end{pmatrix}
    3. (4542)(1835)\begin{pmatrix} 4 & 5 \\ 4 & 2 \end{pmatrix}\begin{pmatrix} 18 \\ 35 \end{pmatrix} = (xy)\begin{pmatrix} x \\ y \end{pmatrix}
  2. Which matrix equation represents the system 9x + 9y = 13 and 2x + 4y = 10?
    1. (9924)(xy)\begin{pmatrix} 9 & 9 \\ 2 & 4 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = (1310)\begin{pmatrix} 13 \\ 10 \end{pmatrix}
    2. (9294)(xy)\begin{pmatrix} 9 & 2 \\ 9 & 4 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = (1310)\begin{pmatrix} 13 \\ 10 \end{pmatrix}
    3. (9924)(1310)\begin{pmatrix} 9 & 9 \\ 2 & 4 \end{pmatrix}\begin{pmatrix} 13 \\ 10 \end{pmatrix} = (xy)\begin{pmatrix} x \\ y \end{pmatrix}
  3. Which matrix equation represents the system 6x + 2y = 32 and 6x + 4y = 39?
    1. (6264)(xy)\begin{pmatrix} 6 & 2 \\ 6 & 4 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = (3239)\begin{pmatrix} 32 \\ 39 \end{pmatrix}
    2. (6624)(xy)\begin{pmatrix} 6 & 6 \\ 2 & 4 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = (3239)\begin{pmatrix} 32 \\ 39 \end{pmatrix}
    3. (6264)(3239)\begin{pmatrix} 6 & 2 \\ 6 & 4 \end{pmatrix}\begin{pmatrix} 32 \\ 39 \end{pmatrix} = (xy)\begin{pmatrix} x \\ y \end{pmatrix}

Summary card

Systems with matrices

AX = B, so X = A⁻¹B when det A ≠ 0.

Watch out: one row per equation; multiply by A⁻¹ on the left.

End of the lesson

CC BY-SA 4.0