Transition Matrix — Definition, Formula & Examples
A transition matrix is a square matrix whose entries represent the probabilities of moving from one state to another in a system that changes over discrete time steps. Each column (or row, depending on convention) sums to 1, since the system must go somewhere at each step.
A transition matrix (or stochastic matrix) is an matrix where each entry represents the probability of transitioning from state to state , and each column sums to 1: for all . (In some conventions, rows sum to 1 instead, with denoting the probability of going from state to state .)
Key Formula
Where:
- = The transition matrix
- = The initial state vector (probability distribution at step 0)
- = The state vector after k transitions
- = Number of time steps
How It Works
To find the state of a system after one step, multiply the transition matrix by the current state vector . The result gives the new probability distribution across all states. To find the state after steps, compute . A steady-state vector satisfies , meaning the system's distribution no longer changes — this is an eigenvector of with eigenvalue 1.
Worked Example
Problem: A city has two weather states: Sunny (S) and Rainy (R). If today is sunny, there is a 0.7 chance tomorrow is sunny and 0.3 chance it is rainy. If today is rainy, there is a 0.4 chance tomorrow is sunny and 0.6 chance it is rainy. If today is sunny (100% chance), find the weather probabilities after 2 days.
Set up P and x₀: Write the transition matrix (columns sum to 1) and the initial state vector.
Compute after 1 day: Multiply P by x₀.
Compute after 2 days: Multiply P by x₁.
Answer: After 2 days, there is a 61% chance of sun and a 39% chance of rain.
Why It Matters
Transition matrices are central to Markov chains, which model real systems in genetics (allele frequencies), finance (credit ratings), search engines (Google's PageRank algorithm), and queueing theory. Understanding them is essential in any probability or linear algebra course that covers stochastic processes.
Common Mistakes
Mistake: Confusing whether rows or columns should sum to 1.
Correction: The convention varies by textbook. In linear algebra courses, columns typically sum to 1 so that you multiply P on the left of a column state vector. In many probability texts, rows sum to 1 and the state vector is a row vector multiplied on the left of P. Always check which convention your course uses.
