MathLabs

Differential equations and dynamical systems

Ergodic theory

Studies the long-term average behavior of dynamical systems, connecting them to measure-preserving transformations.

IntuitionIf you spin forever by the same odd angle, do you eventually visit everywhere?

Mark a point on a circular dial and rotate it, again and again, by a fixed angle that is an irrational fraction of a full turn — say, the golden angle of about 137.5∘137.5^\circ, as sunflower seeds and pinecone scales grow. Because the angle is irrational, the point never returns exactly to where it started, and remarkably it eventually comes arbitrarily close to every point on the circle, visiting each small arc with a frequency proportional to the arc's length. No randomness is involved anywhere — the rule is a single rigid rotation, repeated forever — yet the long-run statistics look exactly as if the point were chosen uniformly at random. This equidistribution phenomenon, and the question of which average properties a deterministic rule produces over infinite time, is the subject of ergodic theory.

Interactive unit circle showing a point repeatedly rotated by the irrational golden angle, illustrating equidistribution.
Drag the theta slider repeatedly through the golden angle 137.5∘137.5^\circ: the marked point never repeats exactly, yet after enough turns it has swept out an evenly-spread, dense set of points on the circle — the geometric picture behind equidistribution and ergodicity of the irrational rotation T(x)=x+α(mod1)T(x)=x+\alpha \pmod 1.

UndergraduateMeasure-preserving transformations

Definition: Measure-preserving transformation

Let (X,F,μ)(X,\mathcal F,\mu) be a probability space (a set XX, a σ\sigma-algebra F\mathcal F of measurable subsets, and a measure μ\mu with μ(X)=1\mu(X)=1). A map T:X→XT:X\to X is measure-preserving if μ(T−1A)=μ(A)\mu(T^{-1}A) = \mu(A) for every A∈FA\in\mathcal F — the measure of the set of points that will land in AA equals the measure of AA itself. Intuitively: applying TT never creates or destroys probability mass, only rearranges where it sits.

μ(T−1A)=μ(A)∀ A∈F\mu(T^{-1}A) = \mu(A) \quad \forall\, A \in \mathcal{F}

Three examples anchor the theory. The irrational rotation T(x)=x+α(mod1)T(x)=x+\alpha \pmod 1 on the circle [0,1)[0,1) with α\alpha irrational preserves ordinary (Lebesgue) length, since rotating an arc does not change its length. The doubling map T(x)=2x mod 1T(x)=2x\bmod 1 also preserves Lebesgue measure — it is exactly 2-to-1, and each of the two preimage branches of an interval is compressed by a factor of 22, so their total length exactly reconstructs the original. And a Bernoulli shift (independent coin flips, shifted one step at a time) preserves the natural product probability measure on the space of infinite coin-flip sequences, since shifting a sequence of independent flips one step still leaves independent, identically distributed flips.

T−1A=A  ⟹  μ(A)∈{0,1}T^{-1}A=A \;\Longrightarrow\; \mu(A)\in\{0,1\}

A measure-preserving TT is ergodic if every TT-invariant set is essentially trivial: T−1A=A  ⟹  μ(A)∈{0,1}T^{-1}A=A \;\Longrightarrow\; \mu(A)\in\{0,1\} for every measurable AA. Equivalently, the system cannot be split into two pieces of positive measure that TT never mixes together — there is no nontrivial way to decompose the dynamics. Both the irrational rotation and the doubling map are ergodic with respect to Lebesgue measure, but for entirely different reasons, as the table below makes precise.

Ergodicity and mixing for three canonical examples
TransformationErgodic?Mixing?
Irrational rotation T(x)=x+α(mod1)T(x)=x+\alpha \pmod 1Yes — every orbit is equidistributedNo — rigid rotation never mixes two arcs together
Doubling map T(x)=2x mod 1T(x)=2x\bmod 1YesYes — correlations between distant times decay to zero
Identity map T(x)=xT(x)=xNo (unless XX is a single point) — every set is invariantNo

UndergraduateBirkhoff's ergodic theorem and Poincaré recurrence

Let TT be a measure-preserving transformation of a probability space (X,F,μ)(X,\mathcal F,\mu) and f∈L1(μ)f\in L^1(\mu). Then the time averages Snf(x)n\frac{S_nf(x)}{n} converge for μ\mu-almost every xx to a TT-invariant limit fˉ(x)\bar f(x) with ∫Xfˉ dμ=∫Xf dμ\int_X \bar f\,d\mu = \int_X f\,d\mu. If moreover TT is ergodic, then fˉ(x)=∫Xf dμ a.e.\bar f(x)=\int_X f\,d\mu\ \text{a.e.} — the time average along a single orbit equals the space average.

Why is it true?

This is the rigorous version of an intuition physicists had used for decades without proof (Boltzmann's ergodic hypothesis in statistical mechanics): to compute the long-run average of some quantity, you can either watch one system evolve for a very long time, or average over a whole ensemble of systems at one instant — and for ergodic systems these two very different-sounding computations give exactly the same answer.

Proof

Step 1 (invariant limsup and liminf). Define f∗(x)=lim sup⁡n→∞Snf(x)nf^*(x)=\limsup_{n\to\infty}\frac{S_nf(x)}{n} and f∗(x)=lim inf⁡n→∞Snf(x)nf_*(x)=\liminf_{n\to\infty}\frac{S_nf(x)}{n}. Since Sn+1f(x)=f(x)+Snf(Tx)S_{n+1}f(x) = f(x) + S_nf(Tx), dividing by n+1n+1 and letting n→∞n\to\infty shows f∗(Tx)=f∗(x)f^*(Tx)=f^*(x) and f∗(Tx)=f∗(x)f_*(Tx)=f_*(x): both are TT-invariant functions.

Step 2 (the maximal ergodic theorem). For λ∈R\lambda\in\mathbb R, let Aλ={x:sup⁡nSnf(x)/n>λ}A_\lambda=\{x: \sup_n S_nf(x)/n>\lambda\} be the set where the running time average ever exceeds λ\lambda. The key technical lemma (proved by considering g=f−λg=f-\lambda and the maximum of the partial sums Mn(x)=max⁡(0,S1g(x),…,Sng(x))M_n(x)=\max(0,S_1g(x),\dots,S_ng(x)), then using Mn(Tx)≥Skg(Tx)M_n(Tx)\ge S_kg(Tx) termwise and integrating over the set where Mn>0M_n>0) gives ∫Aλf dμ≥λ μ(Aλ)\int_{A_\lambda} f\,d\mu \ge \lambda\,\mu(A_\lambda).

Step 3 (squeezing f and f_ together). Suppose for contradiction that f∗>f∗f^*>f_* on a set of positive measure; then there exist rationals α<β\alpha<\beta with E={x:f∗(x)<α<β<f∗(x)}E=\{x: f_*(x)<\alpha<\beta<f^*(x)\} of positive measure. EE is TT-invariant (since f∗,f∗f^*,f_* are), so we may restrict attention to EE. Applying the maximal inequality to f−βf-\beta on EE forces ∫Ef dμ≥βμ(E)\int_E f\,d\mu\ge\beta\mu(E), and applying it to α−f\alpha-f similarly forces ∫Ef dμ≤αμ(E)\int_E f\,d\mu\le\alpha\mu(E); since α<β\alpha<\beta and μ(E)>0\mu(E)>0 these contradict each other. Hence f∗=f∗f^*=f_* almost everywhere, so the limit fˉ(x)=lim⁡nSnf(x)/n\bar f(x)=\lim_n S_nf(x)/n exists a.e. and is TT-invariant.

Step 4 (matching the integrals, and the ergodic case). A dominated-convergence argument (truncating ff and controlling the tails using the maximal inequality again) shows ∫Xfˉ dμ=∫Xf dμ\int_X \bar f\,d\mu = \int_X f\,d\mu. Finally, if TT is ergodic, the TT-invariant function fˉ\bar f must be constant almost everywhere (by the very definition of ergodicity applied to its level sets {fˉ≤c}\{\bar f\le c\}, each of which is TT-invariant and hence has measure 00 or 11); combined with the equality of integrals, that constant must be ∫Xf dμ\int_X f\,d\mu, giving fˉ(x)=∫Xf dμ a.e.\bar f(x)=\int_X f\,d\mu\ \text{a.e.}.

Let TT be a measure-preserving transformation of a probability (or more generally finite-measure) space (X,F,μ)(X,\mathcal F,\mu) and let A∈FA\in\mathcal F with μ(A)>0\mu(A)>0. Then almost every point of AA returns to AA infinitely often: for almost every x∈Ax\in A, Tnx∈AT^nx\in A for infinitely many n≥1n\ge1.

Why is it true?

If space is finite and nothing is ever destroyed (measure-preservation), a region cannot keep sending points off to entirely new, never-before-visited territory forever — eventually the system has to start revisiting where it has already been, simply because there is nowhere new left to put the returning measure.

Proof

Step 1 (points that never return). Let A0={x∈A:Tnx∉A ∀n≥1}A_0=\{x\in A: T^nx\notin A\ \forall n\ge1\} be the points of AA that never come back to AA. The sets A0,T−1A0,T−2A0,…A_0, T^{-1}A_0, T^{-2}A_0,\dots are pairwise disjoint: if x∈T−iA0∩T−jA0x\in T^{-i}A_0\cap T^{-j}A_0 with i<ji<j, then Tix∈A0T^ix\in A_0 but also Tjx=Tj−i(Tix)∈AT^j x = T^{j-i}(T^ix) \in A with j−i≥1j-i\ge1, contradicting that Tix∈A0T^ix\in A_0 never returns to AA. So T−iA0∩T−jA0=∅ (i≠j)T^{-i}A_0 \cap T^{-j}A_0=\varnothing\ (i\ne j).

Step 2 (the never-return set has measure zero). Since TT is measure-preserving, μ(A0)=μ(T−iA0)\mu(A_0)=\mu(T^{-i}A_0) for every ii. If μ(A0)>0\mu(A_0)>0, the countably many pairwise disjoint sets T−iA0T^{-i}A_0 (i=0,1,2,…i=0,1,2,\dots) would all have this same positive measure, so their union would have infinite total measure — impossible since μ(X)<∞\mu(X)<\infty (indeed μ(X)=1\mu(X)=1). Hence μ(A0)=0\mu(A_0)=0.

Step 3 (finitely-often visitors also have measure zero). Let B={x∈A:x returns to A only finitely often}B=\{x\in A: x\ \text{returns to}\ A\ \text{only finitely often}\}. Writing BB as a countable union over kk of (essentially) the never-return set of TkAT^kA under the shifted dynamics, B=⋃k≥0T−k{x∈TkA:x never returns to TkA}B=\bigcup_{k\ge0} T^{-k}\{x\in T^kA: x\ \text{never returns to}\ T^kA\}, each term has measure zero by exactly the Step 1–2 argument applied to TkAT^kA in place of AA (using μ(TkA)=μ(A)\mu(T^kA)=\mu(A)). By countable subadditivity, μ(B)=0\mu(B)=0.

Step 4 (conclusion). Every x∈A∖Bx\in A\setminus B (which has full measure in AA, since μ(B)=0\mu(B)=0) returns to AA infinitely often by definition of BB. This is exactly the statement of the theorem.

AdvancedMixing: a stronger form of ergodicity

Definition: Strong mixing

A measure-preserving TT is (strongly) mixing if lim⁡n→∞μ(T−nA∩B)=μ(A)μ(B)\lim_{n\to\infty}\mu(T^{-n}A\cap B)=\mu(A)\mu(B) for all measurable A,BA,B: the fraction of BB that lands back in AA after nn steps converges to what it would be if AA and BB were statistically independent. Mixing implies ergodicity (take B=AB=A with T−1A=AT^{-1}A=A: then μ(A)=μ(A∩A)→μ(A)2\mu(A)=\mu(A\cap A)\to\mu(A)^2, forcing μ(A)∈{0,1}\mu(A)\in\{0,1\}), but not conversely.

Why is the irrational rotation ergodic but not mixing? Take A=BA=B a small arc: rotating it by nαn\alpha just moves the same small arc rigidly around the circle, so T−nA∩AT^{-n}A\cap A is either empty or (for infinitely many nn, since the rotation is equidistributed) very close to all of AA again — the overlap fraction never settles down to the independent value μ(A)2\mu(A)^2, it keeps oscillating back up near μ(A)\mu(A). The doubling map, by contrast, stretches and folds every small interval across the whole space exponentially fast, genuinely scrambling it — the mechanism responsible for its mixing, and ultimately for treating chaotic maps like r=4r=4 logistic dynamics as "as good as random" for statistical purposes.

UndergraduateReal-World Applications and Worked Examples

Ergodic theory turns "average behavior over infinite time" into a computable, provable statement, which is exactly what statistical mechanics needs to justify replacing a single physical system's long-run average with an ensemble average (Boltzmann's ergodic hypothesis), what data compression needs to define the entropy rate that bounds how much a source can be compressed (via the Kolmogorov–Sinai entropy of the associated shift), what search engines like Google's PageRank need to guarantee a unique long-run visiting frequency for a random web surfer (the invariant measure of a Markov chain), and what cryptographic pseudo-random generators built from chaotic maps need to justify treating their output as statistically random. In every case, ergodic and mixing properties are what license treating a single deterministic trajectory as if it carried statistical information about the whole system.

Example: How often does an irrational rotation visit a given arc?

Let T(x)=x+α(mod1)T(x)=x+\alpha\pmod 1 with α\alpha irrational act on the circle [0,1)[0,1) with Lebesgue measure, and let A=[0,0.3)A=[0,0.3). For a generic starting point x0x_0, what fraction of the first nn iterates x0,x1,…,xn−1x_0,x_1,\dots,x_{n-1} land in AA, as n→∞n\to\infty?

Solution

This is exactly a Birkhoff ergodic theorem computation with f=1Af=\mathbf 1_A, the indicator function of AA: the time average 1n∑k=0n−11A(xk)\frac1n\sum_{k=0}^{n-1}\mathbf 1_A(x_k) is precisely the fraction of the first nn iterates landing in AA.

Irrational rotations are a classical example of an ergodic transformation with respect to Lebesgue measure (this is Weyl's equidistribution theorem in disguise: any TT-invariant set, when expanded in a Fourier series, forces all nonzero Fourier coefficients to vanish because rotation multiplies them by e2πikα≠1e^{2\pi i k\alpha}\ne1, leaving only a constant function).

Since TT is ergodic, Birkhoff's theorem applies in its strongest form: the time average equals the space average for every generic starting point, not just on average over starting points. The space average is ∫X1A dμ=μ(A)=0.3−0=0.3\int_X \mathbf 1_A\,d\mu = \mu(A) = 0.3-0 = 0.3.

So the long-run fraction of time the orbit spends in AA is exactly 0.30.3, regardless of which x0x_0 you start from (outside a measure-zero exceptional set) — a rigorous version of "the deterministic rotation behaves, statistically, just like picking a uniformly random point in AA each time."

Example: How much can a biased data source be compressed? The Kolmogorov–Sinai entropy of a Bernoulli shift

A data source emits independent bits, each 11 with probability p=0.3p=0.3 and 00 with probability 0.70.7 — modeled ergodically as the Bernoulli shift on sequences with the product measure (0.3,0.7)(0.3,0.7). Compute its entropy rate (the Kolmogorov–Sinai entropy of the shift, equal to the Shannon entropy of a single symbol here), which by Shannon's source coding theorem is the minimum number of bits per symbol needed, on average, to losslessly compress this source.

Solution

For an i.i.d. (Bernoulli) source, the Kolmogorov–Sinai entropy of the shift map reduces to the ordinary Shannon entropy of a single symbol: h=−∑ipilog⁡2pih=-\sum_i p_i\log_2 p_i.

Substituting p1=0.3p_1=0.3, p0=0.7p_0=0.7: h=−0.3log⁡20.3−0.7log⁡20.7h=-0.3\log_2 0.3-0.7\log_2 0.7.

Compute each term: −0.3log⁡20.3=0.3×1.737=0.521-0.3\log_2 0.3 = 0.3\times1.737=0.521 bits, and −0.7log⁡20.7=0.7×0.515=0.361-0.7\log_2 0.7=0.7\times0.515=0.361 bits (using log⁡20.3≈−1.737\log_2 0.3\approx-1.737 and log⁡20.7≈−0.515\log_2 0.7\approx-0.515).

Adding these, h≈0.881 bitsh\approx0.881\ \text{bits}. So on average, no lossless code can compress this source below about 0.8810.881 bits per symbol (noticeably less than the 11 bit/symbol needed for a fair coin, precisely because the bias makes the source more predictable, hence more compressible) — and Shannon's theorem guarantees this bound is achievable.

A transformation T:X→XT:X\to X preserves a probability measure μ\mu, meaning μ(T−1A)=μ(A)\mu(T^{-1}A) = \mu(A). For which sets AA must this equation hold?

By Birkhoff's ergodic theorem, for the ergodic irrational rotation T(x)=x+α(mod1)T(x)=x+\alpha \pmod 1 and A=[0,0.3)A=[0,0.3), what is the long-run fraction of time a generic orbit spends in AA?

According to the Poincaré recurrence theorem, for a measure-preserving system on a finite-measure space with μ(A)>0\mu(A)>0, almost every point of AA...

A source emits i.i.d. bits with P(1)=0.3P(1)=0.3. Its entropy rate (the Kolmogorov–Sinai entropy of the associated Bernoulli shift), rounded to two decimals in bits, is closest to:

References

  1. Peter Walters (1982). An Introduction to Ergodic Theory
  2. George D. Birkhoff (1931). Proof of the Ergodic Theorem
  3. John von Neumann (1932). Proof of the Quasi-Ergodic Hypothesis
  4. Hillel Furstenberg (1981). Recurrence in Ergodic Theory and Combinatorial Number Theory