core Estimated learning time: 4 h

4.18 Markov chains

You can write a transition matrix, compute the probability of being in a state after n steps, and find the stationary distribution of a chain.

Before:01a. Linear Algebra01b. Calculus and Optimisation01c. Probability01d. Statistics and Inference02. Python — Basics to Advanced

A Markov chain is the smallest useful model of a process that moves between states: where it goes next depends on where it is now and on nothing before that. That single assumption makes n-step behaviour a matter of matrix multiplication, and it is the assumption the hidden Markov model in the next topic inherits. The stationary distribution is the long-run answer and it arrives as an eigenvector, which is where the linear algebra earlier in this area pays off here.

Work through these

  • State the Markov property, and say what it throws away

    The next state depends on the present one and on nothing earlier. It is a strong assumption and it is what makes everything else in this topic computable, so it is worth knowing when it is false.

  • Write a transition matrix, and check that every row sums to one

    The table of probabilities of moving from each state to each other state. The row sums are the first thing to check, because a matrix that fails that test is not a chain at all.

  • Compute n-step probabilities, and apply the Chapman-Kolmogorov relation

    Raising the transition matrix to a power gives the probability of moving between two states in a given number of steps. The relation says why: a long path splits into two shorter ones at every intermediate state.

  • Find the stationary distribution as an eigenvector with eigenvalue one

    The distribution that no longer moves when the chain is applied to it, which is where a long run settles. It is the eigenvector problem from linear algebra arriving in a new place.

  • Say when a chain has a unique long-run answer, and when it does not

    A chain that can reach every state and does not cycle rigidly settles to one distribution regardless of where it started. Chains that fail either condition need a more careful answer.

Sign in to keep your progress.

Free resources

Links last checked 29 Aug 2026.

Stuck here?

Ask a mentor. A real person answers, and they can see exactly which topic you're on. Usually within a couple of working days.

Checking your session…

Topics shown in module order.