What you need: a pencil, an exercise book, graph paper and a calculator.
What you should already know: adding, subtracting and multiplying positive and negative numbers, solving simultaneous equations (Lesson 17), and the area of a triangle (Lesson 36).
By the end of this lesson you will be able to
✔ describe a matrix by its order, and add, subtract and scale matrices
✔ multiply two matrices and say when the product exists
✔ find the determinant and the inverse of a 2 × 2 matrix
✔ solve simultaneous equations using an inverse matrix
✔ use the determinant as an area scale factor and spot a singular matrix
ChallengeTunde sells orange and mango juice at a school fair in Lagos. On Monday he sold 3 bottles of orange and 2 of mango. On Tuesday he sold 1 orange and 4 mango. Orange costs ₦300 a bottle and mango ₦200. One matrix multiplication gives both days’ takings at once: ₦1,300 on Monday and ₦1,100 on Tuesday. By the end of this lesson you will do this with any numbers, and you will also work backwards, finding unknown prices from known takings.
How this lesson fitsThis is the first lesson in the Extras module. Matrices are used in computer graphics, in science and in business, and they give a neat way to solve simultaneous equations and to describe transformations. The next lesson, Complex Numbers, is another extension topic that appears in IB and in some Cambridge and North American courses.
🎚 Learning mode
Look for this sign
What it means
📊 Infographic
A picture that explains the idea. Study it before reading the words.
🎛 Live explorer
Change the numbers and watch the answer change.
▶ Show next step
Predict the move first, then tap to check yourself.
🧠 Explain it to yourself
Answer in your own words before opening the model answer.
1
What a matrix is
A grid of numbers with an order
A matrix is a rectangular grid of numbers arranged in rows (across) and columns (down), written inside brackets. Each number is an entry. Its order is the number of rows times the number of columns, rows first. A matrix with 2 rows and 3 columns has order 2 × 3. A matrix with equal numbers of rows and columns is square. Two matrices are equal only if they have the same order and every matching entry is equal.
Matrices store tables neatly. Tunde’s sales are the matrix
3
2
1
4
(rows are days, columns are orange and mango).
Worked example 1: state the order of P, Q and R
1
P =
3
1
2
0
5
4
2 rows and 3 columns, so P is 2 × 3.
2
Q =
1
2
3
3 rows and 1 column, so Q is 3 × 1. It is a column matrix.
3
R =
4
0
7
1
2 rows and 2 columns, so R is 2 × 2. It is square.
P is 2 × 3, Q is 3 × 1 and R is 2 × 2. B1 B1 B1
Adding, subtracting and scaling
You can add or subtract matrices only if they have the same order. Work on matching entries. To multiply a matrix by a number (a scalar), multiply every entry by that number.
The four answers are shown in the steps. M1 A1 A1 A1
Worked example 3: find x and y if
x
2
3
y
+
4
−1
−3
5
=
7
1
0
9
1
Add the left side:
x
+
4
1
0
y
+
5
Add matching entries.
2
x + 4 = 7, so x = 3
Equal matrices have equal entries. Compare the top-left entries.
3
y + 5 = 9, so y = 4
Compare the bottom-right entries.
4
Check: 2 + (−1) = 1 and 3 + (−3) = 0
The other two entries already agree.
x = 3 and y = 4 M1 A1 A1
Different ordersA 2 × 2 matrix and a 2 × 3 matrix cannot be added, because some entries have no partner. The question “find A + B” has no answer in that case. State it clearly if you are asked.
🧠 Explain it to yourself: why can we only add matrices of the same order?
Model answer: Adding works entry by entry, so every entry in one matrix needs a matching entry in the other. If the orders differ, some entries have no partner, and the sum is not defined. Equal matrices work the same way, which is why comparing entries gives equations such as x + 4 = 7.
2
Multiplying matrices
Rows across, columns down
Matrix multiplication is not “multiply matching entries”. To find an entry of AB, take a row of A and a column of B, multiply the pairs in order, and add. The top-left entry of AB uses row 1 of A and column 1 of B. The entry in row i, column j uses row i of A and column j of B.
The product AB exists only if the number of columns of A equals the number of rows of B. If A is m × n and B is n × p, then AB is m × p.
📊 Infographic 1 · Row by column
Row 1 of the first matrix and column 2 of the second give the top-right entry: 2 × 5 + 1 × 0 = 10. Repeat for every row and column pairing.
Worked example 4: A =
2
1
3
4
and B =
1
5
2
0
. Find AB and BA
1
AB top row: 2 × 1 + 1 × 2 = 4 and 2 × 5 + 1 × 0 = 10
Order mattersIn general AB ≠ BA. Sometimes one of the products does not exist at all. Always keep the matrices in the order the question gives, and never swap them to make the sum easier.
Worked example 5: work out
3
−1
2
5
4
2
1
The orders are 2 × 2 and 2 × 1
Columns of the first (2) equal rows of the second (2), so the product exists and is 2 × 1.
2
Top: 3 × 4 + (−1) × 2 = 10
Row 1 with the column.
3
Bottom: 2 × 4 + 5 × 2 = 18
Row 2 with the column.
10
18
M1 A1
Worked example 6: work out
1
2
0
3
−1
4
2
1
0
5
1
−2
1
The orders are 2 × 3 and 3 × 2, so the answer is 2 × 2
The inner numbers match (3 and 3). The outer numbers give the order.
The identity matrix is the square matrix with 1s on the main diagonal and 0s elsewhere. For 2 × 2 it is I =
1
0
0
1
. It acts like the number 1: AI = IA = A for any 2 × 2 matrix A. For example
2
1
3
4
1
0
0
1
=
2
1
3
4
.
🧠 Explain it to yourself: why must the columns of A match the rows of B?
Model answer: Each entry of AB pairs the entries of one row of A with the entries of one column of B, one by one. If the row is longer than the column, some entries of the row have no partner, so the sum cannot be formed. That is why a 2 × 3 matrix can be multiplied by a 3 × 2 matrix but not by a 2 × 3 matrix.
3
Determinant and inverse
Undoing a matrix
For a 2 × 2 matrix M =
a
b
c
d
, the determinant is det M = ad − bc: multiply down the main diagonal, then subtract the product of the other diagonal. It is a single number.
Worked example 8: find the determinant of
3
2
5
4
,
6
3
4
2
and
2
−3
1
5
1
First: 3 × 4 − 2 × 5 = 12 − 10 = 2
Main diagonal minus the other diagonal.
2
Second: 6 × 2 − 3 × 4 = 12 − 12 = 0
The determinant is zero.
3
Third: 2 × 5 − (−3) × 1 = 10 + 3 = 13
Subtracting a negative product adds it.
2, 0 and 13 M1 A1 A1 A1
If det M = 0 the matrix is singular and has no inverse. Otherwise the inverse M−1 exists. It is the matrix with MM−1 = M−1M = I, so it undoes M.
📊 Infographic 2 · Finding an inverse
Swap the diagonal entries, change the signs of the other two, and divide everything by the determinant: M⁻¹ = 1/(ad − bc) × [d −b ; −c a].
Worked example 9: find the inverse of A =
3
2
5
4
1
det A = 3 × 4 − 2 × 5 = 2
The determinant is not zero, so A⁻¹ exists.
2
Swap 3 and 4. Change the signs of 2 and 5
This gives
4
−2
−5
3
.
3
A⁻¹ = 1/2
4
−2
−5
3
=
2
−1
−5/2
3/2
Divide every entry by the determinant 2.
4
Check row 1 of A with column 1 of A⁻¹: 3 × 2 + 2 × (−5/2) = 1
The other three entries give 0, 0 and 1, so AA⁻¹ = I.
2
−1
−5/2
3/2
M1 M1 A1
Worked example 10: find the inverse of
2
−3
1
5
1
det = 2 × 5 − (−3) × 1 = 13
Not zero, so the inverse exists.
2
Swap 2 and 5. Change the signs of −3 and 1
This gives
5
3
−1
2
.
3
Inverse = 1/13
5
3
−1
2
Leave as a fraction outside the matrix, which is exact and tidy.
4
Check:
2
−3
1
5
5
3
−1
2
=
13
0
0
13
= 13I
Dividing by 13 gives I.
1/13
5
3
−1
2
M1 M1 A1
🎛 Live explorer · The determinant and inverse machine
Type four numbers for the matrix [a b ; c d]. Try 3, 2, 5, 4 first, then 6, 3, 4, 2 to meet a singular matrix.
The determinant decides everything: zero means no inverse, and its size tells you how much areas are scaled.
Worked example 11: find the values of k for which
k
3
4
k+1
is singular
1
det = k(k + 1) − 3 × 4 = k² + k − 12
Expand k(k + 1) and subtract 12.
2
Singular means det = 0, so k² + k − 12 = 0
Set the determinant to zero.
3
(k + 4)(k − 3) = 0
Factorise (Lesson 22).
4
k = 3 or k = −4
Check k = 3:
3
3
4
4
has det 12 − 12 = 0.
k = 3 or k = −4 M1 M1 A1
🧠 Explain it to yourself: why does a matrix with determinant 0 have no inverse?
Model answer: The inverse formula divides every entry by the determinant, and you cannot divide by 0. In geometry, a determinant of 0 means the matrix squashes every shape onto a line, so different points land on the same spot. Nothing can then tell you which point you started from, so the process cannot be undone.
4
Using inverses
Equations and areas
Simultaneous equations can be written as one matrix equation. The pair 2x + y = 7 and 3x + 2y = 12 becomes
2
1
3
2
x
y
=
7
12
. If AX = B and A has an inverse, multiply both sides on the left by A⁻¹. Since A⁻¹A = I, you get X = A⁻¹B.
Worked example 12: Kemi pays ₦7,000 for 2 bags of rice and 1 bag of beans, and ₦12,000 for 3 bags of rice and 2 of beans. Find the price of each (in thousands of naira)
1
2r + b = 7 and 3r + 2b = 12
r is the price of rice and b the price of beans.
2
2
1
3
2
r
b
=
7
12
Write the equations as AX = B.
3
det A = 2 × 2 − 1 × 3 = 1, so A⁻¹ =
2
−1
−3
2
Swap the diagonal, change signs, divide by 1.
4
r
b
=
2
−1
−3
2
7
12
=
14
−
12
−21
+
24
=
2
3
Inverse on the left of the constants.
5
Check: 2 × 2 + 3 = 7 and 3 × 2 + 2 × 3 = 12
Both equations are satisfied.
Rice ₦2,000 and beans ₦3,000 M1 M1 A1
Worked example 13: solve 3x − 2y = 8 and x + 4y = 5 using matrices
Left or right?Matrices do not commute, so the side matters. From AX = B you get X = A⁻¹B, with A⁻¹ on the left. Writing BA⁻¹ is a different matrix and usually the wrong answer.
The determinant and area
A 2 × 2 matrix can transform shapes (Lesson 34). The area scale factor of the transformation is the absolute value of the determinant. A negative determinant means the shape is also flipped over.
Worked example 15: a triangle of area 6 cm² is transformed by
3
1
2
4
. Find the area of the image
1
det = 3 × 4 − 1 × 2 = 10
The determinant is the area scale factor.
2
New area = 10 × 6
Multiply the original area by the scale factor.
3
= 60 cm²
Include the units.
60 cm² M1 A1
🧠 Explain it to yourself: why is the order A⁻¹B and not BA⁻¹?
Model answer: The equation is AX = B, with A directly next to X. To cancel A you multiply by A⁻¹ right next to it, which means on the left of both sides. That gives A⁻¹AX = A⁻¹B, so IX = X = A⁻¹B. Putting A⁻¹ on the right of B does not cancel anything, because matrix products depend on the order.
5
Exam practice and errors
Questions in the style of WASSCE, Cambridge and IB
Common errors, side by side
Wrong: Adding a 2 × 2 matrix and a 2 × 3 matrix
Right: Only matrices of the same order can be added or subtracted.
Wrong: AB = BA
Right: Matrix multiplication is not commutative. AB and BA usually differ, and one may not exist.
Wrong: Multiplying matching entries:
2
1
3
4
1
5
2
0
=
2
5
6
0
Right: Use rows times columns. The top-left entry is 2 × 1 + 1 × 2 = 4.
Wrong: det = ac − bd
Right: det = ad − bc: the main diagonal minus the other diagonal.
Wrong: Inverse of
3
2
5
4
by swapping 3 and 4 only
Right: Also change the signs of 2 and 5, and divide by the determinant 2.
Wrong: Solving AX = B with X = BA⁻¹
Right: X = A⁻¹B. The inverse goes on the left of both sides.
Exam-style questions with mark schemes
Cover the solution, try each question, then compare. M is a method mark, A is an accuracy mark that depends on the method, and B is an independent mark. Show the row by column working, because one slip in an entry can lose the accuracy marks.
Why students score marks hereThey scale first, then add. In (b) they write each row by column sum on its own line, so a sign slip is easy to see and the method mark is safe even if an entry is wrong.
Why students lose marks hereThey multiply matching entries instead of rows by columns. They lose the sign in (−1) × (−2). They find BA instead of AB. They add 2A + B before doubling.
Question 2 (5 marks): M =
5
2
3
2
. (a) Find the determinant of M. (b) Find M⁻¹. (c) Hence solve 5x + 2y = 11 and 3x + 2y = 7.
1
(a) det M = 5 × 2 − 2 × 3 = 4
B1: correct determinant.
2
(b) Swap 5 and 2, change the signs of 2 and 3
M1: the correct inverse method.
3
M⁻¹ = 1/4
2
−2
−3
5
A1: all entries correct, with the factor 1/4.
4
(c)
x
y
= 1/4
2
−2
−3
5
11
7
= 1/4
22
−
14
−33
+
35
M1: the inverse on the left of the constants.
5
= 1/4
8
2
, so x = 2 and y = 0.5
A1: both values. Check: 10 + 1 = 11 and 6 + 1 = 7.
Why students score marks hereThey use the answer from (a) and (b) in (c), as the word “hence” instructs. They place the inverse on the left, and show the sums 22 − 14 and −33 + 35 before dividing by 4.
Why students lose marks hereThey solve by elimination, which scores zero when the question says “hence”. They forget the factor 1/4. They multiply on the wrong side. They leave out the sign change on one entry of the inverse.
Question 3 (5 marks): N =
k
2
8
k
. (a) Find the values of k for which N is singular. (b) Find N⁻¹ when k = 5. (c) A triangle of area 3 cm² is transformed by N when k = 5. Find the area of its image.
1
(a) det N = k × k − 2 × 8 = k² − 16
M1: the determinant in terms of k.
2
k² − 16 = 0, so k = 4 or k = −4
A1: both values.
3
(b) k = 5: det N = 25 − 16 = 9
M1: substituting k = 5 to find the determinant.
4
N⁻¹ = 1/9
5
−2
−8
5
A1: correct matrix and the factor 1/9.
5
(c) Area = 9 × 3 = 27 cm²
B1: the area scale factor is the determinant, with units.
Why students score marks hereThey know singular means determinant zero and set it equal to 0 at once. They give both values of k, and in (c) they remember the determinant is the area scale factor.
Why students lose marks hereThey give only k = 4. They write k² − 16 as k² − 8. They forget to change the signs of 2 and 8 in the inverse. They multiply the area by 5 instead of by 9. They omit the units.
Five exam habits
✔ Check the orders first: can the product exist, and what order will it have?
✔ For every entry of AB, write the row by column sum on its own line.
✔ Use ad − bc for the determinant, and test the inverse by checking one row of AA⁻¹.
✔ If the question says “hence” or “using matrices”, use the inverse method, not elimination.
✔ Put A⁻¹ on the left in AX = B, and give the area scale factor as the positive determinant.
6
Check
Test yourself without looking back
Recap checklist
Up nextYou can now calculate with matrices. The next lesson introduces complex numbers, which extend the number system so that equations such as x² = −1 have solutions.
🃏
Flashcards
20 cards that test only today’s lesson
Tap the card to turn it over. Choose “Got it” only if you could have said the answer aloud. Use the arrow keys to move.