A student changes revision habits, a customer switches brands, and a commuter chooses between transport options. These stories may look unrelated, but they share an interesting mathematical question: if we know the present situation, can we describe the probabilities of what happens next? That is where Markov chains become useful.
The core aim of Markov chains mastery is to build and interpret a model of movement between states. Students learn to define states clearly, read transition probabilities, multiply stochastic matrices, calculate the probabilities of later outcomes, identify stationary distributions and understand the assumptions that make a model trustworthy. Markov chains are not a way to predict every future event exactly. They are a disciplined way to model uncertainty through time.
This article continues the eduKateSG Mathematics Mastery pathway from Probability Skills, Matrices, Eigenvalues and Eigenvectors and Tree Diagrams. For a deeper specialist treatment of mixing, hitting times and stochastic systems, read How Markov Chains Work. Here, the question is what a learner should understand, calculate and check to achieve mastery.
Start With States, Not Matrix Notation
A state is a distinct condition the system can occupy. A simple weather model could use two states: Sunny and Rainy. A transport model might use Walk, Bus and Train. A study routine might use On Schedule, Behind Schedule and Caught Up.
State design is the first hard decision. If states overlap, are poorly defined, or omit important possibilities, the matrix can be perfectly calculated and still answer the wrong question. Good modelling asks: what is the population or system, what time step are we using, and can every observed situation be assigned to exactly one state?
The Markov Property Is an Assumption About Conditional Probability
In a first-order Markov model, the distribution of the next state depends on the current state, not on additional details of the earlier history once the current state is known. Symbolically:
P(Xₙ₊₁=j | Xₙ=i, earlier states)=P(Xₙ₊₁=j | Xₙ=i).
This does not claim that history never matters in real life. It says the chosen state description is assumed to contain enough relevant information to model the next step. If a customer’s behaviour also depends on how long they have held a subscription, for example, a state containing only “subscriber” might be too crude.
Transition Probabilities Describe Possible Next Steps
A transition probability answers a question such as: given that today is Sunny, what is the probability that tomorrow is Rainy? It must lie between 0 and 1. From one current state, the probabilities of all possible next states must add to 1.
That row-total check is one of the simplest and most valuable error checks in this topic.
Worked Example: Build a Two-State Transition Matrix
Imagine an illustrative weather model. From a Sunny day, the next day is Sunny with probability 0.8 and Rainy with probability 0.2. From a Rainy day, the next day is Sunny with probability 0.3 and Rainy with probability 0.7.
In the state order Sunny, Rainy, write the row-stochastic transition matrix:
| Today’s state | Tomorrow Sunny | Tomorrow Rainy |
|---|---|---|
| Sunny | 0.8 | 0.2 |
| Rainy | 0.3 | 0.7 |
Thus P=[[0.8,0.2],[0.3,0.7]]. The rows represent today’s states and the columns represent tomorrow’s states. Both rows sum to 1. This orientation matters: some books use column-stochastic matrices instead, so check the convention before multiplying.
A Probability Distribution Records Where the System Is
With row vectors, let v₀=[1,0] mean the starting day is certainly Sunny. A more uncertain starting distribution might be [0.6,0.4], meaning 60% probability of Sunny and 40% of Rainy.
The distribution entries must be non-negative and must total 1.
Matrix Multiplication Moves the Model One Step Forward
For a row-stochastic model, the update rule is vₙ₊₁=vₙP. Starting from v₀=[1,0], the next distribution is:
v₁=[1,0]P=[0.8,0.2].
That tells us the next day is predicted to be Sunny with probability 0.8 and Rainy with probability 0.2. Matrix multiplication is combining the alternative paths into one complete distribution.
Worked Example: Find the Two-Step Distribution
Starting from Sunny, after one step we have v₁=[0.8,0.2]. Multiply again:
v₂=[0.8,0.2]P.
Sunny probability: 0.8(0.8)+0.2(0.3)=0.70. Rainy probability: 0.8(0.2)+0.2(0.7)=0.30.
So v₂=[0.70,0.30]. Notice what changed: the chance of Sunny after two steps is not simply 0.8², because a Rainy first step can also return to Sunny. We must count all valid paths. This links Markov chains directly to Tree Diagrams.
Matrix Powers Describe Several Time Steps
Applying the same transition rule repeatedly gives vₙ=v₀Pⁿ. The matrix P² gives two-step transition probabilities between every pair of states, P³ gives three-step transitions, and so on.
This is why matrix powers matter outside the classroom: they compactly represent a large number of possible routes through a system.
A Stationary Distribution Remains Unchanged
A stationary distribution π satisfies πP=π and its entries sum to 1. It is a probability distribution that the transition rule leaves unchanged.
Importantly, a stationary distribution is not the same as a guarantee that every starting distribution will converge to it. The structure of the Markov chain determines long-run behaviour.
Worked Example: Solve the Stationary Distribution
Return to P=[[0.8,0.2],[0.3,0.7]]. Let π=[s,r] with s+r=1.
From πP=π, the flow from Sunny to Rainy equals the reverse flow at stationarity: 0.2s=0.3r.
Hence s=1.5r. Together with s+r=1, this gives π=[0.6,0.4].
Checking: [0.6,0.4]P=[0.6,0.4]. The model’s stationary proportions are 60% Sunny and 40% Rainy, not a promise about the weather on any particular day.
Stationarity and Eigenvectors Are Connected
The equation πP=π says π is a left eigenvector of P with eigenvalue 1. Normalising a non-negative stationary eigenvector to sum to 1 gives a stationary probability distribution.
That is the bridge to Eigenvalues and Eigenvectors. It also explains why eigenvector methods appear in some models of ranking and network movement.
When Does the Chain Settle Down?
For a finite chain, irreducibility means all states communicate through possible paths. Aperiodicity rules out being trapped in a fixed cycle of return times. If both hold, the chain has a unique stationary distribution and distributions from any starting state converge to it.
These conditions should be learned conceptually before more formal proofs. A deterministic alternation between two states, for example, can have a stationary distribution while its actual state oscillates rather than settling from a single starting point.
Absorbing States Change the Story
An absorbing state cannot be left once entered. In a simple model of product use, “account permanently closed” might be represented as absorbing if the model explicitly treats reactivation as impossible.
Such a model can answer questions about eventual absorption or expected steps until it occurs. But whether the absorbing-state assumption makes sense must be examined before interpreting the result.
How Markov Chains Appear in PageRank and Networks
A random walk on a network can be represented as a Markov chain: each state is a page or node, and transitions represent movement to connected nodes. A stationary or related ranking distribution can help describe long-run visit frequencies.
For the application rather than the mastery mechanism, see Why Mathematics? | PageRank, Random Walks and Eigenvector Centrality.
Other Useful Applications
- Customer journeys: transitions between product or service states.
- Reliability: movement between operating, degraded and failed conditions.
- Ecology: simplified population or habitat-state changes.
- Learning analytics: movement between defined learning states, with careful evidence and privacy safeguards.
- Queueing systems: changing numbers of items or people in a system.
A Markov model can be useful in any of these domains, but the states, time scale and transition evidence must be validated separately.
Where Markov Models Can Mislead
The model may fail when transition probabilities change with time, when important history is omitted, when a state combines unlike situations, or when transition estimates come from too few observations.
For example, a student’s probability of improving tomorrow may depend on accumulated practice and sleep over several days. A simple “doing well / struggling” first-order chain can overlook that history unless the state definition is enriched.
Common Markov-Chain Mistakes
- Rows of a row-stochastic matrix do not total 1.
- States change order between the probability vector and the matrix.
- Using Pv instead of vP without changing convention.
- Calculating one path and missing alternative paths.
- Treating a stationary distribution as a guaranteed next-step prediction.
- Assuming every chain converges.
- Assuming Markov means real-world history never matters.
Three Pathways for Building Mastery
Repair: Probability and States
Begin with two carefully defined states, conditional probabilities and a simple tree diagram. Ask the learner to explain each row before introducing matrix multiplication.
Stabilise: Distributions and Checking
Practise vP, vP², row-sum checks and stationary distributions. Require a sentence that interprets each computed probability instead of recording only a matrix.
Extend: Long-Run and Structural Questions
Investigate irreducibility, periodicity, absorbing states, hitting times, time-varying transitions and links to eigenvectors and PageRank. Use How Markov Chains Work for the deeper theory.
A Weekly Markov-Chain Practice Routine
- Define one real or imaginary system with two or three states.
- Build a transition table and check each row.
- Calculate one next-step distribution.
- Calculate a two-step distribution in two ways: paths and matrix multiplication.
- Solve one stationary-distribution problem.
- Explain one modelling assumption that could fail.
How Parents and Learners Can Recognise Progress
- I can define states without overlap.
- I can explain the Markov assumption in plain language.
- I can build a row-stochastic matrix.
- I can calculate and interpret vP.
- I can calculate multi-step probabilities.
- I can check totals and path alternatives.
- I can solve πP=π with normalisation.
- I know stationarity is not the same as guaranteed convergence.
- I can identify absorbing or periodic behaviour.
- I can explain where the model may be too simplistic.
Frequently Asked Questions
What is a Markov chain in simple terms?
It is a probability model of transitions between states where the distribution of the next state depends on the present state under the chosen model.
Why must a transition matrix row add to 1?
In a row-stochastic model, the row lists every possible next state from one current state. Those alternatives form a complete probability distribution.
What is a stationary distribution?
It is a probability distribution that remains unchanged after applying the transition matrix once.
Are Markov chains only used for weather?
No. Weather is a friendly example, but Markov models also appear in networks, reliability, ecology, queues and other systems with probabilistic state changes.
Helpful Reading in the eduKateSG Mathematics Ecosystem
- How Markov Chains Work
- Probability Skills
- Matrices
- Eigenvalues and Eigenvectors
- PageRank, Random Walks and Eigenvector Centrality
- Mathematics Learning Hub
The Core Aim
The core aim of Markov-chain mastery is not to make students calculate higher powers of matrices faster. It is to make uncertain transitions understandable, testable and interpretable.
A strong learner can build a legitimate state model, calculate future distributions, understand stationarity and articulate the conditions under which the model’s predictions deserve trust. That is mathematical reasoning capable of travelling well beyond the classroom.
