Hamiltonian Flow and the Phase Fluid

Set up not one pendulum but a million of them, each released from a slightly different angle with a slightly different push, and mark each as a dot in the (q,p)(q,p) plane. Now let them all go at once. The cloud drifts — not chaotically but in choreography: every dot follows the velocity arrow that Hamilton's equations pin to its location, exactly as a speck of dust follows the local velocity of a river. This is the Hamiltonian flow ϕt\phi_t: the simultaneous motion of every possible state, phase space itself set flowing like a fluid. The phase fluid obeys two exact structural laws. First, it is incompressible: the field XH=(∂H/∂p, −∂H/∂q)X_H=(\partial H/\partial p,\,-\partial H/\partial q) has identically zero divergence, so the million-dot cloud can stretch into a long filament but its volume never changes — Liouville's theorem, the load-bearing wall under statistical mechanics. Second, and stronger, the flow is canonical: each map ϕt\phi_t preserves the full symplectic structure and every Poisson bracket, making time evolution a continuously unfolding canonical transformation with HH as generator. You already know the arena (phase space) and the equations of motion (Hamilton's canonical equations). Here the two fuse into a single geometric object — a divergence-free, symplectic velocity field — and the fluid picture starts paying rent: it explains why energy contours are streamlines, why blobs shear into filaments at a computable rate, why symplectic integrators can track the solar system for billions of years, and what quantum mechanics will later mean by "the Hamiltonian generates time evolution."

Key takeaways
  • A Hamiltonian H(q,p,t)H(q,p,t) assigns a velocity to every phase point: (q˙,p˙)=(∂H/∂p, −∂H/∂q)(\dot q,\dot p)=(\partial H/\partial p,\,-\partial H/\partial q) — the Hamiltonian vector field XHX_H; following all its arrows at once is the Hamiltonian flow ϕt\phi_t, the "phase fluid."
  • The phase fluid is incompressible: ∇⋅XH=0\nabla\cdot X_H=0 identically, by equality of mixed partials — any blob of initial conditions keeps exactly constant volume while it stretches and folds (Liouville's theorem).
  • In one degree of freedom, HH is literally the stream function of the flow: trajectories, streamlines, and level curves of HH are the same objects.
  • Each flow map ϕt\phi_t is a canonical (symplectic) transformation: its Jacobian obeys MTJM=JM^{\mathsf T}JM=J, preserving Poisson brackets and ω=∑dqi∧dpi\omega=\sum\mathrm{d}q_i\wedge\mathrm{d}p_i — stronger than volume conservation.
  • Observables ride the flow through the bracket, f˙={f,H}+∂f/∂t\dot f=\{f,H\}+\partial f/\partial t; volume conservation does not prevent deformation — tori shear at rate dω/dJ\mathrm{d}\omega/\mathrm{d}J, hyperbolic points stretch blobs exponentially.
  • Key idea: Hamilton's equations define a divergence-free vector field XH=(∂pH,−∂qH)X_H=(\partial_p H,-\partial_q H) on phase space; its flow is an incompressible, symplectic fluid whose every streamline is a trajectory and whose volume conservation is Liouville's theorem.

Where this lives today

Every serious long-time simulation of a Hamiltonian system now respects the flow's geometry on purpose. Symplectic integrators — leapfrog/Verlet in molecular dynamics, Wisdom–Holman maps in planetary dynamics — advance the state by maps satisfying MTJM=JM^{\mathsf T}JM=J exactly, and the payoff is a beautiful inversion: a symplectic scheme solves, essentially exactly, the flow of a nearby "shadow Hamiltonian" H~=H+O(Δtk)\tilde H=H+O(\Delta t^k). Energy errors therefore oscillate boundedly instead of drifting — why MD codes hold protein simulations together for microseconds of physical time, and why planetary ephemerides stay honest over the age of the solar system, where a non-symplectic Runge–Kutta of the same order would slowly spiral Mercury somewhere it has no business being. The 2026-era twist is machine learning: Hamiltonian and symplectic neural networks bake XH=J∇HX_H=J\nabla H into the architecture, so learned dynamics conserve by construction rather than by hope. Accelerator physics, meanwhile, lives and dies by the shear clock of Derivation C. Injection mismatch, decoherence, and emittance dilution at the LHC are filamentation phenomena — blobs of 101110^{11} protons smearing along tori at a rate set by the tune spread, with Liouville forbidding true compression and "beam cooling" defined as the art of sneaking non-Hamiltonian terms past that prohibition. The same reasoning now governs galactic dynamics: the stellar phase-space spirals Gaia mapped in the Milky Way disc are filamentation in action, used to date past perturbations — one theorem, read from tabletop pendulum to galaxy.

The physical picture

Imagine phase space densely packed with copies of the system, one starting from every possible state. Hamilton's equations tell each copy where to go next, exactly as a stationary velocity field tells each fluid parcel where to drift. Watching them all at once, you see a flowing fluid — the phase trajectories of the phase-portraits article, now understood as streamlines of a single global object. Here it is for a pendulum, computed point by point:

Figure
Every phase point gets a velocity arrow tangent to its energy contour — the whole plane flows at once
qpcentersaddlethe Hamiltonian vector field of a pendulumarrow length = speed of the phase fluidlibrationrotationseparatrix X_H = (p, -sin q): arrows stay tangent to H-contours and lengthen where contours crowd

Three features repay a long stare. The arrows are everywhere tangent to the energy contours: the velocity is the gradient of HH rotated by 90° in the (q,p)(q,p) plane — the "symplectic gradient" — so the fluid can never flow uphill or downhill in HH, only sideways along its contours. That 90° rotation is energy conservation, drawn. Second, the arrows lengthen exactly where contours crowd: in one degree of freedom HH behaves as the stream function of a 2D incompressible flow, and closely spaced streamlines mean fast flow, precisely as in a river narrowing between banks. Third, the flow stands still at the center and at the saddles q=±πq=\pm\pi — the anatomy of the whole portrait hangs on these (they get their own article on fixed points and stability). The fluid never compresses or rarefies. Drop a dye-marked droplet of initial conditions into it and watch:

Figure
Drop the same disc of initial conditions into two flows: the oscillator rotates it rigidly, the pendulum shears it into a filament — the area never changes
harmonic oscillator: rigid rotationQPsame disc at three instants: shape and area keptpendulum: shear into a filamentqpt = 0t = 6t = 18one disc of states, advected exactly (RK4) the three pendulum snapshots have equal computed areas to 0.1 percent

For the harmonic oscillator (left), the droplet rides around rigidly — in scaled coordinates the flow is a uniform rotation at rate ω\omega for every amplitude, so the disc never changes shape (the harmonic-oscillator-phase-space article makes this exact). The pendulum (right) tells the general story: inner points circulate faster than outer ones because the pendulum's period grows with amplitude, so the disc shears into a long thin filament wrapping around its annulus of tori. The RK4-computed areas of the three snapshots agree to a tenth of a percent — drastically deformed, not one bit compressed. The 'no leaks, no compression' rule is forced by the pairing of +∂pH+\partial_p H in q˙\dot q with −∂qH-\partial_q H in p˙\dot p: the minus sign makes the two compression terms cancel. Because the flow preserves not just volume but Poisson brackets, it is a canonical transformation for every tt: time evolution is a continuously-generated change of canonical coordinates with HH as generator — the classical seed of the quantum statement that H^\hat H generates unitary time evolution.

The flow field and its algebra

Collect the 2n2n coordinates into one vector — the subject becomes transparent the moment you stop treating qq and pp separately. Hamilton's equations become a single first-order flow equation,

z˙=XH(z),z=(q1,…,qn,p1,…,pn)(1)\dot z = X_H(z),\qquad z=(q_1,\dots,q_n,p_1,\dots,p_n) \qquad (1)

where: zz — a point in 2n2n-dimensional phase space; XHX_H — the Hamiltonian vector field, the phase-fluid velocity at zz; nn — the number of degrees of freedom. Read it as a weather map: phase space carries a stationary wind pattern (stationary when HH is time-independent), and dynamics is drifting with the wind. The components of that wind come straight from the canonical equations,

XH=(∂H∂p1,…,∂H∂pn, −∂H∂q1,…,−∂H∂qn)(2)X_H=\left(\frac{\partial H}{\partial p_1},\dots,\frac{\partial H}{\partial p_n},\,-\frac{\partial H}{\partial q_1},\dots,-\frac{\partial H}{\partial q_n}\right) \qquad (2)

where: H(q,p,t)H(q,p,t) — the Hamiltonian; ∂H/∂pi=q˙i\partial H/\partial p_i=\dot q_i — velocity in the coordinate directions; −∂H/∂qi=p˙i-\partial H/\partial q_i=\dot p_i — velocity in the momentum directions. The asymmetry — plus on one half, minus on the other — looks like a typo and turns out to be the engine of everything below: it is exactly what makes the divergence vanish and the flow symplectic. Those 2n2n components compress into one geometric statement. With the symplectic unit matrix JJ,

XH=J ∇H,J=(0In−In0)(3)X_H = J\,\nabla H,\qquad J=\begin{pmatrix}0 & I_n\\ -I_n & 0\end{pmatrix} \qquad (3)

where: JJ — the 2n×2n2n\times2n symplectic (Poisson) matrix, antisymmetric with J2=−IJ^2=-I; ∇H\nabla H — the ordinary phase-space gradient; InI_n — the n×nn\times n identity block. In each (qi,pi)(q_i,p_i) plane, JJ rotates a vector by 90°: a pure gradient flow would slide downhill and stop, but the symplectic rotation makes the fluid circulate along level sets of HH forever. Check the tangency directly: ∇H⋅XH=∇HTJ ∇H=0\nabla H\cdot X_H = \nabla H^{\mathsf T}J\,\nabla H = 0 because JJ is antisymmetric. Now take the divergence of the field — one line, and the most consequential line in this chapter:

∇⋅XH=∑i=1n ⁣(∂∂qi∂H∂pi−∂∂pi∂H∂qi)=0(4)\nabla\cdot X_H=\sum_{i=1}^n\!\left(\frac{\partial}{\partial q_i}\frac{\partial H}{\partial p_i}-\frac{\partial}{\partial p_i}\frac{\partial H}{\partial q_i}\right)=0 \qquad (4)

where: ∇⋅XH\nabla\cdot X_H — the phase-space divergence, the fractional rate at which a comoving volume grows. Each term cancels its partner by equality of mixed partials — no restriction to conservative forces or time-independence. Every Hamiltonian flow, without exception, is incompressible. Derivation A unpacks this and its integral form, Liouville's theorem. The flow also tells every observable how to change. For any f(q,p,t)f(q,p,t), the chain rule along a trajectory gives

dfdt={f,H}+∂f∂t,{f,g}=∑i(∂f∂qi∂g∂pi−∂f∂pi∂g∂qi)(5)\frac{\mathrm{d}f}{\mathrm{d}t}=\{f,H\}+\frac{\partial f}{\partial t},\qquad \{f,g\}=\sum_i\left(\frac{\partial f}{\partial q_i}\frac{\partial g}{\partial p_i}-\frac{\partial f}{\partial p_i}\frac{\partial g}{\partial q_i}\right) \qquad (5)

where: {f,H}\{f,H\} — the Poisson bracket of ff with the Hamiltonian, precisely the directional derivative of ff along XHX_H; ∂f/∂t\partial f/\partial t — any explicit time dependence of ff. Geometry says "points move along XHX_H"; algebra says "functions evolve by bracketing with HH." The consequences — conservation laws, Poisson's theorem — live in the article on time evolution of phase-space functions. For an autonomous Hamiltonian the flow maps compose like a group, ϕt∘ϕs=ϕt+s\phi_t\circ\phi_s=\phi_{t+s}, and the family is the exponential of its generator,

ϕt=exp⁡(t LXH),f(t)=et{ ⋅ ,H}f(0)(6)\phi_t=\exp(t\,\mathcal{L}_{X_H}),\qquad f(t)=e^{t\{\,\cdot\,,H\}}f(0) \qquad (6)

where: ϕt\phi_t — the time-tt flow map z0↦z(t)z_0\mapsto z(t); LXH\mathcal{L}_{X_H} — the Lie derivative along XHX_H, acting on functions as { ⋅ ,H}\{\,\cdot\,,H\}. For nonlinear systems the exponential is shorthand for the Lie series (whose truncations are how symplectic integrators are built); for linear systems it is a literal matrix exponential, as the first worked example shows. Setting f=Hf=H in (5) gives H˙={H,H}+∂H/∂t=∂H/∂t\dot H=\{H,H\}+\partial H/\partial t=\partial H/\partial t: the bracket kills itself by antisymmetry, so autonomous flows conserve energy and trajectories stay on the level sets H=constH=\mathrm{const}.

Which equation answers which question

you wantusenotes
the velocity of a phase pointeqs. (1)–(2)the phase fluid's wind map
the geometry in one formulaXH=J∇HX_H=J\nabla H, eq. (3)gradient rotated 90°; tangent to HH-contours
why blobs keep their volume∇⋅XH=0\nabla\cdot X_H=0, eq. (4)Liouville, differential form
evolution of any observablef˙={f,H}+∂tf\dot f=\{f,H\}+\partial_t f, eq. (5)XHX_H acting as a derivation
the flow as one objectϕt=exp⁡(tLXH)\phi_t=\exp(t\mathcal{L}_{X_H}), eq. (6)group law ϕt∘ϕs=ϕt+s\phi_t\circ\phi_s=\phi_{t+s}
what the flow map preservesMTJM=JM^{\mathsf T}JM=J, eq. (7) belowsymplectic: brackets, ω\omega, volume
Derivation AThe phase fluid is incompressible and H is its stream function

We are proving the differential form of Liouville's theorem: the divergence of the Hamiltonian vector field vanishes identically, so the phase fluid conserves the volume of every comoving blob. The strategy is disarmingly direct — treat XHX_H as an ordinary velocity field on the 2n2n-dimensional space, compute its divergence, and watch the terms cancel in pairs by symmetry of mixed partials. Watch two things: the cancellation needs the relative minus sign between the two halves of Hamilton's equations (not a garnish — the whole theorem), and the result uses only instantaneous spatial derivatives, so it survives explicit time dependence of HH. Along the way we make the stream-function analogy exact in one degree of freedom.

Step 1. Write the divergence: velocity components are q˙i\dot q_i along coordinates and p˙i\dot p_i along momenta,

∇⋅XH=∑i(∂q˙i∂qi+∂p˙i∂pi)\nabla\cdot X_H=\sum_{i}\left(\frac{\partial \dot q_i}{\partial q_i}+\frac{\partial \dot p_i}{\partial p_i}\right)

each term the rate at which a velocity component grows along its own axis — the standard measure of local fluid expansion.

Step 2. Insert Hamilton's equations, 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, then invoke equality of mixed partials (Clairaut–Schwarz, valid for any twice continuously differentiable HH):

∇⋅XH=∑i(∂2H∂qi ∂pi−∂2H∂pi ∂qi)=0\nabla\cdot X_H=\sum_i\left(\frac{\partial^2 H}{\partial q_i\,\partial p_i}-\frac{\partial^2 H}{\partial p_i\,\partial q_i}\right)=0

Why the minus sign is everything: had Hamilton's equations read p˙=+∂qH\dot p=+\partial_q H, the terms would add instead of cancel and the divergence would be 2∑i∂2H/∂qi∂pi≠02\sum_i\partial^2H/\partial q_i\partial p_i\neq0 in general. The canonical minus sign is precisely the incompressibility of mechanics.

Step 3. Make the fluid analogy exact in one degree of freedom. A 2D incompressible fluid has a stream function ψ(x,y)\psi(x,y) with velocity (u,v)=(∂ψ/∂y, −∂ψ/∂x)(u,v)=(\partial\psi/\partial y,\,-\partial\psi/\partial x) — automatically divergence-free, streamlines the level curves of ψ\psi. Compare XH=(∂H/∂p, −∂H/∂q)X_H=(\partial H/\partial p,\,-\partial H/\partial q): the correspondence ψ↔H\psi\leftrightarrow H, (x,y)↔(q,p)(x,y)\leftrightarrow(q,p) is exact. Trajectories, streamlines, and energy contours are the same curves, and the speed is ∣∇H∣|\nabla H| — fast where contours crowd, exactly as the hero figure shows.

Step 4. Pass to the integral statement. For a comoving region Ωt=ϕt(Ω0)\Omega_t=\phi_t(\Omega_0), the transport theorem gives ddtVol(Ωt)=∫Ωt∇⋅XH d2nz=0\frac{\mathrm{d}}{\mathrm{d}t}\mathrm{Vol}(\Omega_t)=\int_{\Omega_t}\nabla\cdot X_H\,\mathrm{d}^{2n}z=0: phase volume is exactly conserved. Equivalently a density ρ\rho obeys the continuity equation ∂tρ+∇⋅(ρXH)=0\partial_t\rho+\nabla\cdot(\rho X_H)=0, which with ∇⋅XH=0\nabla\cdot X_H=0 becomes dρ/dt=∂tρ+XH⋅∇ρ=0\mathrm{d}\rho/\mathrm{d}t=\partial_t\rho+X_H\cdot\nabla\rho=0 — the density riding with a moving phase point never changes. How ensembles exploit this is the business of the Liouville's-theorem article.

The flow map is a canonical transformation

Incompressibility is only the visible edge of a sharper fact. Freeze the flow at time tt and regard ϕt\phi_t as a coordinate change sending each initial state z0z_0 to the evolved state z(t)z(t). The claim: this map is canonical for every tt — it preserves the entire symplectic structure, not merely volume. The statement is a condition on the Jacobian of the map,

MTJ M=J,M=∂ϕt∂z0(7)M^{\mathsf T} J\,M = J,\qquad M=\frac{\partial\phi_t}{\partial z_0} \qquad (7)

where: MM — the Jacobian of the flow map, describing how an infinitesimal cloud of initial conditions is linearly deformed after time tt; MTJM=JM^{\mathsf T}JM=J — the symplectic condition, the matrix form of "all Poisson brackets are preserved." Determinants of (7) give (det⁡M)2=1(\det M)^2=1, and continuity from M(0)=IM(0)=I forces det⁡M=+1\det M=+1: volume conservation drops out as a corollary. The converse fails — for n≥2n\geq2 there are volume-preserving maps that are not symplectic, so (7) genuinely says more than Liouville. The equivalent coordinate-free statement is that the flow preserves the symplectic 2-form,

ω=∑i=1ndqi∧dpi,ϕt∗ω=ω(8)\omega=\sum_{i=1}^n \mathrm{d}q_i\wedge \mathrm{d}p_i,\qquad \phi_t^{*}\omega=\omega \qquad (8)

where: ω\omega — the canonical 2-form phase space carries in place of a metric (introduced in the phase-space article); ϕt∗\phi_t^{*} — the pullback by the flow. Concretely: push the edge vectors of any little parallelogram through the flow, and the sum of its projected oriented areas onto the (qi,pi)(q_i,p_i) planes is unchanged. Here is that statement with actual matrices:

Figure
The symplectic condition in pictures: the flow map may shear or stretch a parallelogram, but never changes its area
shear: free particle, t/m = 1.5qparea 1area 1M = (1 1.5 / 0 1)stretch: near a saddleqparea 1area 1M = (2 0 / 0 0.5)both maps satisfy M^T J M = J and det M = 1 the blue unit square lands on amber area exactly 1: shear slides q, the saddle trades 2 x 0.5 = 1

Both panels are time-tt flow maps of real systems — the free particle's shear q↦q+pt/mq\mapsto q+pt/m, and the linearized saddle's stretch-and-squeeze e±λte^{\pm\lambda t} — and both leave the unit square's area at exactly 11 while mangling its shape. Finally, energy itself rides the flow trivially:

dHdt={H,H}+∂H∂t=∂H∂t(9)\frac{\mathrm{d}H}{\mathrm{d}t}=\{H,H\}+\frac{\partial H}{\partial t}=\frac{\partial H}{\partial t} \qquad (9)

where: {H,H}=0\{H,H\}=0 by antisymmetry of the bracket. For autonomous systems HH is constant on trajectories — the fluid is stratified into invariant energy shells, and everything the flow does happens within a shell.

Go deeper · Derivation B · 1 minTime evolution is a canonical transformation
Derivation BTime evolution is a canonical transformation

We are proving that the Jacobian M(t)=∂ϕt/∂z0M(t)=\partial\phi_t/\partial z_0 of the flow satisfies MTJM=JM^{\mathsf T}JM=J for all tt, which makes every instant of time evolution a canonical transformation and guarantees preservation of all Poisson brackets. The strategy is a classic: derive the linear "variational equation" that MM obeys, then show MTJMM^{\mathsf T}JM has zero time derivative and the right initial value — a conservation-law proof about a matrix. Watch-outs: the Hessian of HH enters and must be recognized as symmetric, and the argument never uses ∂H/∂t=0\partial H/\partial t=0, so the result holds for driven systems too.

Step 1. Derive the variational equation. Perturb the initial condition: δz(t)=M(t) δz0\delta z(t)=M(t)\,\delta z_0 to first order. Differentiating z˙=J∇H(z)\dot z=J\nabla H(z) with respect to z0z_0 gives

M˙=A M,A=J H,Hij=∂2H∂zi ∂zj\dot M = A\,M,\qquad A=J\,\mathbb{H},\qquad \mathbb{H}_{ij}=\frac{\partial^2 H}{\partial z_i\,\partial z_j}

where H\mathbb{H} is the Hessian of HH along the trajectory — symmetric, by equality of mixed partials again.

Step 2. Establish the key algebraic property of AA. Using JT=−JJ^{\mathsf T}=-J, HT=H\mathbb{H}^{\mathsf T}=\mathbb{H}, and JTJ=−J2=IJ^{\mathsf T}J=-J^2=I,

ATJ+JA=(JH)TJ+J(JH)=HJTJ+J2H=H−H=0A^{\mathsf T}J+JA=(J\mathbb{H})^{\mathsf T}J+J(J\mathbb{H})=\mathbb{H}J^{\mathsf T}J+J^2\mathbb{H}=\mathbb{H}-\mathbb{H}=0

Matrices with ATJ+JA=0A^{\mathsf T}J+JA=0 are called Hamiltonian or infinitesimally symplectic — the generators of symplectic maps, as antisymmetric matrices are of rotations.

Step 3. Differentiate the symplectic quantity along the flow, using the product rule and Step 1:

ddt(MTJM)=M˙TJM+MTJM˙=MT(ATJ+JA)M=0\frac{\mathrm{d}}{\mathrm{d}t}\big(M^{\mathsf T}JM\big)=\dot M^{\mathsf T}JM+M^{\mathsf T}J\dot M=M^{\mathsf T}\big(A^{\mathsf T}J+JA\big)M=0

Why this is the same trick as energy conservation: a function of the evolving object whose derivative vanishes identically by structure, not by accident — MTJMM^{\mathsf T}JM is a conserved quantity of the variational dynamics.

Step 4. Fix the constant. At t=0t=0 the flow map is the identity, M(0)=IM(0)=I, so MT(0)JM(0)=JM^{\mathsf T}(0)JM(0)=J; a quantity with zero derivative and initial value JJ equals JJ forever: MT(t)JM(t)=JM^{\mathsf T}(t)JM(t)=J for all tt.

Step 5. Harvest. Preservation of JJ under congruence is precisely preservation of the fundamental brackets {qi,pj}=δij\{q_i,p_j\}=\delta_{ij} — so ϕt\phi_t is canonical. Determinants give (det⁡M)2det⁡J=det⁡J(\det M)^2\det J=\det J, hence det⁡M=±1\det M=\pm1, and continuity from det⁡M(0)=+1\det M(0)=+1 selects +1+1: Liouville again, now as a footnote to a stronger theorem. Nothing here used time-independence of HH, so driven Hamiltonian systems have canonical flow maps too. The two canonical 2×2 examples confirm the result directly: the free-particle shear M=(1t/m01)M=\begin{pmatrix}1&t/m\\0&1\end{pmatrix} and the saddle stretch-and-squeeze M=diag(eλt,e−λt)M=\mathrm{diag}(e^{\lambda t},e^{-\lambda t}) both satisfy MTJM=JM^{\mathsf T}JM=J by direct multiplication.

Volume conservation coexists with violent deformation, and the deformation has a rate you can calculate — the subject of the third derivation, and what the filament figure and the second worked example are quantitatively about.

Go deeper · Derivation C · 2 minHow fast a blob shears into a filament
Derivation CHow fast a blob shears into a filament

We are deriving the filamentation clock: how quickly a blob of initial conditions spread over a range of oscillation amplitudes smears out along its tori. The strategy is action-angle-flavored reasoning without the full machinery — on each invariant curve the motion is periodic with an energy-dependent frequency ω(E)\omega(E), equivalently ω(J)\omega(J) with J=∮p dq/2πJ=\oint p\,\mathrm{d}q/2\pi the enclosed action, so neighboring curves accumulate phase difference linearly in time. The watch-out: this linear shear is the signature of regular motion; near a hyperbolic point or in a chaotic layer the stretching is exponential, with a Lyapunov rate replacing dω/dJ\mathrm{d}\omega/\mathrm{d}J, and the two must not be conflated.

Step 1. Set up two neighboring tori: let the blob straddle invariant curves with actions between JJ and J+ΔJJ+\Delta J, with angle variable θ\theta running 0→2π0\to2\pi once per orbit. On each curve the flow is simply θ˙=ω(J)\dot\theta=\omega(J), constant on the curve but different from curve to curve.

Step 2. Compute the relative phase drift between the extreme curves:

Δθ(t)=[ω(J+ΔJ)−ω(J)] t  ≈  dωdJ ΔJ  t\Delta\theta(t)=\big[\omega(J+\Delta J)-\omega(J)\big]\,t\;\approx\;\frac{\mathrm{d}\omega}{\mathrm{d}J}\,\Delta J\;t

growing linearly. The blob has smeared through one radian at t1=(dωdJΔJ)−1t_1=\left(\frac{\mathrm{d}\omega}{\mathrm{d}J}\Delta J\right)^{-1} and wraps into an unbroken ring filament at t2π=2πt1t_{2\pi}=2\pi t_1. Why anharmonicity is the whole effect: for the harmonic oscillator ω\omega is the same on every curve, dω/dJ=0\mathrm{d}\omega/\mathrm{d}J=0, and t1=∞t_1=\infty — the blob rotates rigidly forever, exactly as the figure's left panel shows.

Step 3. Express the clock in measurable terms. Since (dω/dJ)ΔJ=Δω(\mathrm{d}\omega/\mathrm{d}J)\Delta J=\Delta\omega, the frequency spread across the blob, t1=1/Δωt_1=1/\Delta\omega. For a pendulum at moderate amplitude, ω(θ0)≈ω0 ⁣(1−θ02/16)\omega(\theta_0)\approx\omega_0\!\left(1-\theta_0^2/16\right), so a blob spanning amplitudes [θa,θb][\theta_a,\theta_b] has Δω=ω0(θb2−θa2)/16\Delta\omega=\omega_0(\theta_b^2-\theta_a^2)/16 — real numbers go in below.

Step 4. Contrast with the hyperbolic case. Linearizing at a saddle gives δz˙=JH δz\dot{\delta z}=J\mathbb{H}\,\delta z with real eigenvalues ±λ\pm\lambda: a blob stretches as eλte^{\lambda t} along the unstable direction while compressing as e−λte^{-\lambda t} along the stable one. Separation grows exponentially, not linearly — the mechanism near-separatrix motion and chaotic layers exploit, and why "how fast do blobs deform" has two profoundly different answers in the same portrait. As a check: the formula gives dω/dJ=0\mathrm{d}\omega/\mathrm{d}J=0 for the harmonic oscillator, recovering rigid rotation with no filamentation. For the pendulum, a blob spanning amplitudes 1.38 to 1.82 rad wraps visibly by t=18t=18, consistent with the RK4 filament shown in the figure.

Limiting cases

caseresultmeaning
harmonic oscillatorrigid rotation at ω\omega in scaled coordinatesellipses H=constH=\mathrm{const} are streamlines; dω/dJ=0\mathrm{d}\omega/\mathrm{d}J=0: no filamentation ever
free particleq↦q+pt/mq\mapsto q+pt/m, p↦pp\mapsto ppure shear: rectangle to parallelogram of identical area — maximal deformation, zero compression
near a centereigenvalues ±iω\pm i\omeganested local ellipses, area preserved; the generic stable neighborhood
near a saddleeigenvalues ±λ\pm\lambda realstretch eλte^{\lambda t} matched by squeeze e−λte^{-\lambda t}: volume kept while blobs elongate exponentially
n=1n=1 autonomousHH = stream functiontrajectories read off the contour map with no integration at all
time-dependent HH∇⋅XH=0\nabla\cdot X_H=0 and MTJM=JM^{\mathsf T}JM=J still holdvolume and brackets survive driving; energy conservation does not
quantum correspondence{f,H}→1iℏ[f^,H^]\{f,H\}\to\frac{1}{i\hbar}[\hat f,\hat H]the flow becomes Heisenberg evolution; incompressibility becomes unitarity

Worked examples

1 · The quarter-period flow map of an oscillator (confidence builder)

A block of mass m=0.5 kgm=0.5\ \mathrm{kg} oscillates on a spring with ω=2.0 rad/s\omega=2.0\ \mathrm{rad/s}. Write down the flow map ϕt\phi_t explicitly, evaluate its Jacobian at t=T/4t=T/4, and verify symplecticity and area preservation on a concrete blob: a rectangle of initial conditions with Δq=0.10 m\Delta q=0.10\ \mathrm{m}, Δp=0.20 kg m/s\Delta p=0.20\ \mathrm{kg\,m/s}.

Step 1. Solve the flow. Hamilton's equations q˙=p/m\dot q=p/m, p˙=−mω2q\dot p=-m\omega^2q are linear, so the flow map is the matrix exponential z(t)=etJHz0z(t)=e^{tJ\mathbb{H}}z_0: q(t)=q0cos⁡ωt+p0mωsin⁡ωtq(t)=q_0\cos\omega t+\dfrac{p_0}{m\omega}\sin\omega t, p(t)=−mω q0sin⁡ωt+p0cos⁡ωtp(t)=-m\omega\,q_0\sin\omega t+p_0\cos\omega t, with Jacobian M(t)=(cos⁡ωt1mωsin⁡ωt−mωsin⁡ωtcos⁡ωt)M(t)=\begin{pmatrix}\cos\omega t & \frac{1}{m\omega}\sin\omega t\\ -m\omega\sin\omega t & \cos\omega t\end{pmatrix}.

Step 2. Numbers at a quarter period. T=2π/ω=3.14 sT=2\pi/\omega=3.14\ \mathrm{s}, so T/4=0.785 sT/4=0.785\ \mathrm{s} and ωt=π/2\omega t=\pi/2: cosines vanish, sines are 1. With mω=(0.5)(2.0)=1.0 kg/sm\omega=(0.5)(2.0)=1.0\ \mathrm{kg/s},

M(T/4)=(01.0−1.00)M(T/4)=\begin{pmatrix}0 & 1.0\\ -1.0 & 0\end{pmatrix}

in SI units — numerically the symplectic unit JJ itself. The quarter-period map is a 90° rotation of phase space (a literal rotation in the scaled coordinates Q=mω qQ=\sqrt{m\omega}\,q, P=p/mωP=p/\sqrt{m\omega}): position and momentum trade places, the phase-space face of the fact that a quarter period converts maximal displacement into maximal momentum.

Step 3. Check symplecticity by direct multiplication: MTJM=JTJJ=(−J)(J)(J)=−J3=JM^{\mathsf T}JM=J^{\mathsf T}JJ=(-J)(J)(J)=-J^3=J since J2=−IJ^2=-I. Condition (7) holds exactly, and det⁡M=(0)(0)−(1.0)(−1.0)=1\det M=(0)(0)-(1.0)(-1.0)=\boxed{1} — exactly, not approximately.

Step 4. Push the blob through. Corners (q,p)=(0.30,0)(q,p)=(0.30,0), (0.40,0)(0.40,0), (0.40,0.20)(0.40,0.20), (0.30,0.20)(0.30,0.20), area 0.10×0.20=0.020 J s0.10\times0.20=0.020\ \mathrm{J\,s}. The map sends (q,p)↦(1.0 p, −1.0 q)(q,p)\mapsto(1.0\,p,\,-1.0\,q), so the corners land at (0,−0.30)(0,-0.30), (0,−0.40)(0,-0.40), (0.20,−0.40)(0.20,-0.40), (0.20,−0.30)(0.20,-0.30): a rectangle with Δq′=0.20 m\Delta q'=0.20\ \mathrm{m}, Δp′=0.10 kg m/s\Delta p'=0.10\ \mathrm{kg\,m/s}, area 0.020 J s\boxed{0.020\ \mathrm{J\,s}}. The blob rotated and traded aspect ratio; the area survived to the last digit.

2 · Filamentation time of a pendulum ensemble (exam level)

A demonstration pendulum of length L=1.00 mL=1.00\ \mathrm{m} (g=9.80 m/s2g=9.80\ \mathrm{m/s^2}) is released repeatedly with imperfect reproducibility: the release amplitudes spread over θ0=0.50\theta_0=0.50 to 0.60 rad0.60\ \mathrm{rad}. Treat the runs as a blob of initial conditions. How long until the blob smears through one radian of relative phase — and how many oscillations until it has wrapped into a full ring filament? Use ω(θ0)≈ω0(1−θ02/16)\omega(\theta_0)\approx\omega_0(1-\theta_0^2/16).

Step 1. Base frequency and period: ω0=g/L=9.80/1.00=3.13 rad/s\omega_0=\sqrt{g/L}=\sqrt{9.80/1.00}=3.13\ \mathrm{rad/s}, T0=2π/ω0=2.01 sT_0=2\pi/\omega_0=2.01\ \mathrm{s}.

Step 2. Frequency spread across the blob: ω(0.50)=ω0(1−0.25/16)=0.9844 ω0\omega(0.50)=\omega_0(1-0.25/16)=0.9844\,\omega_0 and ω(0.60)=ω0(1−0.36/16)=0.9775 ω0\omega(0.60)=\omega_0(1-0.36/16)=0.9775\,\omega_0, so Δω=ω0 0.36−0.2516=3.13×6.88×10−3=0.0215 rad/s\Delta\omega=\omega_0\,\dfrac{0.36-0.25}{16}=3.13\times6.88\times10^{-3}=0.0215\ \mathrm{rad/s}. This is (dω/dJ)ΔJ(\mathrm{d}\omega/\mathrm{d}J)\Delta J of Derivation C, evaluated through the directly measurable amplitude spread.

Step 3. One-radian shear time: t1=1/Δω=1/0.0215=46.5 st_1=1/\Delta\omega=1/0.0215=\boxed{46.5\ \mathrm{s}} — about 46.5/2.01≈2346.5/2.01\approx23 oscillations. For the first twenty-odd swings the ensemble looks like a coherent blob riding its torus; by a minute in, it is visibly a smear.

Step 4. Full wrap into a ring at relative phase 2π2\pi: t2π=2π/Δω=292 st_{2\pi}=2\pi/\Delta\omega=\boxed{292\ \mathrm{s}} — about 145145 oscillations, five minutes of swinging. After that the ensemble covers its annulus of tori nearly uniformly: runs completely decorrelated in phase, every one still conserving its own energy, total phase-space area exactly what it was at release.

Step 5. The same physics at 11,000 revolutions per second. An injected synchrotron bunch that misses the matched orbit is precisely such a blob, and machine nonlinearity gives a tune spread ΔQ\Delta Q per turn. With a typical ΔQ≈10−3\Delta Q\approx10^{-3}, the bunch filaments completely in N≈1/ΔQ≈1000 turnsN\approx1/\Delta Q\approx\boxed{1000\ \mathrm{turns}} — at the LHC's 11 kHz11\ \mathrm{kHz} revolution frequency, about 90 ms90\ \mathrm{ms} after injection. The smeared bunch has larger effective emittance even though Liouville guarantees the microscopic area never grew: filamentation, not compression, is how Hamiltonian beams "blow up."

Origins · 1 minWilliam Rowan Hamilton and how this was discovered
WR
William Rowan Hamilton
1805–1865 · Dublin; Trinity College and Dunsink Observatory

Hamilton was appointed Royal Astronomer of Ireland in 1827 — while still an undergraduate at Trinity College Dublin — and spent his working life at Dunsink Observatory. His great insight came from optics: light rays and particle trajectories can both be generated from a single "characteristic function," a scalar whose derivatives encode entire families of paths. Transplanted to mechanics in his 1834–35 essays, the idea became the canonical equations and, with them, the picture this article lives in: dynamics as a flow generated by one function on phase space. His optical-mechanical analogy lay half-dormant for ninety years until Schrödinger used it, almost line by line, to pass from classical to wave mechanics. Hamilton's later obsession, quaternions — scratched into Broom Bridge in 1843 — gave physics much of its vector language.

History
1834
— Hamilton's "On a General Method in Dynamics" recasts mechanics as first-order equations generated by one characteristic function.
1838
— Liouville proves the volume-conservation theorem for the phase flow, decades before its statistical-mechanics role emerges.
1899
— Poincaré's "Les méthodes nouvelles de la mécanique céleste" studies the flow globally: integral invariants, recurrence, and the first glimpse of chaos.
1902
— Gibbs founds ensemble theory on the incompressible phase fluid: stationary densities must be functions of the conserved HH.
1985
— Gromov's non-squeezing theorem shows symplectic maps obey rigidity far beyond volume preservation — the "symplectic camel."
1991
— Wisdom and Holman's symplectic maps make billion-year solar-system integrations feasible, turning flow geometry into a numerical technology.

Going further

References. Goldstein, Poole & Safko, Classical Mechanics, 3rd ed., §9.4 and §9.9 (the symplectic approach to canonical transformations; Liouville's theorem) · Landau & Lifshitz, Mechanics, 3rd ed., §46 (Liouville's theorem) · Arnold, Mathematical Methods of Classical Mechanics, 2nd ed., Ch. 8–9 (symplectic manifolds, Hamiltonian flows) · Taylor, Classical Mechanics, Ch. 13 (Hamiltonian mechanics; §13.7 Liouville's theorem) · Hairer, Lubich & Wanner, Geometric Numerical Integration (symplectic integrators, shadow Hamiltonians) Three key identities underpin the article: (1) ∇⋅XH=∂qi∂piH−∂pi∂qiH=0\nabla\cdot X_H=\partial_{q_i}\partial_{p_i}H-\partial_{p_i}\partial_{q_i}H=0; (2) A=JHA=J\mathbb{H} satisfies ATJ+JA=0A^{\mathsf T}J+JA=0 using J2=−IJ^2=-I, JT=−JJ^{\mathsf T}=-J, HT=H\mathbb{H}^{\mathsf T}=\mathbb{H}, hence ddt(MTJM)=0\frac{d}{dt}(M^{\mathsf T}JM)=0; (3) {H,H}=0\{H,H\}=0, giving energy conservation for autonomous HH. The only numerical constant beyond standard textbook structure is the harmonic period 2π/ω2\pi/\omega.

Builds on: Hamilton's Canonical Equations · Phase Space · The Hamiltonian Function · Phase Portraits and Trajectories Leads to: Liouville's Theorem · The Harmonic Oscillator in Phase Space · The Pendulum Phase Portrait and Separatrix · Fixed Points and Stability in Phase Space

Is the Hamiltonian literally a stream function, or is that just an analogy?

For one degree of freedom it is literal: a 2D incompressible flow with stream function ψ\psi has velocity (∂ψ/∂y,−∂ψ/∂x)(\partial\psi/\partial y,-\partial\psi/\partial x), and XH=(∂H/∂p,−∂H/∂q)X_H=(\partial H/\partial p,-\partial H/\partial q) has identical structure under ψ→H\psi\to H, (x,y)→(q,p)(x,y)\to(q,p) — same streamlines-as-level-curves, same speed-from-crowding rule. For n≥2n\geq2 the analogy weakens: the flow is still divergence-free, but no single scalar encodes a 2n2n-dimensional field; the correct generalization is exactly the symplectic statement XH=J∇HX_H=J\nabla H. So: theorem in the phase plane, guiding picture above it.

Symplectic and volume-preserving — is there actually daylight between the two?

Yes, and it is a deep result that there is. For n=1n=1 they coincide (the symplectic form is the area form). For n≥2n\geq2 symplectic maps are a strict subset: MTJM=JM^{\mathsf T}JM=J forces det⁡M=1\det M=1 but not conversely — stretching q1q_1 by 4 while shrinking q2q_2 by 4 preserves volume yet wrecks the brackets. Gromov's non-squeezing theorem (1985) quantifies the gap: no symplectic map can squeeze a ball of radius RR through a hole of radius r<Rr<R in a single (qi,pi)(q_i,p_i) plane, though volume-preserving maps do it easily. Time evolution respects this finer rigidity — "canonical" is a stronger compliment than "volume-preserving."

If the flow conserves phase-space volume exactly, where does entropy growth come from?

From coarse-graining, and filamentation is what makes coarse-graining bite. The fine-grained volume and Gibbs entropy are rigorously constant — Liouville forbids anything else. But the blob shears into filaments whose width falls below any fixed observational resolution; measured at that resolution, the ensemble appears to fill the whole smeared annulus, and the coarse-grained entropy grows. Nothing irreversible happened microscopically — run the film backward and the filament reassembles — but at macroscopic resolution the spreading is effectively one-way. This is the classical ancestor of decoherence arguments in quantum statistical mechanics.

Does the flow map stay canonical when the Hamiltonian depends explicitly on time?

Yes. Inspect the proof: the variational equation M˙=JH(t) M\dot M=J\mathbb{H}(t)\,M works with a time-dependent Hessian, and the cancellation ATJ+JA=0A^{\mathsf T}J+JA=0 needs only the symmetry of H\mathbb{H} at each instant — nowhere does ∂H/∂t=0\partial H/\partial t=0 enter. A driven pendulum, a charge in an RF cavity, a molecule in a laser pulse: all have canonical flow maps and conserve phase volume instantaneously. What breaks is the group law ϕt∘ϕs=ϕt+s\phi_t\circ\phi_s=\phi_{t+s} (the map now depends on the starting instant, not just the duration) and energy conservation, since dH/dt=∂H/∂t≠0\mathrm{d}H/\mathrm{d}t=\partial H/\partial t\neq0.

Why do symplectic integrators have bounded energy error instead of just smaller energy error?

Backward error analysis: a symplectic scheme of order kk with step Δt\Delta t is, up to exponentially small corrections, the exact flow of a modified "shadow Hamiltonian" H~=H+ΔtkHk+…\tilde H=H+\Delta t^kH_k+\dots. The numerical trajectory exactly conserves H~\tilde H, and since H~−H=O(Δtk)\tilde H-H=O(\Delta t^k), the true-energy error can only oscillate within an O(Δtk)O(\Delta t^k) band — it has no mechanism to drift secularly. A non-symplectic scheme has no shadow Hamiltonian; its energy error accumulates and a simulated planet slowly spirals. Respecting MTJM=JM^{\mathsf T}JM=J buys a conservation law for free.

Is the flow map really an exponential, like the formula phi t equals exp of t L suggests?

For linear systems, literally: z˙=Az\dot z=Az with constant A=JHA=J\mathbb{H} has ϕt=etA\phi_t=e^{tA} — the worked example's rotation matrix is etJHe^{tJ\mathbb{H}} at ωt=π/2\omega t=\pi/2. For nonlinear systems the operator exponential et{⋅,H}e^{t\{\cdot,H\}} is shorthand for the Lie series f+t{f,H}+t22{{f,H},H}+…f+t\{f,H\}+\frac{t^2}{2}\{\{f,H\},H\}+\dots, convergent for analytic data at small times, and the standard tool for building symplectic integrators: split H=T+VH=T+V, exponentiate each piece exactly, interleave — that is leapfrog. What survives all subtleties is the group property: flowing for tt then ss equals flowing for t+st+s, whenever HH is autonomous.

Filamentation and chaos both spread blobs out — what distinguishes them?

The clock. Filamentation in a regular region is linear: relative phase grows as (dω/dJ)ΔJ t(\mathrm{d}\omega/\mathrm{d}J)\Delta J\,t, so halving the blob's spread doubles the smearing time — forgiving. Chaotic stretching is exponential: δz∼eλt\delta z\sim e^{\lambda t} with a Lyapunov exponent set by the dynamics, so shrinking the blob buys only logarithmic delay. A pendulum blob deep in the libration region filaments over dozens of periods; the same blob straddling the separatrix — chaotic under any perturbation — disperses in a few. Both conserve volume exactly; they differ in how violently they fold it.

Why can't a Hamiltonian flow have an attractor — and what does that say about damped systems?

An attractor requires nearby volumes to shrink onto it, ∇⋅X<0\nabla\cdot X<0 somewhere, which equation (4) forbids identically. Sharper: the linearization JHJ\mathbb{H} at any fixed point is infinitesimally symplectic, so its eigenvalues come in ±\pm pairs (±λ\pm\lambda or ±iω\pm i\omega) — a stable-in-all-directions sink is algebraically impossible; only centers and saddles exist. A damped oscillator does spiral into a sink, which is visible proof that friction is not Hamiltonian in (q,p)(q,p): volume contracts and Liouville's bookkeeping is off. The contraction just signals energy leaving to unresolved microscopic degrees of freedom, where Liouville still reigns.

Before this

Where this leads