In this guide
← Maths AI guides

Number & algebra · AI HL

Markov chains and steady states

Translate state changes into a transition matrix, calculate future probabilities, and distinguish a stationary distribution from guaranteed convergence.

Course focus: AI HL · First-assessment-2021 course. The sections distinguish the mathematical idea, the calculation and its interpretation.

Before you start: Probability vectors, matrix products and simultaneous equations.

Start with a small example

Build it from the beginning

HL content

A Markov model updates a state using fixed transition probabilities. Decide whether your vectors are columns or rows before building the matrix. In a column-state convention, each column describes where one starting state can go and must sum to one.

A first walkthrough

Use \(T=\begin{pmatrix}0.8&0.3\\0.2&0.7\end{pmatrix}\) on the column state (100,0).

  1. The first state sends 80% to state 1 and 20% to state 2.
  2. Multiplication gives the next state (80,20).
  3. The total remains 100, consistent with the transition-column sums.
Try the practice ladder after learning the methods ↓

The foundations behind the method

Understand what the symbols mean

A Markov chain keeps track of the distribution across states rather than one deterministic path. Every transition probability is conditional on the present state. The matrix packages those conditional probabilities into one update, but the meaning of a row and column must be fixed before any multiplication.

How the ideas connect

A stationary distribution is a fixed-point question, while convergence is a limit question. Matrix eigenvalues connect them: eigenvalue 1 preserves the stationary direction, and other components must decay for a general starting vector to settle. Periodicity or several closed groups can prevent the simple long-run conclusion.

01

Start with the idea

Build your understanding

Conditional movement

Entries describe probabilities of a destination given a current state. They are not joint probabilities.

A distribution, not an itinerary

The vector describes uncertainty or population proportions; it does not assign a fixed route to every individual.

Compare the approaches

Choose by the information in the question, rather than the formula you recognise first.

Matrix power

When it helpsUse it for a specified finite number of unchanged transition steps.

Check before using itA state-update matrix must be multiplied in the convention supplied by the question.

Fixed-point equations

When it helpsUse them to find a stationary distribution.

Check before using itA stationary solution does not alone establish convergence from every starting state.

Your method plan

  1. Define the states, step and matrix convention.
  2. Calculate finite updates or solve the stationary equations with normalization.
  3. Check totals, convergence conditions and contextual assumptions.
02

Learn the methods

Learn step by step

1. Specify states and the time step

A Markov model describes random movement between states. The next-state probabilities depend on the current state rather than the full earlier history. This memory assumption must be plausible for the context and chosen time step. States should be exhaustive and nonoverlapping so their probabilities sum to one. Define whether a step means a day, purchase, visit or another event before using a matrix power.

2. Fix a row or column convention

This guide uses column state vectors and \(\mathbf p_{n+1}=T\mathbf p_n\). Column j contains probabilities of destinations from starting state j, so each column sums to one. Some questions instead use row vectors and row-stochastic matrices. Either convention works when used consistently. Reading a transposed convention silently can produce a vector whose entries no longer sum to one, providing a useful warning.

3. Calculate a future distribution

One matrix multiplication carries the current probabilities one step forward. Repeated steps use \(T^n\), with the state vector on the right in our convention. A probability vector predicts proportions across many comparable realizations, not a certain trajectory for one individual. For a population, multiply probabilities by the total only if the population and state model support that interpretation. Keep exact or full-precision entries during repeated powers.

Probability changes across successive steps

0246800.20.40.60.81Step nProbability in A
  • p(A) after each step
  • Stationary value 0.6
Starting entirely in A, the example moves to 80% A after one step and 70% A after two. Its limiting fraction is 60% A under this strictly positive transition matrix. The plotted probabilities are calculated from the column-state update.

Column-state update

Why this formula works

Each destination probability sums the contributions from every possible current state: its current probability multiplied by the conditional probability of entering that destination. Column sums of one ensure the total probability is preserved when the contributions are added across destinations.

The formula

\(\mathbf p_{n+1}=T\mathbf p_n\) \(\mathbf p_n=T^n\mathbf p_0\).

Quick example

For \(T=\begin{pmatrix}0.8&0.3\\0.2&0.7\end{pmatrix}\) and \(\mathbf p_0=(1,0)^T\), one step gives \((0.8,0.2)^T\).

Worked example: Two future steps

Using that T, start entirely in state A. Find the probabilities after two steps.

  1. First step: \(\mathbf p_1=(0.8,0.2)^T\).
  2. Second-step A probability is \(0.8(0.8)+0.3(0.2)=0.70\).
  3. Second-step B probability is \(0.2(0.8)+0.7(0.2)=0.30\).
  4. The vector (0.70,0.30) sums to one. It is a distribution, not a statement that one person spends exactly 70% of two steps in A.
Worked example: Start away from a pure state

Use \(T=\begin{pmatrix}0.8&0.3\\0.2&0.7\end{pmatrix}\) with initial vector (0.4,0.6).

  1. One step gives \((0.8(0.4)+0.3(0.6),0.2(0.4)+0.7(0.6))=(0.5,0.5)\).
  2. A second step gives (0.55,0.45).
  3. A third step gives (0.575,0.425).
  4. Each vector sums to one and approaches the stationary proportions (0.6,0.4). The forecast must retain the initial mixture rather than assume all start in A.

4. Find a stationary distribution

A stationary vector satisfies \(T\mathbf p=\mathbf p\), with nonnegative entries adding to one. Solve the equations together with that normalization; the matrix equation alone is usually dependent. This is an eigenvector with eigenvalue 1 scaled to a probability vector. Stationary means the distribution stays unchanged if used as the initial distribution. It does not by itself show that every other initial distribution approaches it.

Stationary equations

Why this formula works

A stationary distribution is a fixed point of the update. Subtracting the unchanged vector produces the homogeneous equation. Because scaling a fixed eigenvector preserves that equation, an additional normalization is required to turn it into a probability distribution with total one.

The formula

\((T-I)\mathbf p=0\) \(\sum_i p_i=1\) \(p_i\ge0\).

Quick example

The first row above yields \(0.2p_A=0.3p_B\); with \(p_A+p_B=1\), the stationary vector is \((0.6,0.4)^T\).

5. Check convergence and special chains

A finite irreducible, aperiodic chain has a unique stationary distribution and converges to it from any starting distribution. A strictly positive transition matrix is a sufficient way to ensure these conditions. An absorbing state may trap probability, and disconnected classes may preserve dependence on the initial distribution. A periodic chain can cycle even with a stationary vector. Inspect powers or eigendirections to support, rather than merely assume, long-run convergence.

Worked example: A stationary vector without convergence

Consider \(T=\begin{pmatrix}0&1\\1&0\end{pmatrix}\).

  1. The states switch with certainty at each step.
  2. The vector (0.5,0.5) stays unchanged and is stationary.
  3. Starting at (1,0) instead alternates between (0,1) and (1,0).
  4. The chain is periodic, so this starting distribution does not converge. Existence of a fixed vector is not enough.

6. Interpret assumptions and changes

A fixed transition matrix assumes the probabilities remain stable across steps. Seasonal effects, changing prices or a changing environment can invalidate that assumption. Compare model predictions to observed transitions and discuss which probabilities would plausibly vary. Probability totals should remain one after multiplication; small rounding drift is different from a wrong convention. If a task supplies a new matrix after a particular time, apply it in chronological order rather than raising one matrix to all steps.

Quick formula reference

For revision once you understand the methods above. Check the conditions before using a formula.

Column-state update

\(\mathbf p_{n+1}=T\mathbf p_n\), \(\mathbf p_n=T^n\mathbf p_0\).

Return to the explanation →

Stationary equations

\((T-I)\mathbf p=0\), \(\sum_i p_i=1\), \(p_i\ge0\).

Return to the explanation →

Learn to diagnose an error

Spot the mistake

The statement below is incorrect. Identify the missing condition or reasoning before opening the explanation.

Incorrect reasoning

Every transition matrix with a stationary vector must converge to that vector from every start.

Explain and repair the mistake

A two-state deterministic switch has a stationary half-and-half vector yet alternates forever from a pure starting state. Check the structure or appropriate convergence conditions rather than extrapolating a fixed-point solution to all initial states.

03

Connect and apply

Put the ideas together

A more demanding application of this guide’s methods. This is a learning stage; any additional HL content is labelled separately.

Worked application

Interpret a population forecast

A population of 500 uses the first example’s stationary distribution. How many are predicted in each state?

  1. The stationary probabilities are 0.6 and 0.4.
  2. Multiply each by 500 to obtain 300 in A and 200 in B.
  3. These are model-based expected counts, not certain individual outcomes.
  4. The conclusion assumes the population size and transition probabilities remain appropriate for the forecast.
Pause and explain

Why should fractional expected counts not be rounded inside a matrix update?

Check your reasoning

Intermediate rounding changes the probability proportions and can accumulate drift. Keep full precision through the update and round only a final count when the task requires a whole-number prediction.

Common mistakes and how to avoid them

  • A two-state deterministic switch has a stationary half-and-half vector yet alternates forever from a pure starting state. Check the structure or appropriate convergence conditions rather than extrapolating a fixed-point solution to all initial states.
  • A state-update matrix must be multiplied in the convention supplied by the question.
  • A stationary solution does not alone establish convergence from every starting state.
04

Practise independently

Build confidence, then apply it

Try each question before opening its hint or solution. If a method is new, return to the walkthrough, then try again. These learning stages describe the practice sequence; additional HL content is labelled separately.

  1. 1

    Build confidence

    HL extension

    Find the following state after another step.

    Need a starting point?

    Apply T to the updated state, not to the original one.

    Show the worked solution
    1. The first component is \(0.8(80)+0.3(20)=70\).
    2. The second is 30, so the state is (70,30).
  2. 2

    Apply and explain

    HL extension

    A total of 100 is stationary. Find its first component a.

    Need a starting point?

    At equilibrium the update must reproduce the state.

    Show the worked solution
    1. \(a=0.8a+0.3(100-a)\) gives \(0.5a=30\).
    2. Thus the stationary state is (60,40), which multiplication verifies.
  3. 3

    Check your understanding

    In this guide’s column-state convention, which matrix sums must equal one?

    Show the worked solution

    Each column must sum to one because it lists all destination probabilities conditional on one starting state. A row-vector convention uses a different orientation, so read the convention first.

  4. 4

    Use the method

    For the first example, what is the stationary fraction in state B?

    Show the worked solution

    It is 0.4. Solve 0.2pA=0.3pB with pA+pB=1, yielding pA=0.6. Substituting into both update equations confirms that the distribution stays unchanged.

Finished? Use the linked question bank below to practise selecting the method without a guide telling you which rule to use.

Using these methods in exam questions

AI Paper 1

GDC required

Short-response questions still need mathematical setup and interpretation. Choose the correct tool, enter the model or data carefully, and check units and rounding.

AI Paper 2

GDC required

Extended-response questions connect several steps. Keep intermediate values at full precision and explain how each result answers the context.

For this topic: Keep algebraic transformations visible. State restrictions before cancelling or taking logarithms, and check whether the question needs an exact expression or a rounded value.

HL only · GDC required

Paper 3: build a connected argument

Both AA HL and AI HL Paper 3 contain two extended problem-solving questions. A question develops a theme, so keep useful earlier results, test small cases and explain any proposed general rule. A calculator pattern can suggest a result; your mathematical reasoning must support it.

  1. Identify what the first part establishes and record the conditions under which it holds.
  2. When a later part introduces a new definition or model, connect it to methods you already know rather than assuming a new formula must have been memorised.
  3. Check the conclusion against an earlier numerical case and explain its meaning or limitation.

For the first-assessment-2021 courses. IB assessment reference ↗

Find a specific method or formula

Now practise the method

If you opened this guide from a question, return to that tab and try the method without looking at the example. Your answer stays in the question tab.

Practise this subtopic →

Want a broader practice session? Explore IB Maths AI HL practice questions →Try free IB Maths exam-style questions and worked solutions →

Original Arc Practice teaching notes for Maths AI. Core and HL sections are distinguished above. These notes follow the first-assessment-2021 course and are not an official IB publication or a complete syllabus checklist. IB course reference. Report a correction.