IB Maths AI HL Markov Chains: Transition Matrices and Steady States

IB Maths AI HL Markov Chains

IB Maths AI HL Markov Chains: Transition Matrices and Steady States

Have you ever worked through a matrix question and found that the calculations were straightforward, but you were unsure what the final matrix actually represented?

This is a common challenge with Markov chains in IB Maths AI HL Markov chains. You might be asked to model how customers change their shopping habits, how people move between transport options, or how a population moves between different states over time.

The difficulty is understanding how to build the transition matrix, use its powers, and interpret the resulting probabilities.

This guide explains Markov chains and transition matrices step by step, with worked examples and the methods you need for IB Maths AI HL.

Table of Contents

What you need to know about Markov chains

A Markov chain is a mathematical model describing a system that moves between a set of possible states.

The important assumption is that the probability of the next state depends on the current state, rather than the entire history of previous states.

For example, imagine that people choose between two transport options:

  • State A: travelling by bus.
  • State B: travelling by train.

Some people may continue using the same transport option, while others may switch.

A Markov chain allows us to represent these changes using probabilities.

Quick answer: You use a transition matrix to represent the probabilities of moving between states. Multiplying the matrix by an initial state vector gives the probabilities after one transition. Raising the matrix to a power allows you to calculate probabilities after several transitions. A steady state describes the long term probability distribution when the system settles into a stable pattern.

1. Understanding a transition matrix

A transition matrix contains the probabilities of moving from one state to another.

Consider the following system:

  • If someone currently uses the bus, there is an 80% probability they will continue using it and a 20% probability they will switch to the train.
  • If someone currently uses the train, there is a 30% probability they will switch to the bus and a 70% probability they will continue using the train.

We can represent this information using a transition matrix:

[
T=
\begin{pmatrix}
0.8 & 0.3\
0.2 & 0.7
\end{pmatrix}
]

The columns represent the current states, while the rows represent the next states.

TransitionProbability
Bus to bus0.8
Bus to train0.2
Train to bus0.3
Train to train0.7

Notice that each column adds up to 1.

[
0.8+0.2=1
]

[
0.3+0.7=1
]

This is an important check when constructing a transition matrix using the column convention.

Exam tip: Always check the order of the states and the orientation of the matrix. A common mistake is placing probabilities in the wrong rows or columns.

2. Constructing a transition matrix from a question

An examination question may describe the movement between states using words rather than giving you a matrix.

Your first task is to identify the states and translate the information into probabilities.

Suppose a company tracks whether customers buy Product A or Product B.

Each month:

  • 75% of customers who buy A continue buying A.
  • 25% of customers who buy A switch to B.
  • 40% of customers who buy B switch to A.
  • 60% of customers who buy B continue buying B.

Let the states be A and B, in that order.

The transition matrix is:

[
T=
\begin{pmatrix}
0.75 & 0.40\
0.25 & 0.60
\end{pmatrix}
]

Check the columns:

[
0.75+0.25=1
]

[
0.40+0.60=1
]

The matrix is correctly constructed.

When answering this type of question, write down the state order before filling in the matrix. This makes it easier to avoid reversing a transition probability.

3. Initial state probability matrices

The initial state matrix describes the distribution of the system before any transitions occur.

For example, suppose 70% of people currently use the bus and 30% use the train.

The initial state matrix is:

[
s_0=
\begin{pmatrix}
0.7\
0.3
\end{pmatrix}
]

The entries represent probabilities, so they must add up to 1.

[
0.7+0.3=1
]

The subscript 0 means that this is the initial state, before any transitions.

After one transition, the state matrix is written as (s_1).

After two transitions, it is written as (s_2).

This notation helps you keep track of how many transitions have occurred.

4. Calculating probabilities after several transitions

The key formula for Markov chains in IB Maths AI HL is:

[
\boxed{s_n=T^n s_0}
]

where:

  • (s_n) is the state matrix after (n) transitions.
  • (T) is the transition matrix.
  • (s_0) is the initial state matrix.
  • (n) is the number of transitions.

You can calculate the next state by multiplying the transition matrix by the current state matrix.

[
s_1=Ts_0
]

For two transitions:

[
s_2=T^2s_0
]

For five transitions:

[
s_5=T^5s_0
]

Technology is useful when calculating higher powers of a matrix. However, you should understand what the result represents before using your calculator.

Worked Example 1: Finding the state after two transitions

A transport survey shows that initially:

  • 70% of people use the bus.
  • 30% of people use the train.

The transition matrix is:

[
T=
\begin{pmatrix}
0.8 & 0.3\
0.2 & 0.7
\end{pmatrix}
]

Find the probability distribution after two transitions.

Step 1: Write the initial state matrix

[
s_0=
\begin{pmatrix}
0.7\
0.3
\end{pmatrix}
]

Step 2: Calculate the state after one transition

Use:

[
s_1=Ts_0
]

Substitute:

[
s_1=
\begin{pmatrix}
0.8 & 0.3\
0.2 & 0.7
\end{pmatrix}
\begin{pmatrix}
0.7\
0.3
\end{pmatrix}
]

Multiplying gives:

[
s_1=
\begin{pmatrix}
0.8(0.7)+0.3(0.3)\
0.2(0.7)+0.7(0.3)
\end{pmatrix}
]

Therefore:

[
s_1=
\begin{pmatrix}
0.65\
0.35
\end{pmatrix}
]

After one transition, 65% of people are expected to use the bus and 35% to use the train.

Step 3: Calculate the state after two transitions

Now multiply the transition matrix by the new state matrix.

[
s_2=Ts_1
]

[
s_2=
\begin{pmatrix}
0.8 & 0.3\
0.2 & 0.7
\end{pmatrix}
\begin{pmatrix}
0.65\
0.35
\end{pmatrix}
]

[
s_2=
\begin{pmatrix}
0.8(0.65)+0.3(0.35)\
0.2(0.65)+0.7(0.35)
\end{pmatrix}
]

Therefore:

[
\boxed{
s_2=
\begin{pmatrix}
0.625\
0.375
\end{pmatrix}
}
]

Step 4: Interpret the result

After two transitions:

  • 62.5% of people are expected to use the bus.
  • 37.5% of people are expected to use the train.

The two probabilities add up to 1, which is a useful check.

Important: The answer represents the expected probability distribution after two transitions, not necessarily the exact number of people using each transport option.

5. Using powers of a transition matrix

Instead of multiplying the transition matrix repeatedly, you can calculate a matrix power.

For example:

[
s_2=T^2s_0
]

For the transport example:

[
T^2=
\begin{pmatrix}
0.70 & 0.45\
0.30 & 0.55
\end{pmatrix}
]

Therefore:

[
s_2=
\begin{pmatrix}
0.70 & 0.45\
0.30 & 0.55
\end{pmatrix}
\begin{pmatrix}
0.7\
0.3
\end{pmatrix}
]

[
\boxed{
s_2=
\begin{pmatrix}
0.625\
0.375
\end{pmatrix}
}
]

You obtain the same result as repeated multiplication.

The matrix (T^2) has another useful interpretation. Its entries represent the probabilities of moving from one state to another in exactly two transitions.

For example, the value 0.70 in the first row and first column represents the probability of being in the bus state after two transitions, given that the system started in the bus state.

This interpretation can help you answer questions that ask about a particular movement between states rather than the whole population distribution.

6. What is a regular Markov chain?

A regular Markov chain is a Markov chain for which some positive integer power of its transition matrix has all positive entries.

In simpler terms, after a sufficient number of transitions, it is possible to move between every pair of states with a positive probability.

Regularity is important because it guarantees a unique steady state distribution.

You may be asked to identify whether a Markov chain is regular. In that situation, examine powers of the transition matrix and check whether all entries become positive.

Do not assume that every transition matrix represents a regular Markov chain.

7. Finding the steady state of a Markov chain

The steady state is the long term probability distribution of a Markov chain.

At the steady state, applying another transition does not change the distribution.

This means:

[
\boxed{Ts=s}
]

where (s) represents the steady state matrix.

This is different from calculating the state after a fixed number of transitions.

For example, a question asking for the state after 10 transitions requires (T^{10}s_0).

A question asking for the steady state requires finding a distribution that remains unchanged after another transition.

Worked Example 2: Finding the steady state

Consider the transition matrix:

[
T=
\begin{pmatrix}
0.8 & 0.3\
0.2 & 0.7
\end{pmatrix}
]

Find the steady state probability distribution.

Step 1: Define the steady state

Let the steady state matrix be:

[
s=
\begin{pmatrix}
x\
y
\end{pmatrix}
]

Since the probabilities must add up to 1:

[
x+y=1
]

Therefore:

[
y=1−x
]

Step 2: Use the steady state equation

We know:

[
Ts=s
]

Substitute the matrix:

\begin{pmatrix}
x\
y
\end{pmatrix}
]

Using the first row:

[
0.8x+0.3y=x
]

Substitute (y=1−x):

[
0.8x+0.3(1−x)=x
]

Expand:

[
0.8x+0.3−0.3x=x
]

[
0.3=0.5x
]

Therefore:

[
x=0.6
]

Step 3: Find the second probability

Since:

[
x+y=1
]

[
0.6+y=1
]

[
y=0.4
]

The steady state matrix is:

[
\boxed{
s=
\begin{pmatrix}
0.6\
0.4
\end{pmatrix}
}
]

Step 4: Interpret the result

In the long term:

  • 60% of people are expected to use the bus.
  • 40% of people are expected to use the train.

The distribution remains unchanged after another transition.

This is the steady state.

8. Finding long term probabilities using technology

The IB syllabus allows students to find steady state and long term probabilities using repeated multiplication of the transition matrix or by solving a system of linear equations.

You should be comfortable with both approaches.

Repeated multiplication

Calculate:

[
s_n=T^n s_0
]

for increasingly large values of (n). For a regular Markov chain, the state matrix approaches the steady state distribution.

Solving simultaneous equations

Use:

[
Ts=s
]

together with the condition that the entries of (s) add up to 1.

For more advanced matrix work, the steady state is also connected to the eigenvector associated with the eigenvalue 1. The entries of this eigenvector must be scaled so that they add up to 1.

The method you use should match the question and the instructions about exact answers.

9. Common mistakes in Markov chain questions

1. Reversing the rows and columns

Under the column state convention, each column represents the current state.

Check that every column adds up to 1.

2. Using the wrong number of transitions

If a question asks for the state after four transitions, use:

[
s_4=T^4s_0
]

Do not use (T^3s_0).

3. Confusing a matrix power with a state matrix

The matrix (T^n) describes transitions between states over (n) steps.

The expression (T^n s_0) gives the actual state distribution after those steps.

4. Forgetting to check the probability total

The entries of a probability state matrix should add up to 1.

If they do not, check your matrix construction and multiplication.

5. Confusing the steady state with a fixed number of transitions

A steady state is a stable long term distribution.

It is not automatically the same as the distribution after five, ten, or any other fixed number of transitions.

6. Giving a numerical result without explaining it

If a question asks you to interpret the steady state, explain what each probability represents in the original context.

A correct matrix is not always a complete answer.

10. How to revise Markov chains for IB Maths AI HL

Use this 60 minute revision routine:

TimeRevision activity
10 minutesReview transition matrices and state notation
15 minutesConstruct matrices from written descriptions
15 minutesCalculate state matrices after several transitions
10 minutesSolve steady state problems
10 minutesReview errors and practise interpretation

When reviewing your answers, ask yourself:

  • Did I identify the states correctly?
  • Did I use the correct matrix orientation?
  • Did I multiply in the correct order?
  • Did I use the correct number of transitions?
  • Can I explain what each probability means?
  • Can I distinguish a long term distribution from a fixed step result?

For a broader approach to real world mathematical models, see the guide on solving IB Maths AI HL modelling questions.

How Mathzem can help you practise Markov chains

Markov chain questions require more than knowing how to multiply matrices. You also need to construct the correct model, choose the right number of transitions, and interpret the probabilities.

Mathzem provides IB Mathematics practice questions and allows students to upload handwritten working for AI Examiner feedback.

This can help you review your method, identify mistakes in your calculations, and understand where your reasoning needs improvement.

You can also review your performance across topics and identify areas that need further practice.

Explore IB Maths practice questions and feedback to work on your mathematical reasoning, not just the final answer.

If you find that the same errors appear repeatedly, the guide to fixing mistakes in IB Mathematics can help you build a more useful review routine.

Frequently asked questions

1. Are Markov chains included in IB Maths AI HL?

Yes. Markov chains and transition matrices are included in the AI HL syllabus under AHL 4.19.

2. What is the formula for a Markov chain?

The main formula is:

[
s_n=T^n s_0
]

It calculates the state probability matrix after (n) transitions.

3. What is a steady state in a Markov chain?

A steady state is a probability distribution that remains unchanged after another transition. It satisfies:

[
Ts=s
]

4. How do you know if a Markov chain is regular?

A Markov chain is regular if some positive integer power of its transition matrix contains only positive entries.

5. Do I need to use a calculator for Markov chains?

Technology is useful for calculating matrix powers and solving systems of equations. However, you should understand how to construct the transition matrix and interpret the results.

6. What is the difference between a transition matrix and a state matrix?

A transition matrix contains the probabilities of moving between states. A state matrix describes the probability distribution of the system at a particular time.

Final thoughts

Markov chains become much easier when you understand what each matrix represents.

Start by identifying the states and constructing the transition matrix. Check its probabilities, write the initial state matrix, and use matrix multiplication to calculate future distributions.

For steady state questions, remember that the distribution must satisfy (Ts=s).

Most importantly, practise interpreting your answers in context. IB Maths AI HL questions test your ability to connect matrix calculations with real situations.

Practise IB Mathematics with Mathzem, review your working, and use feedback to improve the methods behind your answers

Leave a Reply

Your email address will not be published. Required fields are marked *