A first-order Markov chain is a sequence of random states whose next-state distribution depends on the present state, not the full history: p(x₁,…,xT) = p(x₁)∏ₜ₌₂ᵀ p(xt|xt−1). The present state therefore contains the information needed to predict the next state. section 2.1.2 section 7.1
For K discrete states, define Aij = p(xt = j | xt−1 = i). The K × K transition matrix is stochastic: each row sums to 1. An initial distribution π₀ and A specify how state probabilities evolve: π₁ = π₀A, and repeated transitions give πt = π₀Aᵗ. When A does not change over time, the chain is time invariant. A stationary distribution π remains unchanged by a transition, so πA = π. section 2.1.2 section 7.1
Two states
Suppose the probability of leaving state 1 is α and the probability of leaving state 2 is β. Then A = [[1−α, α], [β, 1−β]]. Each row describes the possible next states from one current state and sums to 1. This small matrix makes both the one-step update and long-term distribution concrete. section 7.1
The two-state diagram shows which transition probability belongs to each directed change or stay in state. section 7.1
For page rank, states are web pages and transitions follow links in a graph. The link structure yields a sparse transition matrix; page rank is a stationary distribution computed at scale with power iteration. In Markov chain Monte Carlo, a chain is instead constructed so its stationary distribution is a target posterior. Hidden Markov models place a Markov chain over latent states and model observations emitted from them. section 2.1.2 section 7.8 section 1.4.1



