IB Maths AI HLTransition Matrices & Markov ChainsPaper 1 & 2~8 min read
Transition Matrices
A transition matrixT packs every arrow of a transition diagram into one grid: columns = the current state, rows = the next state. Pair it with an initial state vectors0 and a single multiplication, s1 = Ts0, tells you the probabilities after one time step — and, times a population N, the expected numbers.
📘 What you need to know
Transition matrix T: element in row i, column j = P(next state is i | current state is j).
Columns = current, rows = next. Each column must add to 1 (not the rows).
Initial state vector s0: a column vector of starting probabilities. If the start is known, that entry is 1 and the rest are 0.
One step: s1 = Ts0 via matrix multiplication.
Expected numbers: multiply a state vector by the fixed population size N.
Order is your choice — same elements, but the rows/columns can be labelled in any consistent order.
Reading the matrix: columns out, rows in
The single thing to lock in: a column is one current state, and reading down that column gives where it might go next. So every column is a probability distribution and must sum to 1.
Layout of a 3-state transition matrix
Column A (0.5, 0.2, 0.3) means: from A, go to A / B / C. It sums to 1. Read columns down, not rows across.
🤔 Why columns and not rows?
It’s so that s1 = Ts0 works as a column-vector multiplication. Each entry of s1 is a row of T dotted with s0 — combining “chance of being in each current state” with “chance of moving to this next state”. Some textbooks flip to rows-out; in IB AI it’s always columns = current, so the column sums (not row sums) are 1.
🧠 “Columns come from, rows go to”
Down a column = where you come from. Across a row = the resulting next state. And it’s the thing you “come from” whose probabilities must total 1.
One step forward: s₁ = Ts₀
The initial state vector s0 lists the starting probabilities. Multiply by T once to advance one time step.
State after one steps1 = Ts0More generally sn = Tns0 — in the formula booklet ✓
🧭 Recipe — building T and stepping forward
Choose a state order for rows and columns (keep it consistent) and label them.
Fill each column with that state’s outgoing probabilities; check each column sums to 1.
Write s0 as a column vector of starting probabilities (or a single 1 if the start is fixed).
Multiplys1 = Ts0 on the GDC; for expected numbers, multiply the result by N.
Expected numbers: if the chain models a fixed population of size N, then N × s0 gives the numbers at each state now, and N × s1 gives them after one step.
Worked examples
All five use Jamie’s charities. Each year he donates to charity A, B or C. The transition diagram gives: from A — stay 0.5, to B 0.2, to C 0.3; from B — to A 0.2, stay 0.7, to C 0.1; from C — to A 0.6, to B 0.4, stay 0.
WE 1
Write down the transition matrix
Using the order A, B, C for both rows and columns, write the transition matrix T.
columns = current (A, B, C); rows = next (A, B, C)
T =
0.5
0.2
0.6
0.2
0.7
0.4
0.3
0.1
0
each column adds to 1 ✓
WE 2
Interpret a single entry
What does the entry in row A, column C of T represent?
row = next state A, column = current state Centry = 0.6P(next year donates to A | this year donated to C) = 0.6.
WE 3
Write the initial state vector
There’s a 10% chance the first charity is A, 10% for B and 80% for C. Write s0.
order A, B, C — same as the matrix
s0 =
0.1
0.1
0.8
entries sum to 1 ✓
WE 4
Find the second-year probabilities
Find s1 = Ts0, the probabilities for the second charity.
matrix-multiply T by s₀ on the GDC
s1 =
0.5
0.2
0.6
0.2
0.7
0.4
0.3
0.1
0
0.1
0.1
0.8
=
0.55
0.41
0.04
A: 0.55, B: 0.41, C: 0.04
WE 5
Which charity is most likely?
State which charity has the highest probability of being picked in the second year.
compare the entries of s₁0.55 > 0.41 > 0.04charity AA has the highest second-year probability, at 0.55.
💡 Top tips
Columns sum to 1 — your first check after writing T. A column that doesn’t is a flagged error.
Keep one state order for both the matrix and the vector, or the multiplication is meaningless.
Read row i, column j as “to i, from j” — direction matters.
Use the GDC for the multiplication; enter T and s0 directly.
For expected numbers, multiply the probability vector by the population N at the end.
Draw the diagram if only the words are given — it makes each column obvious.
⚠ Common mistakes
Making rows sum to 1 — it’s the columns. This usually means T has been transposed.
Computing s0T instead of Ts0 — order matters in matrix multiplication.
Mismatched state order between the matrix columns and the vector entries.
Confusing “to” and “from” when reading or filling an entry.
Forgetting to multiply by N when a question asks for expected numbers, not probabilities.
Next up — Powers of Transition Matrices. Stepping forward n times means sn = Tns0, so the entries of Tn give the probability of being in each state after n steps. You’ll use the GDC for numeric powers and diagonalisation (T = PDP−1) when the power is left as an unknown n.
Need help with Transition Matrices & Markov Chains?
Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.