James Ashton MathsFREE MATHEMATICS. OPEN TO EVERYONE.
HomeIB DiplomaA levelAbout

Matrices

A matrix is a rectangular table of numbers that you can add, multiply and (sometimes) invert. Matrices store data neatly, solve systems of linear equations in one step, and are the language of transformations, Markov chains and coupled differential equations later in the course.

AHL 1.14HL onlyPaper 1Paper 2GDC allowed≈ 55 min to work through
Before you start: solving simultaneous equations with technology (Solving equations with technology).

1What you need to know

Tick these off as you go. By the end of the page you should be able to do all of them without notes.

  • Use the terms element, row, column and order (m×n)AHL 1.14
  • Add, subtract and multiply matrices by a scalarAHL 1.14
  • Multiply matrices, knowing when a product is defined and that AB≠BA in generalAHL 1.14
  • Use the identity and zero matricesAHL 1.14
  • Find the determinant and inverse of a 2 × 2 matrix by hand, and of larger matrices with the GDCAHL 1.14
  • Solve systems of linear equations using A𝐱=𝐛⇒𝐱=A−1𝐛AHL 1.14

2Notes & worked examples

Each idea is followed by a worked example. Try the question yourself first, then reveal the solution one step at a time.

The big idea

A matrix packages lots of numbers into one object, so that a whole set of calculations becomes one operation. A shop’s order quantities times its price list gives every bill at once; three simultaneous equations become one matrix equation A𝐱=𝐛, solved by "dividing" by A, that is, multiplying by its inverse.

2.1 Order and arithmetic

A matrix with m rows and n columns has order m×n. The element aij is in row i and column j. You can add or subtract matrices of the same order, element by element. Multiplying by a scalar k multiplies every element by k.

2.2 Multiplying matrices

The product AB is defined only when 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. The element in row i, column j of AB is row i of A "times" column j of B: multiply in pairs and add.

Worked example 1Paper 1
Let A=(2134) and B=(1−205). Find AB and BA.
AB=(2(1)+1(0)2(−2)+1(5)3(1)+4(0)3(−2)+4(5))=(21314)
Row of A times column of B.
BA=(1(2)−2(3)1(1)−2(4)0(2)+5(3)0(1)+5(4))=(−4−71520)
AB≠BA: matrix multiplication is not commutative, so the order matters.
Worked example 2Paper 1
A is 2×3 and B is 3×4. State the order of AB and explain why BA is not defined.
AB is 2×4.
BA would need the 4 columns of B to match the 2 rows of A, so it is not defined.
Worked example 3Paper 2
A café sells three items. On Monday it sells 20 coffees, 15 teas and 12 cakes; on Tuesday 25, 10 and 18. Prices are €2.40, €1.80 and €3.20. Use a matrix product to find the takings each day.
(201512251018)(2.401.803.20)
=(48+27+38.460+18+57.6)=(113.40135.60)
2×3 times 3×1 gives 2×1.
Monday €113.40, Tuesday €135.60.

2.3 Identity, determinant and inverse

The identity matrix I (1s on the leading diagonal, 0s elsewhere) behaves like the number 1: AI=IA=A. The inverse A−1 satisfies AA−1=A−1A=I. Only square matrices can have inverses, and only if the determinant is not zero.

2 × 2 determinant and inverse In formula booklet
A=(abcd):detA=ad−bc,A−1=1ad−bc(d−b−ca)

If detA=0, the matrix is singular and has no inverse. For 3 × 3 and larger, use the GDC.

Worked example 4Paper 1
Find the inverse of C=(4726).
detC=4(6)−7(2)=10
C−1=110(6−7−24)=(0.6−0.7−0.20.4)
Check: CC−1=I.
Worked example 5Paper 1
Find the values of k for which (k34k−4) has no inverse.
det=k(k−4)−12=0
k2−4k−12=0⇒(k−6)(k+2)=0
k=6 or k=−2

2.4 Solving systems of equations

Write the system as A𝐱=𝐛, where A holds the coefficients. If A−1 exists, multiply both sides on the left by A−1: 𝐱=A−1𝐛.

Worked example 6Paper 2
Solve x+2y−z=3, 2x−y+3z=6, 3x+y+z=7.
(12−12−13311)(xyz)=(367)
(xyz)=A−1(367)
Enter A and the column on the GDC.
x=1, y=2, z=2
Worked example 7 (faded)Paper 1
Find det(5−234).
5(4)−(−2)(3)= 26  ← you work this out
On your TI-Nspire Calculator tricks →

On the TI-Nspire, open the matrix template with ctrl × (or menu → Matrix & Vector) and choose the size. Store a matrix with ctrl var, for example a. Then a·b multiplies, a^−1 inverts, det(a) gives the determinant, and identity(3) gives I3. To solve A𝐱=𝐛, type a^−1·b, or use menu → Algebra → Solve System of Linear Equations. A "singular matrix" error means the determinant is 0.

3Explore it

Change the elements of a 2 × 2 matrix. The unit square (grey) is mapped to the shaded parallelogram. Its area is |det A|, and when det A = 0 it collapses to a line, so A has no inverse.

4Common mistakes & exam tips

Common mistakes

  • Multiplying matrices element by element. Use row-times-column.
  • Assuming AB=BA. The order matters.
  • Writing 𝐱=𝐛A−1. The inverse must go on the left: 𝐱=A−1𝐛.
  • Forgetting to swap a and d and change the signs of b and c in the 2 × 2 inverse.
  • Entering a system with the variables in a different order in different equations.

Exam tips

  • Before multiplying, write the orders side by side: the inner numbers must match, the outer numbers give the answer’s order.
  • "Show that a system has a unique solution" means show detA≠0.
  • For 3 × 3 systems, write A𝐱=𝐛 in full, then give the GDC answer.
  • In context questions, say what each row and column of a matrix represents.

5Practice

Fluency questions build the basics. Problem-solving questions make you think about which method to use.

FluencyP1
Find 3(1−240)−(215−3).
(1−773)
FluencyP2
Find (1203−14)(21−1).
(41)
FluencyP3
Find the inverse of (0.5213).
det=−0.5; inverse (−642−1)
FluencyP4
Explain why (2613) has no inverse.
det=6−6=0: it is singular.
Problem solvingP5
Solve 5x−2y=16, 3x+4y=20 using an inverse matrix.
126(42−35)(1620)=(42)
Problem solvingP6
If A2=A and A has an inverse, show that A=I.
Multiply A2=A on the left by A−1: A=I.

6Exam-style questions

Original questions in the style of the IB Maths AI HL exam, with full markschemes. Your GDC is allowed throughout: use it, but write down what you entered and what it gave you. Give yourself about 1 minute per mark.

Question 1Paper 1[6 marks]

Consider the system of equations 5x−2y=16 and 3x+4y=20.

  • (a)Write the system in the form A𝐱=𝐛.[1]
  • (b)Find A−1.[2]
  • (c)Hence solve the system of equations.[3]
(a)
(5−234)(xy)=(1620)A1
(b)
detA=26(A1)
126(42−35)A1
(c)
𝐱=A−1𝐛(M1)
x=4A1
y=2A1
Question 2Paper 1[5 marks]

Let M=(k34k−4), where k∈ℝ.

  • (a)Find an expression for detM in terms of k.[2]
  • (b)Find the values of k for which M does not have an inverse.[3]
(a)
k(k−4)−12M1
k2−4k−12A1
(b)
k2−4k−12=0(M1)
k=6A1
k=−2A1
Question 3Paper 2[9 marks]

A coffee shop sells espressos at €e, lattes at €l and muffins at €m. Three customers pay as follows: 2 espressos, 3 lattes and 1 muffin cost €13.50; 1 espresso, 2 lattes and 4 muffins cost €15.40; 3 espressos, 1 latte and 2 muffins cost €12.20.

  • (a)Write this information as a matrix equation.[2]
  • (b)Use your GDC to find the price of each item.[3]
  • (c)A group orders 4 espressos, 5 lattes and 3 muffins. Use a matrix product to find the cost.[2]
  • (d)The shop raises every price by 10%. Write down the matrix that gives the new prices, in terms of the old price column.[2]
(a)
(231124312)(elm)=(13.5015.4012.20)A2
A1 for a correct coefficient matrix, A1 for the right-hand column.
(b)
A−1𝐛(M1)
e=1.80, l=2.60A1
m=2.10A1
(c)
(453)(1.802.602.10)(M1)
€26.50A1
(d)
1.1(elm)A1
=(1.982.862.31)A1

7Check yourself

Six quick questions, marked instantly. Aim for 6/6 before moving on. Fractions like 3/2 are accepted.

8Past-paper practice

Once you are scoring well above, try these real IB Maths AI HL questions on this topic. Your school or teacher will have the papers.

PaperQuestionFocusDifficulty
May 2025 · TZ3 · Paper 1Q8Matrices transforming points; finding coordinates★★☆
May 2023 · TZ2 · Paper 2Q5Setting up and solving a system with matrices★★☆
Nov 2025 · Paper 2Q7Matrix powers and the Fibonacci sequence★★★
Spotted a mistake on this page?Tell me and I'll fix it. The button opens an email with this page already named, or write to jamesashtonmaths@gmail.com.
Report a mistake