Markov Chains: Steady State and Mixing
A finite, irreducible, aperiodic Markov chain converges to a unique stationary distribution — the long-run fraction of time spent in each state — regardless of where it starts. The mixing time measures how fast this convergence happens. Applies to: random walks, PageRank, MCMC sampling, queueing theory, population genetics. Foundational results due to A. A. Markov (1906), Perron–Frobenius (1907–1912), and modern mixing theory (Diaconis, Aldous, Saloff-Coste, 1980s–2000s).
A Markov chain "forgets" its starting point. The transition matrix acts repeatedly on distributions; under mild conditions all initial distributions are pulled toward a single fixed direction — the stationary vector — which is the left eigenvector of for eigenvalue . Everything else contracts at a rate set by the second-largest eigenvalue modulus. Steady state is the fixed point; mixing time is the speed of approach.
Formal Statement
A (time-homogeneous, discrete-time) Markov chain on a finite state space is a sequence of -valued random variables satisfying the Markov property:
Derivation hint: this is the defining assumption — conditional independence of the future from the past given the present. The numbers form the transition matrix , which is row-stochastic:
Derivation hint: each row is the conditional distribution of the next state given the current state, so it sums to 1. If is the row vector giving the distribution of (so ), then
Derivation hint: apply the law of total probability over the current state, then iterate.
A probability row vector is a stationary (or steady-state, or invariant) distribution if
Derivation hint: is a fixed point of the update [3]; it is a left eigenvector of with eigenvalue , normalized to a probability vector.
- Irreducible: every state is reachable from every other state, i.e. for all there exists with .
- Period of state : . The chain is aperiodic if for all (in an irreducible chain the period is common to all states).
- Ergodic: irreducible and aperiodic. Equivalently, has all strictly positive entries for some (a primitive matrix).
Let be the transition matrix of a finite, irreducible, aperiodic (ergodic) Markov chain. Then: 1. There exists a unique stationary distribution with for all . 2. Convergence: for every initial distribution ,
Derivation hint: converges to the rank-one matrix ; consequence of Perron–Frobenius applied to the primitive matrix . 3. Ergodic / mean-return characterization: , where is the first return time to .
Derivation hint: by the renewal/strong law of large numbers, the long-run fraction of time in state equals one over the average gap between visits.
A chain is reversible with respect to if it satisfies the detailed balance equations:
Derivation hint: summing over gives , i.e. — so detailed balance implies stationarity (but not conversely). Reversible chains have real eigenvalues, because is self-adjoint in the inner product .
The total variation distance between distributions on is
Derivation hint: the maximizing set is ; the accounts for equal positive and negative mass. Define the worst-case distance to stationarity at time :
where is the point mass at . The mixing time at threshold is
Derivation hint: is conventional; submultiplicativity lets you boost any fixed threshold to arbitrarily small , giving .
Let be reversible and ergodic with eigenvalues . Let be the second-largest eigenvalue modulus (SLEM) and define the absolute spectral gap . Then
where . Derivation hint: the upper bound expands in the orthonormal eigenbasis of the self-adjoint operator; each non-principal mode decays as , and the worst-case distance is bounded by , then converted to TV via Cauchy–Schwarz. The lower bound uses the slowest-decaying eigenfunction as a test statistic.
Why It Holds / Derivation
Step 1 (Eigenvalue 1 exists). Since each row of sums to , the all-ones column vector satisfies . Thus is an eigenvalue (with right eigenvector ), so a left eigenvector with also exists.
Step 2 (Spectral radius is 1). For any eigenvalue with right eigenvector , pick the component of largest modulus. From ,
so . Hence the spectral radius equals .
Step 3 (Uniqueness and positivity — Perron–Frobenius). Ergodicity means entrywise for some (primitivity). The Perron–Frobenius theorem for primitive nonnegative matrices guarantees a simple dominant eigenvalue equal to the spectral radius () with a strictly positive eigenvector, and all other eigenvalues satisfy . The left Perron eigenvector, normalized to sum to , is the unique stationary , and .
Step 4 (Convergence rate). Write the spectral/Jordan decomposition. The eigenvalue contributes the rank-one projector (since , ). All other modes have , so
where the polynomial factor accounts for possible Jordan blocks (absent in the reversible/diagonalizable case). Therefore , since .
∎Consider the two-state chain that deterministically swaps states:
It is irreducible but has period . Its eigenvalues are and ; the second has modulus , so oscillates: , . Starting from , the distribution alternates and never converges, even though the unique stationary distribution exists (it is the time-average). Aperiodicity removes the eigenvalue (and other roots-of-unity eigenvalues on the unit circle), restoring genuine convergence.
∎A St. Petersburg mathematician and student of Pafnuty Chebyshev, Markov introduced his "chains" in 1906 to prove a law of large numbers for dependent variables, defying the prevailing belief that independence was required. In a famous 1913 application he analyzed the sequence of vowels and consonants in the first 20,000 letters of Pushkin's Eugene Onegin, computing transition frequencies — arguably the first statistical study of language as a Markov process. A committed atheist, he partly developed the theory to rebut Pavel Nekrasov's claim that the law of large numbers implied free will (and hence God). His framework became the backbone of stochastic modeling across the 20th century.
Building Intuition
Picture a particle hopping among rooms according to the row probabilities of . Over a long time it visits room a fraction of all steps — that's the steady state, equation [6]. Now imagine releasing a whole gas of particles in any initial pattern. Each application of smears the pattern out a little; ergodicity ensures every room communicates with every other, so the pattern relaxes toward the equilibrium cloud . The rate of relaxation is set by how "connected" the chain is. A nearly-disconnected chain — two clusters joined by a thin bridge — has a tiny spectral gap and mixes slowly, because escaping one cluster is rare (a bottleneck, quantified by conductance). A well-connected chain has a large gap and mixes fast. Mixing time in equation [11]: the is the relaxation time per mode, the is the price of having to fill in rarely-visited states. The eeriest feature is cutoff: many natural chains stay glued to TV distance until a critical time, then collapse to in a window much shorter than the mixing time itself — like ice that stays solid then melts almost all at once.
Worked Examples
Given. A machine is either Working (W) or Broken (B). Each day: , .
Step 1 — Stationary distribution. Solve with . The general solution for a -state chain is
Plugging in: , .
Step 2 — Eigenvalues. For a -state chain, and . So SLEM , spectral gap , relaxation time days.
Step 3 — Exact distance to stationarity. Starting from W (), the closed form is
so
Step 4 — Mixing time at : need , true already at here (this start is close); take :
Given. A lazy random walk on the cycle ( nodes in a ring). From any node: stay with prob , move to each neighbor with prob . Take .
Step 1 — Stationary distribution. By symmetry (vertex-transitive), is uniform: Check detailed balance [7]: — reversible. ✓
Step 2 — Eigenvalues. The cycle's transition operator is diagonalized by Fourier modes. The eigenvalues are
For : gives Laziness keeps all , so .
Step 3 — Spectral gap and relaxation time.
Step 4 — Scaling. For general , the gap is for large . So and the mixing time scales as
This diffusive scaling reflects that the walk must random-walk a distance to forget its start, taking steps.
Common Misconceptions
Three distinct things must not be conflated: 1. Existence of holds for any finite chain (a fixed point of a stochastic matrix always exists, by Brouwer/Perron–Frobenius). Uniqueness requires irreducibility. 2. Convergence additionally requires aperiodicity. A periodic chain has a unique stationary distribution but does not converge — it cycles (see the swap chain proof above). 3. Reversibility (detailed balance) is sufficient but not necessary for to be stationary. Many important chains (e.g. PageRank, directed walks) are non-reversible yet still have a stationary distribution. Do not assume real eigenvalues unless the chain is reversible.
Equation [11]'s upper bound carries a factor . For chains where is exponentially small (state space of size ), this factor can make the spectral bound off by a factor of from the true mixing time. Sharper tools — coupling, strong stationary times, log-Sobolev inequalities, and Wilson's method — are often needed.
Let
(two absorbing states, the identity matrix). It is not irreducible. Every distribution satisfies , so there are infinitely many stationary distributions and no convergence to a single one — the limit depends entirely on . This shows irreducibility is essential for the uniqueness clause of the Fundamental Theorem.
The directed -cycle deterministically has and unique stationary , but cycles through forever. The Cesàro (time) average converges to , but the pointwise limit [5] does not exist. Eigenvalues are the three cube roots of unity, two of which sit on the unit circle.
Connections
- <span class="wiki-link-missing">Perron–Frobenius Theorem</span> is the linear-algebra engine behind existence, uniqueness, and positivity of ; the simplicity of the eigenvalue for a primitive matrix is ergodic convergence.
- <span class="wiki-link-missing">Random Walks on Graphs</span> are the canonical reversible chains; for a graph the stationary distribution is , and mixing connects to graph conductance via Cheeger's inequality .
- <span class="wiki-link-missing">Markov Chain Monte Carlo</span> inverts the problem: design (e.g. Metropolis–Hastings, Gibbs sampler) so that a prescribed target is stationary, then run until mixed to draw samples.
- <a class="wiki-link" href="/wiki/ndli-iit-kgp-ma10002-mathematics-ii-eigenvalues-and-eigenvectors">Eigenvalues and Eigenvectors</a> provide the full decomposition: is the left eigenvector for ; the SLEM controls speed.
- <a class="wiki-link" href="/wiki/cs-nlp-hidden-markov-models">Hidden Markov Models</a> and <span class="wiki-link-missing">Continuous-Time Markov Chains</span> generalize the framework (the latter via the generator matrix with ).
- <span class="wiki-link-missing">Coupling of Markov Chains</span> gives an alternative, often sharper, route to mixing-time bounds: run two copies until they meet.
Real-World Applications
Historical Development
Subtleties & Limits
- Cutoff conjecture (Peres): it is conjectured that for "nice" families of reversible chains, cutoff occurs iff the product . This is proven in several cases (e.g. birth–death chains, Ding–Lubetzky–Peres) but remains open in general.
- Sharp mixing for specific models: the exact mixing time (with constants and cutoff window) for many natural chains — certain card shuffles, the mean-field Ising/Glauber dynamics at and near criticality, random walks on random graphs — is still being pinned down.
- Non-reversible speedups: deliberately breaking detailed balance can accelerate mixing (lifting, non-reversible MCMC), but a complete theory of how much and when is incomplete.
- Infinite and continuous state spaces: existence of requires positive recurrence; null-recurrent and transient chains may have no stationary probability distribution. General-state-space convergence (Harris recurrence, geometric ergodicity, drift conditions à la Meyn–Tweedie) is subtler than the finite case treated here.
- Computational hardness: estimating mixing time or spectral gap of a chain given only sample access is itself a hard statistical/algorithmic problem.
See Also
Perron–Frobenius Theorem · Random Walks on Graphs · Markov Chain Monte Carlo · Hidden Markov Models · Continuous-Time Markov Chains · Cheeger Inequality and Conductance · [[Coupling of