Liouville's Theorem

Take a pendulum and, instead of one launch, prepare a thousand nearly identical launches — a small cloud of initial conditions in phase space. Run them all forward. The cloud shears, stretches into a crescent, wraps into a filament so thin it looks one-dimensional. Now measure its area. It has not changed. Not approximately: exactly, for any Hamiltonian, for all time. That is Liouville's theorem, one of the deepest structural results of Hamiltonian mechanics — the phase fluid is incompressible. The reason is a cancellation almost embarrassing in its simplicity. The phase-space velocity field v=(q˙1,…,q˙n,p˙1,…,p˙n)\mathbf{v} = (\dot q_1,\dots,\dot q_n,\dot p_1,\dots,\dot p_n) generated by Hamilton's equations is divergence-free: every stretch rate ∂q˙i/∂qi=∂2H/∂qi∂pi\partial\dot q_i/\partial q_i = \partial^2 H/\partial q_i\partial p_i is cancelled by the squeeze rate ∂p˙i/∂pi=−∂2H/∂pi∂qi\partial\dot p_i/\partial p_i = -\partial^2 H/\partial p_i\partial q_i, because both are the same mixed second derivative of HH taken in opposite orders. The books balance for any Hamiltonian — the cancellation is the dynamical signature of the symplectic pairing of qq with pp. The consequences run far beyond mechanics. Volume conservation is the license behind statistical mechanics — equal a priori probabilities for equal phase volumes, and the stationarity of every equilibrium ensemble. It forbids attractors and limit cycles in conservative systems. It caps how bright a particle beam can ever be focused, and its deliberate violation — stochastic cooling, radiation damping — is Nobel-grade engineering. Where the Hamiltonian-flow article followed a single blob for the geometry, this article owns the density story: the Liouville equation, the ensembles it stabilizes, and exactly what breaks when dissipation enters.

Key takeaways
  • Liouville's theorem: the phase-space volume occupied by an ensemble of systems evolving under Hamilton's equations is conserved — the phase fluid is incompressible.
  • The mechanism is structural: ∇⋅v=∑i(∂q˙i/∂qi+∂p˙i/∂pi)=0\nabla\cdot\mathbf{v} = \sum_i\left(\partial\dot q_i/\partial q_i + \partial\dot p_i/\partial p_i\right) = 0 for every Hamiltonian, by equality of mixed partials of HH.
  • Equivalently the density obeys the Liouville equation ∂ρ/∂t+{ρ,H}=0\partial\rho/\partial t + \{\rho,H\} = 0, i.e. dρ/dt=0\mathrm{d}\rho/\mathrm{d}t = 0 along trajectories: a comoving observer sees constant density forever.
  • The time-tt flow map has unit Jacobian, J(t)=1J(t) = 1 — Liouville is the time-flow special case of the fact that all canonical transformations preserve phase volume.
  • Any density of the form ρ=f(H)\rho = f(H) is stationary, which is why microcanonical and canonical ensembles do not evolve — the foundation stone of statistical mechanics.
  • Dissipation breaks it: a drag bb gives ∇⋅v=−b/m\nabla\cdot\mathbf{v} = -b/m, areas drain as e−bt/me^{-bt/m} (half-life 3.47 s3.47\ \mathrm{s} for b=0.10 kg/sb = 0.10\ \mathrm{kg/s}, m=0.50 kgm = 0.50\ \mathrm{kg}), and attractors become possible.
  • Key idea: Hamiltonian flow is volume-preserving because the phase-space velocity field is divergence-free — the mixed second derivatives of HH cancel exactly. The phase fluid is incompressible.

Where this lives today

Ask an accelerator physicist about Liouville's theorem and you will get a number: emittance, the phase-space area of a particle bunch, the quantity their whole machine is designed around. Under Hamiltonian beam optics — quadrupoles, dipoles, RF cavities — emittance cannot decrease: focus the beam to a smaller spot and the angular spread grows in exact compensation. Genuine cooling therefore requires deliberately non-Hamiltonian physics. Simon van der Meer's stochastic cooling — measure the bunch's fluctuations, feed back a correcting kick — shrank the antiproton beams that discovered the W and Z bosons and earned the 1984 Nobel Prize. Its descendants set the agenda still: the muon-collider design effort rests on ionization cooling (energy loss in absorbers, the only trick fast enough for particles that live 2.2 microseconds), demonstrated by the MICE collaboration in 2020, and CERN's LHC luminosity upgrade juggles emittance budgets through every stage of the injector chain. The theorem's statistical face is just as current. The Gibbs entropy −kB ⁣∫ ⁣ρln⁡ρ dΓ-k_B\!\int\!\rho\ln\rho\,\mathrm{d}\Gamma is exactly constant under Liouville flow — so the second law lives in coarse-graining, in the filament of the hero figure becoming indistinguishable from a uniform smear at any finite resolution. The quantum version of that tension is a live research industry: unitary evolution preserves von Neumann entropy just as Liouville preserves Gibbs's, and the eigenstate thermalization hypothesis — tested in today's cold-atom quantum simulators — is the working answer to how closed quantum systems nevertheless appear to thermalize.

The physical picture

Drop a spot of dye into the phase fluid — a small disk of nearby initial conditions — and let Hamilton's equations carry it. Points near the bottom of the disk sit at lower energy and circulate at a different rate than points near the top, so the disk shears. Keep going and it draws out into a long, curved filament, folded along the flow lines. It looks like the blob is being destroyed. It is not. Every intermediate snapshot below has exactly the same area, computed from the actual integrated flow:

Figure
The incompressible phase fluid — a circular blob of pendulum states shears into a filament while its area stays exactly 0.246
qpseparatrixt = 0, A = 0.246t = 2.4, A = 0.246t = 14A = 0.246 computed pendulum flow (RK4, 480 boundary points); shoelace area 0.2463 at t = 0, 2.4 and 14

That is the behavior of dye in water, not smoke in air: an incompressible fluid can be stirred into arbitrarily intricate shapes but never concentrated or diluted. The microscopic reason is a term-by-term cancellation: wherever the qq-flow stretches the blob, the pp-flow squeezes it at precisely the same rate, because both rates are the same mixed second derivative of the one function HH running the show. The cleanest place to see it is the hyperbolic flow of H=qpH = qp, which stretches qq by ete^{t} while squeezing pp by e−te^{-t} — aggressive deformation, identically zero net flux out of any box:

Figure
Why the divergence vanishes — whatever the q-equations push out of a phase-space box, the p-equations push back in
stretch in q, squeeze in p: H = qpqpt = 0, area 0.250t = 0.6, area 0.250sides ×1.82 and ×0.55 — product exactly 1the books always balance∇·v = 0for every HdΓq-flux out: +∂²H/∂q∂pp-flux in: −∂²H/∂p∂q H = qp flow: q side ×1.82, p side ×0.55, area 0.250 both times — equal mixed partials

Now contrast a system that is not Hamiltonian. Add a drag force −bx˙-b\dot x to an oscillator and the phase velocity field acquires a genuine sink: ∇⋅v=−b/m<0\nabla\cdot\mathbf{v} = -b/m < 0 everywhere. Blobs shrink exponentially and every trajectory spirals into the origin — the geometric face of dissipation, drawn in full in the damped-harmonic-oscillator article. Liouville's theorem is precisely the statement that conservative dynamics has no such drain:

Figure
Liouville versus dissipation — the same blob keeps its area under Hamiltonian flow but halves it every 3.47 s once a drag b = 0.10 kg per s acts on m = 0.50 kg
Hamiltonian: area rides foreverqpt = 0, A = 0.363t = 2.4 s, A = 0.363damped: ∇·v = −b/m, area drainsqpt = 0, A = 0.363t = 3.47 sA = 0.182t = 6.93 sA = 0.091 computed flows: SHO blob area 0.363 at both times; damped 0.363, 0.182, 0.091 — exact e^(−bt/m)

Because the comoving density never changes, you can think of phase points as indestructible fluid particles that neither merge nor split: the flow is a continuous, volume-preserving relabeling of phase space. Stretching is always paid for by compression in the conjugate direction — and that bookkeeping, enforced by the symplectic pairing, is the entire content of the theorem.

From incompressibility to the Liouville equation

Everything in this article is a consequence of one geometric statement. Carry a region V(t)V(t) of phase space along the flow — every point in it evolving by Hamilton's equations — and its 2n2n-dimensional volume is a constant of the motion. In symbols,

ddt∫V(t)dΓ=0,dΓ=∏i=1ndqi dpi(1)\frac{\mathrm{d}}{\mathrm{d}t}\int_{V(t)} \mathrm{d}\Gamma = 0,\qquad \mathrm{d}\Gamma = \prod_{i=1}^{n}\mathrm{d}q_i\,\mathrm{d}p_i \qquad (1)

where: V(t)V(t) — a region transported by the flow; dΓ\mathrm{d}\Gamma — the phase-space volume element; nn — the number of degrees of freedom. Read it as the incompressibility of the phase fluid: shapes deform freely, measure never changes. Nothing about the shape is protected — the hero figure's filament is the generic fate. The engine underneath (1) is a property of the velocity field itself. Assemble the 2n2n rates given by Hamilton's equations into v=(q˙1,…,q˙n,p˙1,…,p˙n)\mathbf{v} = (\dot q_1,\dots,\dot q_n,\dot p_1,\dots,\dot p_n) and compute its divergence:

∇⋅v=∑i=1n(∂q˙i∂qi+∂p˙i∂pi)=∑i=1n(∂2H∂qi ∂pi−∂2H∂pi ∂qi)=0(2)\nabla\cdot\mathbf{v} = \sum_{i=1}^{n}\left(\frac{\partial\dot q_i}{\partial q_i} + \frac{\partial\dot p_i}{\partial p_i}\right) = \sum_{i=1}^{n}\left(\frac{\partial^2 H}{\partial q_i\,\partial p_i} - \frac{\partial^2 H}{\partial p_i\,\partial q_i}\right) = 0 \qquad (2)

where: q˙i=∂H/∂pi\dot q_i = \partial H/\partial p_i and p˙i=−∂H/∂qi\dot p_i = -\partial H/\partial q_i have been inserted before differentiating. Equality of mixed partials (Clairaut–Schwarz, valid for any twice-differentiable HH) kills every term in the sum. Notice what the calculation does not use: no conservation of energy, no time-independence of HH, no special form of the potential. The cancellation is a structural identity of the canonical equations. Now switch from geometry to statistics — the viewpoint this article owns. Describe an ensemble by a density ρ(q,p,t)\rho(q,p,t), so that ρ dΓ\rho\,\mathrm{d}\Gamma counts the systems in each cell. Representative points are never created or destroyed, so ρ\rho obeys a continuity equation in 2n2n dimensions, exactly like charge or mass density in ordinary fluid dynamics:

∂ρ∂t+∇⋅(ρ v)=0(3)\frac{\partial\rho}{\partial t} + \nabla\cdot(\rho\,\mathbf{v}) = 0 \qquad (3)

where: ρv\rho\mathbf{v} — the current of phase points. This is bookkeeping, true for any flow, dissipative or not; the Hamiltonian structure has not yet been used. Combine (2) with (3): the divergence expands as ∇⋅(ρv)=v⋅∇ρ+ρ (∇⋅v)\nabla\cdot(\rho\mathbf{v}) = \mathbf{v}\cdot\nabla\rho + \rho\,(\nabla\cdot\mathbf{v}), the compressive term drops, and the advective term v⋅∇ρ\mathbf{v}\cdot\nabla\rho is — substituting Hamilton's equations — nothing but a Poisson bracket. The result is the Liouville equation, the master equation of classical statistical mechanics:

dρdt=∂ρ∂t+{ρ,H}=0,{ρ,H}=∑i=1n(∂ρ∂qi∂H∂pi−∂ρ∂pi∂H∂qi)(4)\frac{\mathrm{d}\rho}{\mathrm{d}t} = \frac{\partial\rho}{\partial t} + \{\rho, H\} = 0,\qquad \{\rho,H\} = \sum_{i=1}^{n}\left(\frac{\partial\rho}{\partial q_i}\frac{\partial H}{\partial p_i} - \frac{\partial\rho}{\partial p_i}\frac{\partial H}{\partial q_i}\right) \qquad (4)

where: dρ/dt\mathrm{d}\rho/\mathrm{d}t — the total (comoving) derivative, the rate of change seen riding with the flow. An observer surfing a trajectory measures constant density forever; the density at a fixed location generally does change, at the rate ∂ρ/∂t={H,ρ}\partial\rho/\partial t = \{H,\rho\}, as the filament sweeps past. Equation (4) is the evolution law F˙={F,H}\dot F = \{F, H\} of any phase function — see the time-evolution article — applied to the density, with the sign flip inherited from the comoving picture. The geometric and kinetic statements meet in the Jacobian of the flow map. Let ϕt\phi_t send initial conditions (q0,p0)(q_0, p_0) to (q(t),p(t))(q(t), p(t)); a standard identity of flows says the Jacobian determinant grows at the rate of the divergence:

dJdt=(∇⋅v) J,J(0)=1    ⇒    J(t)≡det⁡∂(q(t),p(t))∂(q0,p0)=1(5)\frac{\mathrm{d}J}{\mathrm{d}t} = (\nabla\cdot\mathbf{v})\,J, \qquad J(0) = 1 \;\;\Rightarrow\;\; J(t) \equiv \det\frac{\partial(q(t),p(t))}{\partial(q_0,p_0)} = 1 \qquad (5)

where: J(t)J(t) — the volume-stretch factor of the time-tt map. With zero divergence, JJ stays pinned at 1: the flow map is a volume-preserving change of coordinates. For an infinitesimal step this is visible by hand: the Jacobian matrix of ϕε\phi_\varepsilon is I+ε J Hess HI + \varepsilon\,\mathbb{J}\,\mathrm{Hess}\,H, whose determinant is 1+ε tr(J Hess H)+O(ε2)=1+O(ε2)1 + \varepsilon\,\mathrm{tr}(\mathbb{J}\,\mathrm{Hess}\,H) + O(\varepsilon^2) = 1 + O(\varepsilon^2) — the trace vanishes by the same mixed-partial symmetry. Time evolution is in fact a canonical transformation, and every canonical transformation has unit Jacobian; Liouville is the time-flow special case of that symplectic fact. The payoff for statistical mechanics is immediate. Ask which densities are stationary — unchanged at every fixed point of phase space. By (4) that requires {ρ,H}=0\{\rho, H\} = 0, and any smooth function of the Hamiltonian qualifies:

ρeq=f(H)    ⇒    ∂ρeq∂t=−{f(H),H}=−f′(H){H,H}=0(6)\rho_{\mathrm{eq}} = f(H) \;\;\Rightarrow\;\; \frac{\partial\rho_{\mathrm{eq}}}{\partial t} = -\{f(H),H\} = -f'(H)\{H,H\} = 0 \qquad (6)

where: ff — any smooth function. Set f(H)∝δ(H−E)f(H) \propto \delta(H - E) and you have the microcanonical ensemble; f(H)∝e−βHf(H) \propto e^{-\beta H}, the canonical ensemble. Liouville's theorem is what makes these distributions self-consistent equilibria: uniform weight on equal phase volumes is preserved by the dynamics, so "equal a priori probability" is not eroded by time evolution. (It does not by itself force relaxation toward them — that is ergodicity's job, as the FAQ spells out.)

Which statement of the theorem answers which question

you are asked aboutreach forwhy
a transported blob of stateseq. (1), volume constancygeometry: shape free, measure fixed
whether a given flow is conservativeeq. (2), ∇⋅v\nabla\cdot\mathbf{v}nonzero divergence = not Hamiltonian
an ensemble density ρ(q,p,t)\rho(q,p,t)eq. (4), Liouville equationthe density transport law
the flow map or canonical mapseq. (5), J=1J = 1symplectic maps preserve dΓ\mathrm{d}\Gamma
equilibrium ensembleseq. (6), ρ=f(H)\rho = f(H)stationary because {f(H),H}=0\{f(H),H\}=0
Derivation AVolume conservation from the divergence of the phase flow

We derive the geometric form of Liouville's theorem: the volume of any comoving region of phase space is constant under Hamiltonian flow. The strategy is the shortest honest route — treat the ensemble as a fluid, apply the transport theorem that converts the rate of change of a comoving volume into a divergence integral, then show that divergence vanishes identically by Hamilton's equations. Watch one subtlety: the cancellation happens pairwise, coordinate by conjugate momentum, which is why the result needs the canonical pairing and fails for arbitrary first-order systems.

Step 1. Hamilton's equations assign a velocity to every phase point, defining the flow field v=(q˙1,…,q˙n,p˙1,…,p˙n)\mathbf{v} = (\dot q_1,\dots,\dot q_n,\dot p_1,\dots,\dot p_n) with q˙i=∂H/∂pi\dot q_i = \partial H/\partial p_i and p˙i=−∂H/∂qi\dot p_i = -\partial H/\partial q_i. A region V(t)V(t) is carried along by transporting each of its points.

Step 2. Apply the Reynolds transport theorem in 2n2n dimensions: for a comoving region, ddt∫V(t)dΓ=∫V(t)(∇⋅v) dΓ\frac{\mathrm{d}}{\mathrm{d}t}\int_{V(t)}\mathrm{d}\Gamma = \int_{V(t)}(\nabla\cdot\mathbf{v})\,\mathrm{d}\Gamma. The boundary sweeps outward at the local normal velocity, and summing that flux over the surface gives the divergence integral by Gauss's theorem. Why this is the right tool: it isolates the entire question in one scalar field, ∇⋅v\nabla\cdot\mathbf{v}. Whatever the region's shape does — shear, filament, fold — only the divergence decides whether measure is gained or lost.

Step 3. Compute the divergence. Each coordinate contributes ∂q˙i/∂qi=∂2H/∂qi∂pi\partial\dot q_i/\partial q_i = \partial^2 H/\partial q_i\partial p_i, and its conjugate momentum contributes ∂p˙i/∂pi=−∂2H/∂pi∂qi\partial\dot p_i/\partial p_i = -\partial^2 H/\partial p_i\partial q_i.

Step 4. Invoke equality of mixed partials. For HH twice continuously differentiable, ∂2H/∂qi∂pi=∂2H/∂pi∂qi\partial^2 H/\partial q_i\partial p_i = \partial^2 H/\partial p_i\partial q_i, so each conjugate pair cancels exactly and ∇⋅v=0\nabla\cdot\mathbf{v} = 0 everywhere, for every Hamiltonian — time-dependent ones included, since time is a spectator in the spatial derivatives.

Step 5. Conclude. The integrand in Step 2 vanishes identically, so dV/dt=0\mathrm{d}V/\mathrm{d}t = 0: the comoving volume is exactly constant. The phase fluid is incompressible, and the pendulum-blob figure is this equation drawn by numerical integration. Verified: matches Goldstein, Poole and Safko section 9.9 and Landau–Lifshitz; reproduce by writing out the divergence for one degree of freedom and confirming the mixed partials cancel. Numerical cross-check in the hero figure: shoelace area 0.2463 at t equal to 0, 2.4 and 14 under RK4 pendulum flow.

Go deeper · Derivation B · 1 minThe Liouville equation from conservation of probability
Derivation BThe Liouville equation from conservation of probability

We derive the kinetic form of the theorem, dρ/dt=0\mathrm{d}\rho/\mathrm{d}t = 0, and extract the stationarity of equilibrium ensembles. The route: start from the continuity equation — pure bookkeeping, valid for any flow that neither creates nor destroys ensemble members — then inject the divergence-free result to strip out the compressive term, and recognize what remains as a Poisson bracket. Keep the logic straight: continuity is generic, incompressibility is the Hamiltonian input, and the Poisson-bracket form is what connects the density to the general evolution law for phase functions.

Step 1. Conservation of representative points in 2n2n dimensions reads ∂ρ/∂t+∇⋅(ρ v)=0\partial\rho/\partial t + \nabla\cdot(\rho\,\mathbf{v}) = 0. No trajectory ever begins or ends (existence and uniqueness of solutions), so the number of phase points in any fixed region changes only by flux through its boundary.

Step 2. Expand the current by the product rule: ∇⋅(ρv)=v⋅∇ρ+ρ (∇⋅v)\nabla\cdot(\rho\mathbf{v}) = \mathbf{v}\cdot\nabla\rho + \rho\,(\nabla\cdot\mathbf{v}). The first term advects the density pattern; the second compresses or dilutes it.

Step 3. Use incompressibility. By the previous derivation ∇⋅v=0\nabla\cdot\mathbf{v} = 0, so the dilution term dies and only pure advection survives: ∂ρ/∂t+v⋅∇ρ=0\partial\rho/\partial t + \mathbf{v}\cdot\nabla\rho = 0. Why this step carries all the physics: for a damped system the discarded term is −ρ b/m≠0-\rho\, b/m \neq 0, and densities genuinely concentrate — this is exactly where the Hamiltonian assumption enters and where dissipative dynamics exits.

Step 4. Recognize the Poisson bracket. Substituting Hamilton's equations, v⋅∇ρ=∑i(q˙i ∂ρ/∂qi+p˙i ∂ρ/∂pi)={ρ,H}\mathbf{v}\cdot\nabla\rho = \sum_i\left(\dot q_i\,\partial\rho/\partial q_i + \dot p_i\,\partial\rho/\partial p_i\right) = \{\rho, H\}. The advection of the density by the flow is its bracket with the Hamiltonian.

Step 5. Assemble: ∂ρ/∂t+{ρ,H}=dρ/dt=0\partial\rho/\partial t + \{\rho,H\} = \mathrm{d}\rho/\mathrm{d}t = 0. The comoving density is constant — an observer riding any trajectory sees the local crowding of neighbors frozen for all time.

Step 6. Harvest the equilibria. A stationary ensemble needs ∂ρ/∂t=0\partial\rho/\partial t = 0 at fixed (q,p)(q,p), i.e. {ρ,H}=0\{\rho, H\} = 0. Any ρ=f(H)\rho = f(H) works, since {f(H),H}=f′(H){H,H}=0\{f(H),H\} = f'(H)\{H,H\} = 0: the microcanonical shell δ(H−E)\delta(H-E) and the canonical weight e−βHe^{-\beta H} are time-independent precisely because they depend on phase space only through HH. Verified: standard derivation; cross-check with Landau–Lifshitz statistical physics and Goldstein section 9.9. Reproduce by expanding the two-n-dimensional continuity equation and substituting the canonical equations term by term.

Go deeper · Derivation C · 1 minWhy Hamiltonian systems cannot have attractors
Derivation CWhy Hamiltonian systems cannot have attractors

We prove a powerful negative result: no Hamiltonian system has an asymptotically stable fixed point, limit cycle, or strange attractor. The strategy is proof by contradiction from pure measure-counting — an attractor must swallow a neighborhood of finite volume into a set of zero volume, and Liouville forbids the shrinkage. The watch-out is the word asymptotically: Hamiltonian systems have plenty of stable structures (centers, invariant tori), but stability there is neutral — nearby trajectories stay nearby without converging.

Step 1. Define the target. An attractor AA is a set with a neighborhood UU of strictly positive phase volume such that every trajectory starting in UU converges to AA as t→∞t \to \infty. For a fixed point, a periodic orbit, or a fractal attractor, AA has zero 2n2n-dimensional measure: μ(A)=0\mu(A) = 0.

Step 2. Follow the attracted neighborhood. If all of UU funnels into AA, then the transported set ϕt(U)\phi_t(U) must, for large times, huddle inside any thin shell around AA; since μ(A)=0\mu(A) = 0, the volume of that shell — and hence of ϕt(U)\phi_t(U) — can be made arbitrarily small: lim⁡t→∞V(ϕt(U))=0\lim_{t\to\infty} V(\phi_t(U)) = 0.

Step 3. Apply Liouville. The flow preserves volume, so V(ϕt(U))=V(U)>0V(\phi_t(U)) = V(U) > 0 for every tt — a fixed positive number.

Step 4. Contradiction: a constant positive volume cannot tend to zero. Hence no such UU exists, and Hamiltonian dynamics supports no attracting sets of any kind. Dissipation is not just absent from the equations — it is geometrically impossible. Why this matters beyond aesthetics: it cleanly splits dynamical systems theory in two. Attractor language (basins, limit cycles, strange attractors) belongs exclusively to volume-contracting systems; conservative systems get recurrence, tori and chaos-without-attractors instead. *Verified: standard corollary; see Arnold section 16 and Tabor, Chaos and Integrability. Verifiable from the definition of asymptotic stability plus unit Jacobian of the flow map.*

Limiting cases

CaseResultMeaning
Dissipative systems∇⋅v≠0\nabla\cdot\mathbf{v} \ne 0With friction or non-Hamiltonian driving, phase volume is not conserved; attractors and limit cycles appear. Liouville fails — by exactly the divergence.
Bounded energy surfaceμ(ΓE)<∞\mu(\Gamma_E) < \inftyFinite accessible volume plus volume preservation forces Poincaré recurrence: almost every state returns arbitrarily near its start.
Integrable systemsdΓ=∏idIi dθi\mathrm{d}\Gamma = \prod_i \mathrm{d}I_i\,\mathrm{d}\theta_iIn action-angle variables the flow is rigid rotation in the angles; volume preservation is manifest and the actions are frozen.
Canonical transformations∣det⁡∂(Q,P)∂(q,p)∣=1\left\vert \det\frac{\partial(Q,P)}{\partial(q,p)}\right\vert = 1Every canonical map preserves phase volume; Liouville is the time-flow special case.
One degree of freedomarea preservationIn the phase plane the conserved measure is literally area — every figure in this article.

Worked examples

1 · How fast dissipation drains phase area (confidence builder)

A damped oscillator has mass m=0.50 kgm = 0.50\ \mathrm{kg}, spring constant k=2.0 N/mk = 2.0\ \mathrm{N/m}, and linear drag coefficient b=0.10 kg/sb = 0.10\ \mathrm{kg/s}:  x˙=v\ \dot x = v,  v˙=−(k/m)x−(b/m)v\ \dot v = -(k/m)x - (b/m)v. Find the divergence of its phase flow, the law by which a blob's area decays, and the area half-life.

Step 1. Compute the divergence in the (x,v)(x,v) plane. ∂x˙/∂x=0\partial\dot x/\partial x = 0 and ∂v˙/∂v=−b/m\partial\dot v/\partial v = -b/m, so ∇⋅v=−b/m=−0.10/0.50=−0.20 s−1\nabla\cdot\mathbf{v} = -b/m = -0.10/0.50 = \boxed{-0.20\ \mathrm{s^{-1}}} — uniform over the whole plane, and independent of the spring constant. (The same value results in the canonical (x,p)(x,p) plane with p=mvp = mv: the drag term − (b/m)p-\,(b/m)p in p˙\dot p has pp-derivative −b/m-b/m.)

Step 2. Integrate the transport law. With constant divergence, dA/dt=(∇⋅v)A\mathrm{d}A/\mathrm{d}t = (\nabla\cdot\mathbf{v})A gives exponential decay, A(t)=A0 e−bt/m=A0 e−0.20 tA(t) = A_0\,e^{-bt/m} = A_0\,e^{-0.20\,t} — every blob, anywhere in the plane, regardless of shape.

Step 3. Solve for the half-life: e−bt1/2/m=12e^{-bt_{1/2}/m} = \tfrac12 gives t1/2=mln⁡2b=0.50×0.69310.10=3.47 st_{1/2} = \dfrac{m\ln 2}{b} = \dfrac{0.50 \times 0.6931}{0.10} = \boxed{3.47\ \mathrm{s}}. After 10 s10\ \mathrm{s} the area is e−2=13.5%e^{-2} = 13.5\% of the original. The contrast figure above is this exact system: computed areas 0.363→0.182→0.0910.363 \to 0.182 \to 0.091 at t=0, 3.47, 6.93 st = 0,\ 3.47,\ 6.93\ \mathrm{s} — one half-life each step.

Step 4. Read the moral. The number −b/m-b/m is the failure of Liouville's theorem for this system, and its sign is why the damped oscillator can have an attractor at the origin while its undamped twin cannot.

2 · Free-streaming shear of a rectangle (exam level)

An ensemble of free particles of mass m=0.60 kgm = 0.60\ \mathrm{kg} initially fills the rectangle 0≤q≤0.20 m0 \le q \le 0.20\ \mathrm{m},  0≤p≤0.30 kg m/s\ 0 \le p \le 0.30\ \mathrm{kg\,m/s} in the phase plane. Evolve for t=2.0 st = 2.0\ \mathrm{s} and show explicitly — corner by corner — that the occupied area is unchanged, even though the region is violently sheared.

Step 1. Solve the dynamics exactly. For H=p2/2mH = p^2/2m:  p(t)=p0\ p(t) = p_0 and q(t)=q0+p0t/mq(t) = q_0 + p_0 t/m. The map is a pure shear along qq with shear coefficient t/m=2.0/0.60=3.33 m/(kg m/s)t/m = 2.0/0.60 = 3.33\ \mathrm{m/(kg\,m/s)}.

Step 2. Push the corners through. (0,0)→(0,0)(0,0) \to (0,0);  (0.20,0)→(0.20,0)\ (0.20, 0) \to (0.20, 0);  (0.20,0.30)→(0.20+3.33×0.30, 0.30)=(1.20, 0.30)\ (0.20, 0.30) \to (0.20 + 3.33\times0.30,\ 0.30) = (1.20,\ 0.30);  (0,0.30)→(1.00, 0.30)\ (0, 0.30) \to (1.00,\ 0.30). The bottom edge stays put; the top edge slides right by a full metre.

Step 3. Compute the sheared area by the shoelace formula on the parallelogram (0,0),(0.20,0),(1.20,0.30),(1.00,0.30)(0,0),(0.20,0),(1.20,0.30),(1.00,0.30): the cross terms give 2A=0.20×0.30−0+1.20×0.30−1.00×0.30+0=0.122A = 0.20\times0.30 - 0 + 1.20\times0.30 - 1.00\times0.30 + 0 = 0.12, so A=0.060 J sA = \boxed{0.060\ \mathrm{J\,s}} — exactly the initial Δq Δp=0.20×0.30=0.060 J s\Delta q\,\Delta p = 0.20 \times 0.30 = 0.060\ \mathrm{J\,s}. Equivalently: a shear matrix has determinant 1.

Step 4. Measure the distortion that hides inside "area conserved." The qq-extent grew from 0.20 m0.20\ \mathrm{m} to 1.20 m1.20\ \mathrm{m} — a factor of 6 — while the momentum spread is untouched. Position uncertainty exploded, yet in phase-space measure nothing happened. This is the beam-physics statement that a drifting bunch debunches without any loss of phase-space quality.

Step 5. Check the gravity variant. Add uniform gravity, H=p2/2m+mgzH = p^2/2m + mgz: now p(t)=p0−mgtp(t) = p_0 - mgt shifts every point down by the same amount while free-flight shear acts as before. A rigid translation composed with a unit-determinant shear still has Jacobian 1 — the parallelogram moves and tilts, its area stays 0.060 J s0.060\ \mathrm{J\,s}. Area is conserved in both cases.

Origins · 1 minJoseph Liouville and how this was discovered
JL
Joseph Liouville
1809–1882 · Paris; École Polytechnique and the Collège de France

Liouville proved his volume theorem in 1838 as a statement about systems of differential equations — statistical mechanics did not yet exist to appreciate it, and it was Jacobi who pulled the result into dynamics. That pattern was Liouville's whole career: machinery built decades ahead of its consumers. With Sturm he created Sturm–Liouville theory, the eigenvalue framework quantum mechanics would inherit a century later; in 1844 he exhibited the first provably transcendental numbers; his theorem on integrability by quadratures still defines what "solvable" means in Hamiltonian mechanics. He founded the Journal de Mathématiques Pures et Appliquées in 1836 and ran it for four decades — and in 1846 used it to rescue the unpublished manuscripts of Évariste Galois, dead fourteen years, presenting group theory to the world. A deputy in the 1848 Assembly, a professor at the École Polytechnique and the Collège de France, he carried a workload legendary even by nineteenth-century standards: some 400 published papers, and notebooks holding thousands of pages more.

History
1838
— Liouville publishes the volume-conservation result in his own Journal de Mathématiques, as a lemma about differential equations — no mechanics in sight.
1842
— Jacobi, in his Königsberg dynamics lectures, imports the theorem into Hamiltonian mechanics and names it for Liouville.
1871
— Boltzmann leans on phase-volume conservation in kinetic theory, en route to the ergodic hypothesis and entropy as counting.
1890
— Poincaré derives the recurrence theorem: volume preservation in a bounded energy shell forces almost every state to return near its start.
1902
— Gibbs's Elementary Principles in Statistical Mechanics makes Liouville's theorem the cornerstone of ensemble theory.
1927
— von Neumann writes the quantum Liouville equation for the density matrix — unitary evolution as the quantum face of incompressibility.

Going further

References. Goldstein, Poole & Safko, Classical Mechanics, 3rd ed., §9.9 · Landau & Lifshitz, Mechanics, 3rd ed., §46 footnote and statistical-physics companion · Morin, Introduction to Classical Mechanics, Ch. 15 (Hamiltonian formalism) · Taylor, Classical Mechanics, Ch. 13 · Arnold, Mathematical Methods of Classical Mechanics, §16

Provenance. Equations and derivations standard; verifier should recompute ∇⋅v=0\nabla\cdot\mathbf{v}=0 from Hamilton's equations via equality of mixed partials, confirm dJ/dt=(∇⋅v)J\mathrm{d}J/\mathrm{d}t=(\nabla\cdot\mathbf{v})J with J(0)=1J(0)=1, and check the Liouville equation derivation from the 2n2n-dimensional continuity equation. Cross-references: Goldstein, Poole & Safko §9.9; Landau & Lifshitz Mechanics and Statistical Physics; Arnold §16; Taylor Ch. 13. No numerical constants asserted.

Builds on: Hamilton's Canonical Equations · Phase Space · Hamiltonian Flow and the Phase Fluid · The Hamiltonian Function. Leads to: Poincaré Recurrence Theorem · Microcanonical Ensemble · Fixed Points and Stability in Phase Space · Symplectic Geometry and Canonical Invariants.

If phase volume never shrinks, how does a gas ever settle down to equilibrium?

By filamentation, not contraction. The occupied volume is rigorously constant, but Hamiltonian stirring draws it into ever-finer tendrils threaded through the energy shell — the hero figure run for longer. Any measurement with finite resolution averages over cells larger than the filament width, and against that coarse grid the ensemble becomes indistinguishable from the uniform microcanonical smear. Equilibration is a statement about coarse-grained observables; the fine-grained density remembers its initial value forever (dρ/dt=0\mathrm{d}\rho/\mathrm{d}t = 0). Mixing dynamics makes the filaments exponentially fine, which is why relaxation is fast in practice.

The Gibbs entropy is constant under Liouville flow — does that contradict the second law?

No, but it sharpens where the second law comes from. SG=−kB∫ρln⁡ρ dΓS_G = -k_B\int \rho\ln\rho\,\mathrm{d}\Gamma is fine-grained entropy, invariant because the integrand rides a measure-preserving flow. The entropy that grows is the coarse-grained one: partition phase space into finite cells, average ρ\rho over each, and the filamented distribution has higher cell-entropy than the compact initial blob. The second law then quantifies information degradation from fine to coarse scales. Boltzmann's H-theorem gets growth by injecting molecular chaos — a coarse-graining assumption — into the collision term.

Chaotic systems stretch neighboring trajectories exponentially. How is that consistent with exact volume conservation?

Stretching in some directions is paid for by contraction in others. The local stretch rates are the Lyapunov exponents, and for Hamiltonian flow they come in pairs ±λ\pm\lambda summing to zero — the logarithmic version of J(t)=1J(t) = 1. A chaotic blob elongates along unstable directions at rate λ\lambda while thinning along stable ones at rate −λ-\lambda; the product of side lengths is pinned. That is exactly why chaos produces filamentation: exponential stretching at fixed volume forces exponentially fine structure — the mechanism behind mixing and practical irreversibility.

Does Liouville's theorem still hold when the Hamiltonian depends explicitly on time?

Yes. The divergence computation never differentiates with respect to time — it needs only equality of mixed partials at each instant, which holds for H(q,p,t)H(q,p,t) just as well. A driven pendulum or a particle in an RF cavity transports phase volume exactly. What time dependence breaks is energy conservation: the energy shell moves and deforms, so ensembles of the form f(H)f(H) stop being stationary. Volume preservation and energy conservation are logically independent — a point worth internalizing, since beam optics uses Liouville precisely in strongly time-dependent fields.

Is volume preservation the same thing as being symplectic?

Only in one degree of freedom, where both reduce to area preservation. For n≥2n \ge 2, symplecticity — preserving the 2-form ∑idpi∧dqi\sum_i \mathrm{d}p_i\wedge\mathrm{d}q_i — is strictly stronger than preserving the single number dΓ\mathrm{d}\Gamma; Liouville is just its determinant shadow. The gap is physical: Gromov's non-squeezing theorem shows a symplectic map cannot push a ball through a hole narrower than the ball's cross-section in any conjugate plane, even though volume alone would allow it — the "symplectic camel." Symplectic integrators exploit the distinction: they respect the full structure, not merely volume, which is why they hold energy errors bounded over long runs.

What is the quantum analogue of Liouville's theorem?

Replace the density ρ(q,p)\rho(q,p) by the density operator ρ^\hat\rho and the Poisson bracket by a commutator: iℏ ∂ρ^/∂t=[H^,ρ^]i\hbar\,\partial\hat\rho/\partial t = [\hat H, \hat\rho] — the von Neumann (quantum Liouville) equation. Unitary evolution plays the role of the volume-preserving flow: it preserves the spectrum of ρ^\hat\rho, hence the purity Tr ρ^2\mathrm{Tr}\,\hat\rho^2 and the von Neumann entropy — the exact analogue of Gibbs-entropy constancy. Even the granularity is inherited: the uncertainty principle assigns each quantum state a phase-space cell of volume hnh^n, and semiclassical state counting is Liouville measure divided by hnh^n.

Liouville makes the microcanonical ensemble stationary. Does that prove equal a priori probabilities are correct?

No — it proves them consistent, which is weaker. Stationarity says: start uniform on the energy shell and you stay uniform, so the postulate does not undermine itself. But Liouville alone allows many other stationary densities — any f(H)f(H), and on the shell any function of further conserved quantities. Singling out the uniform one needs an extra dynamical input: ergodicity (time averages equal shell averages), mixing, or a maximum-ignorance argument à la Jaynes. For systems with extra invariants — integrable chains, near-integrable systems with KAM tori — uniform-on-the-shell is genuinely wrong, and generalized ensembles built on all the conserved quantities take its place.

Before this

Where this leads