Two Markovs
Andrey Andreyevich Markov (1856–1922) lends his name to two things on this page that have nothing to do with each other. The Markov chains came late (around 1906), when he studied sequences of dependent random variables — partly, the story goes, to win an argument about whether the law of large numbers needs independence. (It doesn't.) The Markov numbers came early (1879–1880), from his thesis on indefinite quadratic forms. Both are below; the number-theory half arrives in the next pass.
Chains and the stationary distribution
A Markov chain is a walk on states where the next state depends only on the current one — the
memoryless property. Encode it as a transition matrix P with P[i][j]
the probability of going i→j (rows sum to 1). If the chain is irreducible (you can get
anywhere) and aperiodic (no rigid cycle), there is a unique stationary
distribution π with πP = π, and the fraction of time spent in each state converges
to π from any start. That's the ergodic theorem, and it's what the chain tab
shows: the bars climb to π and stay.
How fast? The transition matrix's eigenvalues are 1 = λ₁ > |λ₂| ≥ …; the gap 1−|λ₂| is the
spectral gap, and the chain forgets its start on a timescale of 1/(1−|λ₂|).
The two clusters preset wires two tight groups with one thin bridge: |λ₂| sits just under 1,
the gap is tiny, and mixing takes forever — the same bottleneck that makes glassy physical systems hard
to simulate.
MCMC: running a chain backwards
Usually you have a chain and want its stationary π. Markov chain Monte Carlo flips that: you have a distribution π you want to sample (a Gibbs measure, a posterior, a density you can only evaluate up to a constant) and you design a chain whose stationary distribution is exactly π. The Metropolis rule does it with one trick: propose a move, accept with probability min(1, π(new)/π(old)). The ratio kills the unknown normalising constant, and detailed balance guarantees π is stationary. Every thermostat on temperley–lieb — Metropolis spin flips, Swendsen–Wang clusters, the tortuosity backbite, the Aztec shuffle — is an MCMC sampler in this exact sense.
Recurrence: Pólya's theorem
The plainest chain is the simple random walk on the integer lattice. Pólya (1921) found a sharp dimensional divide: the walk returns to its start with probability 1 in dimensions 1 and 2 (recurrent), but in dimension 3 the return probability drops to about 0.3405 (transient) — and keeps falling in higher dimensions. The walk tab races hundreds of walkers and watches the return fraction confirm it: home in the plane, lost in space.
Text and the original application
Markov's own first application of his chains was to text: he counted vowel/consonant transitions across 20,000 letters of Pushkin's Eugene Onegin. The text tab is the same idea at full resolution — an n-gram model where the next character is drawn conditional on the last n. It is the ancestor of every autocomplete and, in spirit, of the large language models that followed: more context, better statistics, and language emerges with no rules written down.
The Markov numbers
The early Markov, from his 1879 thesis: the positive-integer solutions of
x² + y² + z² = 3xyz. The trivial one is (1,1,1); the equation is a quadratic in each
variable, so given two coordinates the third has a partner root z′ = 3xy − z — a
Vieta jump. Jumping repeatedly generates every solution, and they hang on a binary
tree: 1,1,1 → 1,1,2 → 1,2,5, then forks forever. The numbers that show up as coordinates —
1, 2, 5, 13, 29, 34, 89, 169, 194, 233, … — are the Markov numbers,
and two famous spines run up the tree: the odd-indexed Fibonacci numbers (1,5,13,34,89,233,…) and the
odd-indexed Pell numbers (2,5,29,169,985,…). The tree tab grows it; the
unicity conjecture — that the largest entry names the triple uniquely — is still open
after a century.
… and the spectrum that connects them
Now Markov's actual theorem, the bridge to approximation. By Hurwitz, every irrational α has
infinitely many rationals with |α − p/q| < 1/(√5 q²), and √5 is best possible — the
golden ratio achieves it and nothing beats it. But if you exclude the golden ratio and its
equivalents, the constant improves to √8; exclude those too and it jumps to √(221)/5; and so on. Markov
proved these record constants are exactly Lm = √(9m²−4)/m, indexed by the
Markov numbers — the same 1, 2, 5, 13, … from the tree. This discrete ladder, climbing to 3, is the
bottom of the Lagrange/Markov spectrum; above 3 lie gaps, and past
Freiman's constant ≈ 4.5278 the spectrum is a solid ray (Hall). The extremal numbers
have continued fractions built from just 1s and 2s. The spectrum tab plots the ladder
and the ray.
- Markov, A. A. (1906). Extension of the law of large numbers to dependent quantities.
- Pólya, G. (1921). Über eine Aufgabe der Wahrscheinlichkeitsrechnung betreffend die Irrfahrt im Straßennetz. Math. Ann. 84.
- Metropolis, N. et al. (1953); Hastings, W. K. (1970). Equation of state calculations / Monte Carlo sampling methods using Markov chains.
- Levin, D., Peres, Y. & Wilmer, E. Markov Chains and Mixing Times.
- Wikipedia — Markov chain · Markov number