HL AI · Statistics and Probability

Markov chains and transition matrices (IB Math AI HL)

Updated October 2026

Quick answer: In IB Maths AI HL the transition matrix T holds the probabilities of moving from each state in its columns, so each column adds up to 1. If s₀ is the initial state vector, the state after n steps is Tⁿs₀. The steady state is the vector s with Ts = s whose entries add up to 1: the eigenvector of T for eigenvalue 1.

Weather forecasting, consumer brand-switching, disease spread. HL AI's Markov questions ask for the state after n steps and the steady-state distribution: the eigenvector of the transition matrix for eigenvalue 1.

Practise Markov chains and transition matrices with AI marking

Open the full HL AI engine — every question in this unit is worked through with instant AI-graded feedback on your handwritten workings.

Practise HL AI Statistics and Probability →

Key ideas

Worked example

If it is sunny today, the probability that it is sunny tomorrow is 0.8. If it is rainy today, the probability that it is sunny tomorrow is 0.4. Today is sunny. Find the probability that it is sunny in 2 days, and the long-term proportion of sunny days.

  1. With the states in the order (sunny, rainy), the columns are 'from sunny' and 'from rainy': T = [[0.8, 0.4], [0.2, 0.6]], and s₀ = (1, 0).
  2. T²s₀ is the first column of T²: 0.8 × 0.8 + 0.4 × 0.2 = 0.72 sunny and 0.2 × 0.8 + 0.6 × 0.2 = 0.28 rainy.
  3. Steady state (s, r): 0.8s + 0.4r = s gives 0.4r = 0.2s, so s = 2r.
  4. With s + r = 1: s = 2/3 and r = 1/3.

Answer: P(sunny in 2 days) = 0.72. In the long term 2/3 of days are sunny.

Exam-style HL AI questions on this topic

Try it now

1 of 5

  1. Question 1 of 5
  2. Question 2 of 5
  3. Question 3 of 5
  4. Question 4 of 5
  5. Question 5 of 5

5 quick questions on markov chains. No sign-in needed.

A Markov chain has states A and B and transition matrix \(\mathbf{T} = \begin{pmatrix}0.8 & 0.6 \\ 0.2 & 0.4\end{pmatrix}\) (each column is the state it moves FROM). In the long run, what proportion of the time is spent in state A?
Choose your answer · keys 1–4

Do it on your GDC

A GDC is allowed on every AI paper. Keystrokes for the TI-84 Plus CE, TI-Nspire CX II and Casio fx-CG50, with a checked worked example:

Maths IA ideas that use markov chains and transition matrices

Related in Statistics and Probability

Revise Markov chains and transition matrices for the exam

Stretch yourself: original algebra problems at Senior level (ages 16 to 18), with hints and full solutions: Problem S22 · Problem S86 · Problem S93 · Problem S28. All 22 →

More on this topic

FAQ

Where can I practise markov chains and transition matrices questions?

On the Markov Chains and Transition Matrices questions page: 13 exam-style HL AI questions with full mark schemes, plus free step-by-step worked examples.

Can I use my calculator for markov chains and transition matrices?

Yes: a GDC is allowed on every HL AI paper, so practise the calculator method as well as the working. The Matrices guide gives the keystrokes for the TI-84 Plus CE, TI-Nspire CX II and Casio fx-CG50.

What else is free here

Save your progress as you reviseA free account remembers the questions you have done on every topic and brings you back to this page.

Join free

Already have an account? Sign in