---
tag: 0F1KBVY161
kind: definition
name: Transition matrix
msc: [60J10]
defines: 0F462493EA
uses: [033TJBZDG0]
sources:
  - url: https://en.wikipedia.org/wiki/Stochastic_matrix
    locator: Definition and properties
---

## Definition

Let $S$ be a nonempty countable set.
A transition matrix, or stochastic matrix, on $S$ is a family $P = (p_{ij})_{i, j \in S}$ of real numbers with
$$p_{ij} \ge 0 \quad \text{for all } i, j \in S \quad \text{and} \quad \sum_{j \in S} p_{ij} = 1 \quad \text{for each } i \in S.$$
The transition matrix of a time-homogeneous [[Markov chain|033TJBZDG0]] $(X_n)$ on $S$ has $p_{ij} = P(X_{n+1} = j \mid X_n = i)$.

## Remarks

Each row of $P$ is a probability distribution on $S$: the law of the next state, given the present state $i$.
A product of two stochastic matrices is stochastic. The $n$-th power $P^n$ gives the $n$-step probabilities $P(X_{m+n} = j \mid X_m = i)$.
If the row vector $\lambda$ is the law of $X_0$, then $\lambda P^n$ is the law of $X_n$.
A finite stochastic matrix has the eigenvalue $1$, with the eigenvector $(1, \dots, 1)^{\mathsf{T}}$, and all its eigenvalues have absolute value at most $1$.

## Explanations

### L1 human

The transition matrix is a table of the chances to move from each state to each state in one step.
For weather with states "sun" and "rain", the row of "sun" gives the chances of sun and of rain tomorrow, if today is sunny.
