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 is a sequence of random states in which the probability of the next state depends only on the current state, not the full history (the Markov property). The central long-run question is: does the distribution of the chain settle down? For a broad and well-characterized class of chains, the answer is yes — the chain converges to a unique steady-state (stationary) distribution satisfying , and the rate of convergence is governed by the spectral gap of the transition matrix. The surprising fact is that this convergence is often exponentially fast yet can exhibit a sharp cutoff phenomenon: the distance to stationarity stays near its maximum for a long time, then plunges to near zero in a narrow window.

The Core Insight

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

Markov Chain and Transition Matrix

A (time-homogeneous, discrete-time) Markov chain on a finite state space is a sequence of -valued random variables satisfying the Markov property:

1
⟳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:

2
⟳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

3
⟳apply the law of total probability over the current state, then iterate.

Stationary Distribution

A probability row vector is a stationary (or steady-state, or invariant) distribution if

4
⟳ is a fixed point of the update [3]; it is a left eigenvector of with eigenvalue , normalized to a probability vector.

Irreducibility, Aperiodicity, Ergodicity

  • 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).

Fundamental Theorem of Markov Chains

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 ,
5
⟳ converges to the rank-one matrix ; consequence of Perron–Frobenius applied to the primitive matrix .
  1. Ergodic / mean-return characterization: , where is the first return time to .
6
⟳by the renewal/strong law of large numbers, the long-run fraction of time in state equals one over the average gap between visits.

Detailed Balance and Reversibility

A chain is reversible with respect to if it satisfies the detailed balance equations:

7
⟳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 .

Total Variation Distance and Mixing Time

The total variation distance between distributions on is

8
⟳the maximizing set is ; the accounts for equal positive and negative mass.

Define the worst-case distance to stationarity at time :

9

where is the point mass at . The mixing time at threshold is

10
⟳ is conventional; submultiplicativity lets you boost any fixed threshold to arbitrarily small , giving .

Spectral Gap Controls Mixing (Reversible Case)

Let be reversible and ergodic with eigenvalues . Let be the second-largest eigenvalue modulus (SLEM) and define the absolute spectral gap . Then

11

where .

⟳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

Convergence via Perron–Frobenius

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 .

Aperiodicity Is Necessary for Convergence

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.

Andrey Andreyevich Markov | 1856–1922

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.

Convergence of total-variation distance: ordinary exponential decay vs. the cutoff phenomenon. The gold curve shows a sharp drop near the cutoff time $t_\star$.

time t (steps) d(t) = TV distance 1.0 0.5 0.0 ε = 1/4 exponential decay cutoff: stays high, then plunges t★

Worked Examples

Two-State Chain: Exact Steady State and Mixing

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 :

Random Walk on a Cycle: Reversibility and Slow Mixing

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

Stationary ≠ Convergent ≠ Unique without conditions

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.

The spectral gap bound can be loose

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.

A reducible chain with infinitely many stationary distributions

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.

Periodicity blocks convergence even when $\pi$ is unique

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

  • Perron–Frobenius Theorem is the linear-algebra engine behind existence, uniqueness, and positivity of ; the simplicity of the eigenvalue for a primitive matrix is ergodic convergence.
  • Random Walks on Graphs are the canonical reversible chains; for a graph the stationary distribution is , and mixing connects to graph conductance via Cheeger's inequality .
  • Markov Chain Monte Carlo inverts the problem: design (e.g. Metropolis–Hastings, Gibbs sampler) so that a prescribed target is stationary, then run until mixed to draw samples.
  • Eigenvalues and Eigenvectors provide the full decomposition: is the left eigenvector for ; the SLEM controls speed.
  • Hidden Markov Models and Continuous-Time Markov Chains generalize the framework (the latter via the generator matrix with ).
  • Coupling of Markov Chains gives an alternative, often sharper, route to mixing-time bounds: run two copies until they meet.

Real-World Applications

  1. Google PageRank (Brin & Page, 1998): ranks web pages by the stationary distribution of a random surfer on the web graph, made ergodic by a "teleportation" damping factor . The stationary vector is computed by power iteration .
  2. MCMC in Bayesian statistics & physics: Metropolis (1953) and Gibbs sampling draw from intractable posteriors and Boltzmann distributions; mixing time determines how long to run before samples are usable. Used in lattice QCD, protein folding, and image reconstruction.
  3. Card shuffling: the Diaconis–Bayer–Shahshahani result that riffle shuffles suffice for a 52-card deck is a landmark cutoff computation ().
  4. Queueing and reliability theory: birth–death chains model server queues and machine repair; gives long-run availability and average queue length (cf. Example 1).
  5. Population genetics: the Wright–Fisher and Moran models are Markov chains on allele frequencies; fixation probabilities and equilibrium under mutation are stationary-distribution computations.
  6. Speech & language: -gram language models, hidden Markov models for speech recognition (Baum–Welch), and Markov text generators all rest on transition matrices.
  7. Statistical mechanics / Glauber dynamics: spin systems (Ising model) relax to the Gibbs measure; the spectral gap diverges (mixing slows critically) at phase transitions — a deep link between mixing and physics.

Historical Development

  • 1906 — A. A. Markov publishes the first paper on dependent chains, extending the law of large numbers beyond independence.
  • 1907 — Oskar Perron proves his theorem on positive matrices (positive dominant eigenvalue).
  • 1912 — Georg Frobenius extends Perron's results to irreducible/primitive nonnegative matrices — the cornerstone of steady-state theory.
  • 1913 — Markov's vowel/consonant analysis of Eugene Onegin, the first empirical Markov-chain study.
  • 1931–1936 — Kolmogorov and others develop the general theory of stochastic processes; the modern measure-theoretic foundation of Markov chains takes shape.
  • 1953 — Metropolis, Rosenbluth, Rosenbluth, Teller & Teller publish the Metropolis algorithm; MCMC is born (later generalized by Hastings, 1970).
  • 1981–1984 — Diaconis & Shahshahani pioneer representation-theoretic mixing-time bounds (random transpositions on the symmetric group), introducing the cutoff phenomenon.
  • 1986 — Aldous and Diaconis formalize cutoff and strong stationary times; Sinclair–Jerrum link conductance to mixing for algorithmic applications.
  • 1990s–2000s — Saloff-Coste, Diaconis, and others develop log-Sobolev and Nash inequalities for sharp mixing rates; Levin–Peres–Wilmer's textbook (2008) consolidates the field.

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