IB Maths AI HL Transition Matrices & Markov Chains Paper 1 & 2 ~8 min read

Transition Matrices

A transition matrix T packs every arrow of a transition diagram into one grid: columns = the current state, rows = the next state. Pair it with an initial state vector s0 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

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
current state (columns) next state (rows) A B C A B C 0.5 0.2 0.6 0.2 0.7 0.4 0.3 0.1 0 sums to 1
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 step s1 = Ts0 More generally sn = Tns0 — in the formula booklet ✓

🧭 Recipe — building T and stepping forward

  1. Choose a state order for rows and columns (keep it consistent) and label them.
  2. Fill each column with that state’s outgoing probabilities; check each column sums to 1.
  3. Write s0 as a column vector of starting probabilities (or a single 1 if the start is fixed).
  4. Multiply s1 = 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.50.20.6
0.20.70.4
0.30.10
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 C entry = 0.6 P(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.50.20.6
0.20.70.4
0.30.10
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.04 charity A A has the highest second-year probability, at 0.55.

💡 Top tips

⚠ Common mistakes

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.

Book Free Session →