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:
a b c d p q r s = • • = ap + br Row times column Multiply across the row and down the column, then add
Order matters: in general A B ≠ B A AB \ne BA A B = B A . The identity I = ( 1 0 0 1 ) I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} I = ( 1 0 0 1 ) leaves a matrix unchanged: A I = I A = A AI = IA = A A I = I A = A .
Tap each entry of the answer to see which row and column make it, then try “Your turn”.
Multiplying matrices Tap an entry of the answer
2, 1 row 1 of the first 1, 2 column 1 of the second 2 × 1 + 1 × 2 = 4 entry in row 1, column 1
2 × 2 by 2 × 2 With negatives 2 × 2 by 2 × 1 Next entry Your turn
The entry in row 1, column 1 uses row 1 of the first matrix and column 1 of the second: multiply them in pairs and add, 2 × 1 + 1 × 2 = 4. The first matrix needs as many columns as the second has rows.
Worked example · WAEC 2018
WAEC 2018 · Paper 2 · Q3
Given that B = ( 2 3 1 4 ) B = \begin{pmatrix} 2 & 3 \\ 1 & 4 \end{pmatrix} B = ( 2 1 3 4 ) and B 2 + 3 B + 2 I = 3 N B^2 + 3B + 2I = 3N B 2 + 3 B + 2 I = 3 N , where I I I is the 2 × 2 2 \times 2 2 × 2 unit matrix, find the matrix N N N .
B squared
B 2 = ( 4 + 3 6 + 12 2 + 4 3 + 16 ) {B^2 = \begin{pmatrix} 4 + 3 & 6 + 12 \\ 2 + 4 & 3 + 16 \end{pmatrix}} B 2 = ( 4 + 3 2 + 4 6 + 12 3 + 16 ) .
= ( 7 18 6 19 ) {= \begin{pmatrix} 7 & 18 \\ 6 & 19 \end{pmatrix}} = ( 7 6 18 19 ) .
Think first. Multiply B by itself, row by column.
Add the three matrices
3 B = ( 6 9 3 12 ) {3B = \begin{pmatrix} 6 & 9 \\ 3 & 12 \end{pmatrix}} 3 B = ( 6 3 9 12 ) and 2 I = ( 2 0 0 2 ) {2I = \begin{pmatrix} 2 & 0 \\ 0 & 2 \end{pmatrix}} 2 I = ( 2 0 0 2 ) .
3 N = ( 7 + 6 + 2 18 + 9 + 0 6 + 3 + 0 19 + 12 + 2 ) {3N = \begin{pmatrix} 7 + 6 + 2 & 18 + 9 + 0 \\ 6 + 3 + 0 & 19 + 12 + 2 \end{pmatrix}} 3 N = ( 7 + 6 + 2 6 + 3 + 0 18 + 9 + 0 19 + 12 + 2 ) .
Add up: 3 N = ( 15 27 9 33 ) {3N = \begin{pmatrix} 15 & 27 \\ 9 & 33 \end{pmatrix}} 3 N = ( 15 9 27 33 ) .
Divide by 3
N = ( 5 9 3 11 ) {N = \begin{pmatrix} 5 & 9 \\ 3 & 11 \end{pmatrix}} N = ( 5 3 9 11 ) .
← Back Next step → Show all steps Start again
Equal matrices
Two matrices are equal when they have the same order and every entry matches the entry in the same place. So one equation between matrices is really one equation for each position:
x + y 3 2 x − y = 7 3 2 1 x + y = 7 x − y = 1 Match the places Same place, same value: one equation per entry
When one side is a product, such as P Q = Q P PQ = QP P Q = QP , work out each side as a single matrix first. Then match the entries, starting with the ones that hold only one unknown.
Worked example · WAEC 2014
WAEC 2014 · Paper 2 · Q10 (a)
If P = ( 4 2 c 3 ) P = \begin{pmatrix} 4 & 2 \\ c & 3 \end{pmatrix} P = ( 4 c 2 3 ) , Q = ( 6 2 4 d ) Q = \begin{pmatrix} 6 & 2 \\ 4 & d \end{pmatrix} Q = ( 6 4 2 d ) and P Q = Q P PQ = QP P Q = QP , find the values of c c c and d d d .
Multiply both ways
P Q = ( 24 + 8 8 + 2 d 6 c + 12 2 c + 3 d ) {PQ = \begin{pmatrix} 24 + 8 & 8 + 2d \\ 6c + 12 & 2c + 3d \end{pmatrix}} P Q = ( 24 + 8 6 c + 12 8 + 2 d 2 c + 3 d ) .
Simplify: P Q = ( 32 8 + 2 d 6 c + 12 2 c + 3 d ) {PQ = \begin{pmatrix} 32 & 8 + 2d \\ 6c + 12 & 2c + 3d \end{pmatrix}} P Q = ( 32 6 c + 12 8 + 2 d 2 c + 3 d ) .
Q P = ( 24 + 2 c 12 + 6 16 + c d 8 + 3 d ) {QP = \begin{pmatrix} 24 + 2c & 12 + 6 \\ 16 + cd & 8 + 3d \end{pmatrix}} QP = ( 24 + 2 c 16 + c d 12 + 6 8 + 3 d ) .
Simplify: Q P = ( 24 + 2 c 18 16 + c d 8 + 3 d ) {QP = \begin{pmatrix} 24 + 2c & 18 \\ 16 + cd & 8 + 3d \end{pmatrix}} QP = ( 24 + 2 c 16 + c d 18 8 + 3 d ) .
Think first. Work out PQ and QP, row by column.
Match the entries
Top-left: 32 = 24 + 2 c {32 = 24 + 2c} 32 = 24 + 2 c , so c = 4 {c = 4} c = 4 .
Top-right: 8 + 2 d = 18 {8 + 2d = 18} 8 + 2 d = 18 , so d = 5 {d = 5} d = 5 .
Think first. Which places hold only one unknown?
Check the other two places
Bottom-left: 6 ( 4 ) + 12 = 36 {6(4) + 12 = 36} 6 ( 4 ) + 12 = 36 and 16 + 4 ( 5 ) = 36 {16 + 4(5) = 36} 16 + 4 ( 5 ) = 36 ✓.
Bottom-right: 2 ( 4 ) + 3 ( 5 ) = 23 {2(4) + 3(5) = 23} 2 ( 4 ) + 3 ( 5 ) = 23 and 8 + 3 ( 5 ) = 23 {8 + 3(5) = 23} 8 + 3 ( 5 ) = 23 ✓.
← Back Next step → Show all steps Start again
The inverse of a 2 × 2 matrix
The inverse A − 1 A^{-1} A − 1 undoes A A A : A A − 1 = A − 1 A = I AA^{-1} = A^{-1}A = I A A − 1 = A − 1 A = I . It exists only when the determinant a d − b c ad - bc a d − b c is not zero.
A⁻¹ = 1 ad − bc d −b −c a swap a, d · change signs of b, c The inverse A⁻¹ = (1 ÷ (ad − bc)) × (d, −b / −c, a)
Worked example · WAEC 2020
WAEC 2020 · Paper 2 · Q2
Given that P = ( 3 4 5 6 ) P = \begin{pmatrix} 3 & 4 \\ 5 & 6 \end{pmatrix} P = ( 3 5 4 6 ) and Q = ( − 2 5 − 3 1 ) Q = \begin{pmatrix} -2 & 5 \\ -3 & 1 \end{pmatrix} Q = ( − 2 − 3 5 1 ) , find P Q − 1 PQ^{-1} P Q − 1 , where Q − 1 Q^{-1} Q − 1 is the inverse of Q Q Q .
The inverse of Q
∣ Q ∣ = ( − 2 ) ( 1 ) − ( 5 ) ( − 3 ) {|Q| = (-2)(1) - (5)(-3)} ∣ Q ∣ = ( − 2 ) ( 1 ) − ( 5 ) ( − 3 ) .
= − 2 + 15 = 13 {= -2 + 15 = 13} = − 2 + 15 = 13 .
Q − 1 = 1 13 ( 1 − 5 3 − 2 ) {Q^{-1} = \frac{1}{13}\begin{pmatrix} 1 & -5 \\ 3 & -2 \end{pmatrix}} Q − 1 = 13 1 ( 1 3 − 5 − 2 ) .
Think first. ad − bc for Q?
Multiply
P Q − 1 = 1 13 ( 3 + 12 − 15 − 8 5 + 18 − 25 − 12 ) {PQ^{-1} = \frac{1}{13}\begin{pmatrix} 3 + 12 & -15 - 8 \\ 5 + 18 & -25 - 12 \end{pmatrix}} P Q − 1 = 13 1 ( 3 + 12 5 + 18 − 15 − 8 − 25 − 12 ) .
= 1 13 ( 15 − 23 23 − 37 ) {= \frac{1}{13}\begin{pmatrix} 15 & -23 \\ 23 & -37 \end{pmatrix}} = 13 1 ( 15 23 − 23 − 37 ) .
← Back Next step → Show all steps Start again
Solving simultaneous equations
Two equations a x + b y = p ax + by = p a x + b y = p and c x + d y = q cx + dy = q c x + d y = q are the matrix equation A ( x y ) = ( p q ) A\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} p \\ q \end{pmatrix} A ( x y ) = ( p q ) . Multiply both sides on the left by A − 1 A^{-1} A − 1 :
( x y ) = A − 1 ( p q ) \begin{pmatrix} x \\ y \end{pmatrix} = A^{-1}\begin{pmatrix} p \\ q \end{pmatrix} ( x y ) = A − 1 ( p q )
Solving with an inverse matrix Set the coefficients and the right-hand sides
−8 −6 −4 −2 2 4 6 8 −8 −6 −4 −2 2 4 6 8 x y (2, 3) 2x + y = 7 first line 3x + 4y = 18 second line 5 determinant ad − bc (2, 3) solution (x, y)
a = 2 b = 1 c = 3 d = 4 p = 7 q = 18
|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 ✓. On the graph, (2, 3) is where the two lines cross.
Worked example · NECO 2023
NECO 2023 · Paper 1 · Q13
If ( 3 − 1 1 1 ) ( x y ) = ( 13 7 ) \begin{pmatrix} 3 & -1 \\ 1 & 1 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 13 \\ 7 \end{pmatrix} ( 3 1 − 1 1 ) ( x y ) = ( 13 7 ) , find the value of y y y .
The inverse
∣ A ∣ = 3 ( 1 ) − ( − 1 ) ( 1 ) = 4 {|A| = 3(1) - (-1)(1) = 4} ∣ A ∣ = 3 ( 1 ) − ( − 1 ) ( 1 ) = 4 , so A − 1 = 1 4 ( 1 1 − 1 3 ) {A^{-1} = \frac14\begin{pmatrix} 1 & 1 \\ -1 & 3 \end{pmatrix}} A − 1 = 4 1 ( 1 − 1 1 3 ) .
Multiply
( x y ) = 1 4 ( 13 + 7 − 13 + 21 ) {\begin{pmatrix} x \\ y \end{pmatrix} = \frac14\begin{pmatrix} 13 + 7 \\ -13 + 21 \end{pmatrix}} ( x y ) = 4 1 ( 13 + 7 − 13 + 21 ) .
= 1 4 ( 20 8 ) = ( 5 2 ) {= \frac14\begin{pmatrix} 20 \\ 8 \end{pmatrix} = \begin{pmatrix} 5 \\ 2 \end{pmatrix}} = 4 1 ( 20 8 ) = ( 5 2 ) .
So y = 2 {y = 2} y = 2 : option B .
← Back Next step → Show all steps Start again
Your turn
(a) Given the matrix A = ( 3 8 5 − 2 ) A = \begin{pmatrix} 3 & 8 \\ 5 & -2 \end{pmatrix} A = ( 3 5 8 − 2 ) , find its inverse.
Show the answer A − 1 = ( 1 23 4 23 5 46 − 3 46 ) A^{-1} = \begin{pmatrix} \frac{1}{23} & \frac{4}{23} \\ \frac{5}{46} & -\frac{3}{46} \end{pmatrix} A − 1 = ( 23 1 46 5 23 4 − 46 3 )
Worked solution (try it first) (a) The determinant is
∣ A ∣ = 3 ( − 2 ) − 8 ( 5 ) = − 6 − 40 = − 46 |A| = 3(-2) - 8(5) = -6 - 40 = -46 ∣ A ∣ = 3 ( − 2 ) − 8 ( 5 ) = − 6 − 40 = − 46 .
Swap the leading diagonal and change the signs of the other two entries:
( − 2 − 8 − 5 3 ) \begin{pmatrix} -2 & -8 \\ -5 & 3 \end{pmatrix} ( − 2 − 5 − 8 3 ) .
Divide by the determinant:
A − 1 = − 1 46 ( − 2 − 8 − 5 3 ) A^{-1} = -\dfrac{1}{46}\begin{pmatrix} -2 & -8 \\ -5 & 3 \end{pmatrix} A − 1 = − 46 1 ( − 2 − 5 − 8 3 ) = ( 1 23 4 23 5 46 − 3 46 ) = \begin{pmatrix} \frac{1}{23} & \frac{4}{23} \\ \frac{5}{46} & -\frac{3}{46} \end{pmatrix} = ( 23 1 46 5 23 4 − 46 3 ) .
Watch out
In (a), divide every entry by the determinant, including its minus sign. In (b), log ( … ) = 0 \log(\ldots) = 0 log ( … ) = 0 means the bracket equals 10 0 = 1 10^0 = 1 1 0 0 = 1 , not 0. Report a problem with this question