physics2u
Tier
⌕ Search ⌘K
physics2u.com/vault/liouville-theorem-phase-space.html
Derivation

Liouville's Theorem on Phase-Space Volume

D-134 Home PU-201 Threads energy · chance · symmetry Depends on Hamilton's Canonical Equations, Poisson Brackets and the Algebra of Observables
Statement

For an autonomous Hamiltonian system with Hamiltonian H(q, p) on the 2N-dimensional phase space with canonical coordinates (q1,…,qN, p1,…,pN), the phase-flow velocity field is divergence-free, so the flow is incompressible: any co-moving region of phase space retains its 2N-volume for all time, dV/dt = 0, and equivalently the phase-space density is conserved along every trajectory, dρ/dt = 0.

Why it matters

Liouville's theorem is the structural backbone of statistical mechanics. It guarantees that the microcanonical measure — counting states by phase-space volume — is a legitimate, time-independent way to assign probabilities, because Hamiltonian dynamics never squeezes or stretches that measure. Without it, "equal a priori probability" would be dynamically incoherent.

It also draws a sharp line between reversible mechanics and irreversible thermodynamics. Because volume cannot shrink, isolated Hamiltonian systems cannot flow to a point-attractor; the emergence of macroscopic irreversibility must therefore come from coarse-graining and mixing, not from the microscopic equations themselves. The same incompressibility underlies the symplectic structure that survives quantization as unitarity.

Assumptions
The dynamics is Hamiltonian, generated by a function H through the canonical equations.If the forces are not derivable from a Hamiltonian (e.g. friction, or a general first-order flow), the velocity field need not be divergence-free and volume is not conserved. The coordinates are canonical, so the flow is (q̇i = ∂H/∂pi, ṗi = −∂H/∂qi).In non-canonical coordinates the naive Euclidean volume ∏dqidpi is generally not preserved; only the invariant symplectic measure is. H is twice continuously differentiable (C²) on the region of interest.If second mixed partials of H are discontinuous or undefined (hard-core collisions, corners, singular potentials), Clairaut's equality of mixed partials fails locally and the cancellation that kills the divergence is not guaranteed there. The phase space is finite-dimensional and the flow is complete (solutions exist for the times considered).For field theories or flows that escape to infinity or blow up in finite time, the volume statement requires additional care (infinite-dimensional symplectic measures, or restriction to invariant compact regions).
Derivation
1
Γ = (q1,…,qN, p1,…,pN),   u = Γ̇ = (q̇1,…,q̇N, ṗ1,…,ṗN)
Collect the canonical variables into one point Γ in 2N-dimensional phase space; its time derivative u is the phase-flow velocity field. This is a definition, no physics yet. A
2
i = ∂H/∂pi,    ṗi = −∂H/∂qi   (i = 1,…,N)
Insert the prior result hamilton-equations-of-motion. These express the components of u entirely through derivatives of the single scalar H. A
3
∇·u = Σi=1N ( ∂q̇i/∂qi + ∂ṗi/∂pi )
Write the divergence of the phase-flow field: the diagonal sum of ∂(velocity component)/∂(its own coordinate), taken over all 2N phase-space directions. B
4
∇·u = Σi=1N [ ∂/∂qi(∂H/∂pi) + ∂/∂pi(−∂H/∂qi) ]
Substitute the Hamilton equations from step 2 into each term. Each velocity component becomes a first derivative of H, so the divergence becomes a sum of second derivatives. B
5
∇·u = Σi=1N [ ∂²H/∂qi∂pi − ∂²H/∂pi∂qi ] = 0
By Clairaut/Schwarz, mixed partials of the C² function H commute, so each bracket vanishes term by term. The minus sign supplied by Hamilton's equations is exactly what makes them cancel — this is the antisymmetry of the symplectic structure at work. C
6
dV/dt = ∫Ω(t) (∇·u) dΓ = 0
The rate of change of the volume of a co-moving region Ω(t) equals the flux of u through its boundary, and by the divergence theorem this is the volume integral of ∇·u. Since the integrand is identically zero (step 5), the volume is constant. B
7
dΓ′ = J dΓ,   J = det(I + (∂u/∂Γ) dt) = 1 + (∇·u) dt + O(dt²) = 1
Equivalent infinitesimal view: advancing every point by Γ → Γ + u dt has Jacobian whose leading correction is the trace of ∂u/∂Γ, namely ∇·u. It vanishes, so the volume element is preserved to first order — hence exactly, by composing infinitesimal steps. C
8
∂ρ/∂t + ∇·(ρu) = 0  ⇒  dρ/dt = ∂ρ/∂t + u·∇ρ = 0
Number of systems is conserved, so the phase-space density ρ obeys a continuity equation. Expanding ∇·(ρu) = u·∇ρ + ρ(∇·u) and dropping the second term (step 5) leaves the convective derivative equal to zero. Using poisson-brackets, u·∇ρ = {ρ, H}, giving the Liouville equation ∂ρ/∂t = −{ρ, H}. C
Result
∇·u = 0  ⇒  dV/dt = 0  and  dρ/dt = 0

Reading. Hamiltonian flow is incompressible. A droplet of representative points in phase space may be sheared and folded into ever more contorted filaments, but its total 2N-volume never changes; equivalently, an observer riding along any single trajectory sees the local density of neighbouring systems stay fixed. Phase space behaves like an ideal, frictionless fluid whose velocity field has zero divergence everywhere.

Units check. Each coordinate pair contributes [q][p] = m · (kg m/s) = kg m²/s = J·s = action, so V carries units (J·s)N and is time-independent. The divergence ∂q̇/∂q = (m/s)/m = s−1 and ∂ṗ/∂p = (kg m/s²)/(kg m/s) = s−1 share units s−1 and sum to zero; dV/dt = V⋅(∇·u) = 0 is consistent with (J·s)N/s.

Limiting cases
  • One degree of freedom (N = 1): the invariant is ordinary phase-plane area ∫dq dp; the theorem reduces to "the (q, p) flow is area-preserving", i.e. the flow map is symplectic with unit Jacobian.
  • Free particle / linear flows: the flow is a pure shear or rotation of phase space — area is obviously preserved even though shapes distort strongly.
  • Time-independent statistical equilibrium: if ρ = ρ(H) depends only on conserved H, then {ρ, H} = 0 and ∂ρ/∂t = 0 automatically — any function of the Hamiltonian is a stationary distribution.
  • Slowly varying H(t) (adiabatic): at each instant the flow is still divergence-free, so volume is preserved instantaneously; the enclosed area of a closed orbit becomes an adiabatic invariant (action variable).
Breaks when
  • Dissipative / non-Hamiltonian dynamics. Add a drag term, e.g. the damped oscillator ṗ = −mω²q − γp. Then ∂ṗ/∂p = −γ ≠ 0, so ∇·u = −γ < 0 and phase volume contracts as e−γt, collapsing onto attractors. No Hamiltonian generates such a flow, so the cancellation of step 5 never arises.
  • Open / reduced systems (coarse-graining). If you project out (integrate over) some degrees of freedom or couple the system to an unmodelled environment, the effective marginal flow acquires an effective friction and is generally not volume-preserving, even though the full closed system is.
  • Non-smooth or singular Hamiltonians. At hard-sphere collisions, contact discontinuities, or 1/r singularities, H is not C², mixed partials need not commute, and the local argument fails; the theorem must be reinstated by treating collisions as measure-preserving maps rather than smooth flow.
  • Explicit external stochastic forcing. Langevin-type noise injects and removes phase volume in a way not captured by a deterministic divergence, replacing Liouville's equation with a Fokker–Planck equation that has a diffusion term.
Failure modes
  • Confusing "ρ constant along a trajectory" with "ρ uniform in phase space." dρ/dt = 0 is a statement following moving points; ρ can still vary wildly from place to place and in time at a fixed point (∂ρ/∂t ≠ 0 in general).
  • Believing the shape of the droplet is preserved. Only the volume is invariant. Chaotic flows stretch and fold the region into thin filaments (mixing); this is compatible with, not a violation of, Liouville.
  • Applying it in configuration space alone. A bundle of trajectories can converge in q (focusing) while spreading in p; only the full (q, p) volume is conserved.
  • Using non-canonical coordinates. Rescaling p → 2p makes ∏dq dp change even under a Hamiltonian flow; the invariant is the canonical (symplectic) volume, not any Euclidean one.
  • Thinking energy loss is allowed. Any genuine dissipation makes ∇·u ≠ 0; a system that "runs down" cannot be strictly Hamiltonian in the coordinates used.
  • Forgetting the minus sign in Hamilton's equations. Dropping it turns the two second-derivative terms into a sum instead of a difference; the divergence would then be 2Σ∂²H/∂q∂p, not zero — the antisymmetry is essential.
Discussion

The deep origin of incompressibility is geometric, not accidental. Hamilton's equations can be written Γ̇ = Ω∇H with a fixed antisymmetric matrix Ω (the symplectic form). The velocity field is therefore a "symplectic gradient," and the very antisymmetry of Ω forces the trace of ∂u/∂Γ — the divergence — to vanish. Liouville's theorem is thus the volume shadow of a stronger statement: the flow preserves the entire symplectic 2-form, and with it a whole tower of Poincaré integral invariants, of which phase volume is the top one.

Statistically, incompressibility is what makes ensembles well defined. The microcanonical distribution assigns equal weight per unit phase volume on an energy shell; because the flow neither compresses nor rarefies that volume, this weighting is stationary and a uniform ensemble stays uniform. The theorem is therefore the dynamical justification for using phase-space volume as the entropy-defining measure, S = kB ln Ω.

There is a striking tension with the second law. Since volume cannot decrease, the fine-grained Gibbs entropy −kB∫ρ ln ρ dΓ is exactly constant under Hamiltonian flow — it cannot rise. The observed increase of thermodynamic entropy comes from coarse-graining: the droplet's volume is fixed, but it filaments so finely that any finite-resolution measurement sees it "fill" a larger effective region. Irreversibility is an epistemic, mixing phenomenon layered on top of perfectly reversible, volume-preserving microdynamics.

The result survives quantization in transformed guise. The symplectic structure that guarantees ∇·u = 0 becomes, under canonical quantization, the commutator structure that makes time evolution unitary; unitarity is the quantum incompressibility, preserving inner products just as the classical flow preserves volume. The Wigner function's evolution reduces to the classical Liouville equation in the ℏ → 0 limit, and the Ehrenfest correspondence traces phase-volume conservation directly to the trace-preserving property of the von Neumann equation. Liouville, symplecticity, and unitarity are three faces of one antisymmetry.

Common misconceptions. Liouville's theorem does not say trajectories cannot converge or that motion is not chaotic — chaos is fully compatible with it. Nor does it forbid entropy increase, which is about coarse-grained volume. And it is not a claim about a single trajectory occupying volume (a point has none); it is a claim about how a region or a density of many systems evolves.

Worked examples
1
Simple harmonic oscillator: H = p²/2m + ½mω²q²
Verify the divergence vanishes and that the finite-time flow map has unit Jacobian, so an area element is preserved though rotated/sheared. A
2
q̇ = ∂H/∂p = p/m,   ṗ = −∂H/∂q = −mω²q
Hamilton's equations for this H. A
3
∇·u = ∂q̇/∂q + ∂ṗ/∂p = 0 + 0 = 0
q̇ has no q-dependence and ṗ has no p-dependence, so both diagonal derivatives vanish. Divergence-free confirmed. B
4
q(t) = q0cosωt + (p0/mω)sinωt,   p(t) = −mωq0sinωt + p0cosωt
Exact linear solution of the equations of motion, giving the flow map (q0,p0) → (q,p). B
5
J = det [ [∂q/∂q0, ∂q/∂p0], [∂p/∂q0, ∂p/∂p0] ] = det [ [cosωt, sinωt/(m&omega)], [−mωsinωt, cosωt] ]
Jacobian of the flow map. B
6
J = cos²ωt + sin²ωt = 1
The (mω) factors cancel between off-diagonal terms; Pythagorean identity gives exactly 1 for all t. B
7
Numbers: m = 1 kg, ω = 2 s−1, initial cell Δq0 = 0.10 m, Δp0 = 0.20 kg m/s, t = π/4 s (quarter period)
A small rectangular ensemble in phase space, evolved a quarter period so ωt = π/2. A
8
A0 = Δq0 Δp0 = 0.020 kg m²/s;   A(t) = J A0 = 1 × 0.020 = 0.020 kg m²/s
Area transforms by the Jacobian; at ωt = π/2 the cell has rotated into a q-p swapped, rescaled rhombus but its area is unchanged. B
A(t) = 0.020 kg m²/s = A0,   J = 1

Reading. The oscillator's phase-space cell circulates on nested ellipses; after a quarter period it is turned by 90° in scaled coordinates yet occupies precisely the same area. Volume is conserved exactly, as Liouville requires.

Units check. Area = m × (kg m/s) = kg m²/s = J·s; J is dimensionless, so A(t) keeps units J·s.

1
Free particle: H = p²/2m
Show the flow is a pure shear with unit Jacobian, so an initial cell keeps its area while badly distorting its shape. A
2
q̇ = p/m,   ṗ = 0  ⇒  ∇·u = ∂(p/m)/∂q + ∂0/∂p = 0
Momentum is conserved (no force), position drifts; both diagonal derivatives are zero, so the flow is divergence-free. A
3
q(t) = q0 + (p0/m)t,   p(t) = p0
Exact solution; the map shears q by an amount proportional to p0. A
4
J = det [ [1, t/m], [0, 1] ] = 1
Upper-triangular shear matrix has determinant equal to the product of its unit diagonal. B
5
Numbers: m = 2 kg, t = 3 s, cell Δq0 = 0.10 m, Δp0 = 0.20 kg m/s
A rectangular ensemble of free particles with a spread in position and momentum. A
6
shear amount Δq from momentum spread = (Δp0/m)t = (0.20/2)(3) = 0.30 m;   A = J Δq0Δp0 = 1 × 0.020
The cell becomes a slanted parallelogram whose top edge is displaced 0.30 m relative to the bottom, but the base × height (area) is unchanged. B
A = 0.020 kg m²/s,   shear = 0.30 m,   J = 1

Reading. Faster particles outrun slower ones, tilting the phase cell into a long thin parallelogram — the classic "filamentation" of free expansion — yet its phase-space area is exactly preserved. Distortion without compression is the signature of Liouville flow.

Units check. Shear = (kg m/s / kg)⋅s = m; area = m × kg m/s = kg m²/s = J·s. Consistent.

Problems
  1. Divergence of a general flow. For a one-degree-of-freedom system show explicitly that ∂q̇/∂q + ∂ṗ/∂p = 0 for any C² Hamiltonian H(q, p), and identify which property of H is responsible.
    Solution q̇ = ∂H/∂p and ṗ = −∂H/∂q. Then ∂q̇/∂q = ∂²H/∂q∂p and ∂ṗ/∂p = −∂²H/∂p∂q. For a C² function the mixed partials are equal (Clairaut/Schwarz), so the sum is ∂²H/∂q∂p − ∂²H/∂p∂q = 0. The responsible property is the symmetry of second mixed partials of the smooth H, combined with the sign asymmetry of Hamilton's equations.
  2. Damped oscillator contraction. A damped oscillator obeys q̇ = p/m, ṗ = −mω²q − γp with γ = 0.50 s−1. Find ∇·u and the factor by which a phase-space area shrinks after t = 4.0 s. Is this system Hamiltonian in these coordinates?
    Solution ∂q̇/∂q = 0, ∂ṗ/∂p = −γ, so ∇·u = −γ = −0.50 s−1. Area evolves as A(t) = A0 exp(∫∇·u dt) = A0e−γt. After t = 4.0 s the factor is e−(0.50)(4.0) = e−2.0 = 0.135. The area shrinks to about 13.5% of its initial value. Because ∇·u ≠ 0 the flow is not volume-preserving, so it cannot be generated by a Hamiltonian in these coordinates; the friction term is genuinely dissipative.
  3. Stationary distribution. Show that any density of the form ρ = f(H) is a stationary solution of the Liouville equation ∂ρ/∂t = −{ρ, H}. Give one concrete example used in statistical mechanics.
    Solution The Poisson bracket {f(H), H} = f′(H){H, H} by the chain rule, and {H, H} = 0 identically (any quantity's bracket with itself is zero by antisymmetry). Hence {ρ, H} = 0, so ∂ρ/∂t = 0 and ρ = f(H) is stationary. Concrete example: the canonical (Boltzmann) distribution ρ ∝ e−H/kBT, which depends on phase-space point only through H and is therefore a valid time-independent equilibrium ensemble.
  4. SHO flow map at a general time. Using q(t) = q0cosωt + (p0/mω)sinωt and p(t) = −mωq0sinωt + p0cosωt, confirm the Jacobian is 1 for all t, and evaluate it numerically at ωt = 1.20 rad to check.
    Solution J = (∂q/∂q0)(∂p/∂p0) − (∂q/∂p0)(∂p/∂q0) = (cosωt)(cosωt) − (sinωt/mω)(−mωsinωt) = cos²ωt + sin²ωt = 1. Numerically at ωt = 1.20: cos1.20 = 0.3624, sin1.20 = 0.9320, so cos² + sin² = 0.1313 + 0.8687 = 1.000. The Jacobian is 1, confirming area preservation independent of the (mω) scale.
  5. Coarse-grained vs fine-grained entropy. Explain, using Liouville's theorem, why the fine-grained Gibbs entropy S = −kB∫ρ lnρ dΓ is exactly constant under Hamiltonian flow, and how the second law's entropy increase is nonetheless recovered.
    Solution Along the flow dρ/dt = 0 (density conserved on co-moving points) and the volume element dΓ is invariant (Liouville). The integrand ρ lnρ is a fixed function of the conserved ρ, integrated over an invariant measure, so S is exactly time-independent: dS/dt = 0. The fine-grained entropy cannot increase. Thermodynamic entropy increase is recovered by coarse-graining: the phase droplet keeps its volume but filaments to sub-resolution scales, so when ρ is averaged over finite cells the smoothed density ρ̄ has lower ∫ρ̄ lnρ̄, i.e. the coarse-grained entropy rises. Irreversibility is a consequence of finite observational resolution acting on a mixing but volume-preserving flow, not of the microscopic dynamics.