Matrices & linear transformations · Lesson 1 of 3

Matrix algebra and inverses

Adding and multiplying matrices, matrix equations with the identity, the inverse of a 2 × 2 matrix, and solving two simultaneous equations with it.

18 minYou should already know: Matrices & determinants
  1. 1
  2. 2
  3. 3

This lesson builds on matrices and determinants.

Multiplying matrices

Each entry of a product is a row of the first matrix times a column of the second:

abcdpqrs=•• = ap + br
Row times columnMultiply across the row and down the column, then add

Order matters: in general AB≠BAAB \ne BA. The identity I=(1001)I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} leaves a matrix unchanged: AI=IA=AAI = IA = A.

Worked example · WAEC 2018

WAEC 2018 · Paper 2 · Q3

Given that B=(2314)B = \begin{pmatrix} 2 & 3 \\ 1 & 4 \end{pmatrix} and B2+3B+2I=3NB^2 + 3B + 2I = 3N, where II is the 2×22 \times 2 unit matrix, find the matrix NN.

  1. B squared

    • B2=(4+36+122+43+16)=(718619){B^2 = \begin{pmatrix} 4 + 3 & 6 + 12 \\ 2 + 4 & 3 + 16 \end{pmatrix} = \begin{pmatrix} 7 & 18 \\ 6 & 19 \end{pmatrix}}.

    Think first. Multiply B by itself, row by column.

  2. Add the three matrices

    • 3B=(69312){3B = \begin{pmatrix} 6 & 9 \\ 3 & 12 \end{pmatrix}} and 2I=(2002){2I = \begin{pmatrix} 2 & 0 \\ 0 & 2 \end{pmatrix}}.
    • 3N=(7+6+218+9+06+3+019+12+2)=(1527933){3N = \begin{pmatrix} 7 + 6 + 2 & 18 + 9 + 0 \\ 6 + 3 + 0 & 19 + 12 + 2 \end{pmatrix} = \begin{pmatrix} 15 & 27 \\ 9 & 33 \end{pmatrix}}.
  3. Divide by 3

    • N=(59311){N = \begin{pmatrix} 5 & 9 \\ 3 & 11 \end{pmatrix}}.

More: matrix equations

The inverse of a 2 × 2 matrix

The inverse A−1A^{-1} undoes AA: AA−1=A−1A=IAA^{-1} = A^{-1}A = I. It exists only when the determinant ad−bcad - bc is not zero.

A⁻¹ =1ad − bcd−b−caswap a, d · change signs of b, c
The inverseA⁻¹ = (1 ÷ (ad − bc)) × (d, −b / −c, a)

Worked example · WAEC 2020

WAEC 2020 · Paper 2 · Q2

Given that P=(3456)P = \begin{pmatrix} 3 & 4 \\ 5 & 6 \end{pmatrix} and Q=(−25−31)Q = \begin{pmatrix} -2 & 5 \\ -3 & 1 \end{pmatrix}, find PQ−1PQ^{-1}, where Q−1Q^{-1} is the inverse of QQ.

  1. The inverse of Q

    • ∣Q∣=(−2)(1)−(5)(−3)=−2+15=13{|Q| = (-2)(1) - (5)(-3) = -2 + 15 = 13}.
    • Q−1=113(1−53−2){Q^{-1} = \frac{1}{13}\begin{pmatrix} 1 & -5 \\ 3 & -2 \end{pmatrix}}.

    Think first. ad − bc for Q?

  2. Multiply

    • PQ−1=113(3+12−15−85+18−25−12){PQ^{-1} = \frac{1}{13}\begin{pmatrix} 3 + 12 & -15 - 8 \\ 5 + 18 & -25 - 12 \end{pmatrix}}.
    • =113(15−2323−37){= \frac{1}{13}\begin{pmatrix} 15 & -23 \\ 23 & -37 \end{pmatrix}}.

More: the inverse

Solving simultaneous equations

Two equations ax+by=pax + by = p and cx+dy=qcx + dy = q are the matrix equation A(xy)=(pq)A\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} p \\ q \end{pmatrix}. Multiply both sides on the left by A−1A^{-1}:

(xy)=A−1(pq)\begin{pmatrix} x \\ y \end{pmatrix} = A^{-1}\begin{pmatrix} p \\ q \end{pmatrix}
Solving with an inverse matrixSet the coefficients and the right-hand sides
5determinant ad − bc(2, 3)solution (x, y)
|A| = (2)(4) − (1)(3) = 5. A⁻¹ = (1/5) × (4, −1 / −3, 2). Then x = (4 × 7 − 1 × 18) ÷ 5 = 2 and y = ((−3) × 7 + 2 × 18) ÷ 5 = 3. Check: 2 × 2 + 1 × 3 = 7 ✓.

Worked example · NECO 2023

NECO 2023 · Paper 1 · Q13

If (3−111)(xy)=(137)\begin{pmatrix} 3 & -1 \\ 1 & 1 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 13 \\ 7 \end{pmatrix}, find the value of yy.

  1. The inverse

    • ∣A∣=3(1)−(−1)(1)=4{|A| = 3(1) - (-1)(1) = 4}, so A−1=14(11−13){A^{-1} = \frac14\begin{pmatrix} 1 & 1 \\ -1 & 3 \end{pmatrix}}.
  2. Multiply

    • (xy)=14(13+7−13+21)=14(208)=(52){\begin{pmatrix} x \\ y \end{pmatrix} = \frac14\begin{pmatrix} 13 + 7 \\ -13 + 21 \end{pmatrix} = \frac14\begin{pmatrix} 20 \\ 8 \end{pmatrix} = \begin{pmatrix} 5 \\ 2 \end{pmatrix}}.
    • So y=2{y = 2}: option B.

Your turn

WAEC 2018 · Paper 2 · Q11 (a)

  1. (a)

    Given the matrix A=(385−2)A = \begin{pmatrix} 3 & 8 \\ 5 & -2 \end{pmatrix}, find its inverse.

    Show the answer

    A−1=(123423546−346)A^{-1} = \begin{pmatrix} \frac{1}{23} & \frac{4}{23} \\ \frac{5}{46} & -\frac{3}{46} \end{pmatrix}

Worked solution (try it first)

(a)

  1. The determinant is ∣A∣=3(−2)−8(5)=−6−40=−46|A| = 3(-2) - 8(5) = -6 - 40 = -46.
  2. Swap the leading diagonal and change the signs of the other two entries: (−2−8−53)\begin{pmatrix} -2 & -8 \\ -5 & 3 \end{pmatrix}.
  3. Divide by the determinant: A−1=−146(−2−8−53)A^{-1} = -\dfrac{1}{46}\begin{pmatrix} -2 & -8 \\ -5 & 3 \end{pmatrix}
    =(123423546−346)= \begin{pmatrix} \frac{1}{23} & \frac{4}{23} \\ \frac{5}{46} & -\frac{3}{46} \end{pmatrix}.

Report a problem with this question