A grid of 'where things go next': Picture a town with two cafés, A and B. Each week some loyal customers stay and some switch.
A transition matrix T is a grid of probabilities: the entry in row i, column j is the chance of moving from state j into state i in one step.
Because everyone who starts in a column must end up somewhere, each column adds up to 1.
How to read the words into the grid: Phrases like '70% of A's customers return next week' fill the A → A slot. '30% of A's customers switch to B' fills the A → B slot.
Think: the column is where you start, the row is where you end.
IB-style question — form the transition matrix
Each week, 80% of café A's customers return to A and 20% switch to B. Of café B's customers, 30% switch to A and 70% stay at B.
Write down the transition matrix T (order A then B).
Step by step
- Column A = where A's customers go: 0.8 stay (top), 0.2 leave (bottom). Column B = where B's customers go: 0.3 to A (top), 0.7 stay (bottom).
- Check each column sums to 1.
Final answer
T = [[0.8, 0.3], [0.2, 0.7]], with both columns summing to 1.
Multiply to move one week ahead: Store the current populations in a state vector s₀ (a column). Multiply by T to get next week's vector:
s₁ = T s₀.
Do it again for s₂ = T s₁ = T² s₀. In general, n steps ahead is sₙ = Tⁿ s₀ — let the GDC raise T to the power n and multiply.
IB-style question — population after 2 weeks
Using T = [[0.8, 0.3], [0.2, 0.7]], start with 500 customers at A and 500 at B.
Find how many are at each café after 2 weeks.
Step by step
- Write the start vector (A on top).
- Square T on the GDC.
- Multiply T² by s₀.
Final answer
After 2 weeks about 575 customers at A and 425 at B — café A is steadily gaining.
On the GDC: Store the matrix once, then compute Tn and the product Tn × s₀ directly. Round populations to whole numbers and say what they mean (e.g. 'about 575 customers visit café A').