What is a Transition Matrix?
A Transition Matrix: A square matrix in which each entry gives the probability of moving from state to state in one step of a stochastic process. This follows the row-stochastic convention: row lists all probabilities of leaving state , so each row sums to 1.
If a system has states, the transition matrix is :
Each row corresponds to a current ("from") state, and each column corresponds to the next ("to") state.
Because every row lists all possible outcomes from a given state, the entries in each row must sum to 1. This is the defining constraint of a valid (row-stochastic) transition matrix.
Be careful about convention: in some textbooks columns sum to 1 (column-stochastic), and in that convention means the probability of moving from state to state . In the IB DP course, rows sum to 1, and state vectors are row vectors multiplied on the left of the matrix: .
Building a Transition Matrix , Worked Example
Weather forecasting model
Suppose a weather system has two states: Sunny (S) and Rainy (R).
- If today is Sunny: 70% chance of Sunny tomorrow, 30% chance of Rainy tomorrow.
- If today is Rainy: 40% chance of Sunny tomorrow, 60% chance of Rainy tomorrow.
Step 1 , Label rows and columns by state (S, R).
Step 2 , Fill in probabilities row by row:
In matrix form:
Check: Row 1: ✓ Row 2: ✓
This same information can be represented as a transition diagram , a directed graph where each node is a state and each arrow is labelled with the transition probability. For the weather model, there are arrows from S to S (0.7), S to R (0.3), R to S (0.4), and R to R (0.6). Reading arrows out of each node gives the corresponding row of the transition matrix.
Always verify rows sum to 1 immediately after writing down any transition matrix , catching errors early saves marks in exams. When working from a transition diagram, trace all arrows leaving each state to fill in that row.