Canonical transformations deepened — flows are transformations, and transformations are flows

A Hamiltonian flow is itself a canonical transformation, and a canonical transformation is the short flow generated by some function — the symplectic form ties the two ideas into one.

Opening

In Volume I, Chapter 11, we introduced canonical transformations (CTs) through the four generating functions F1,F2,F3,F4F_1, F_2, F_3, F_4. This chapter dresses the same object in geometric clothing. The claim takes two lines. First, every Hamiltonian flow is a CT. Second, every infinitesimal CT is the short Hamiltonian flow of some function G(q,p)G(q,p). By the end of the chapter the reader should be able to paraphrase the slogan “the generators of Sp(2n)Sp(2n) are Hamiltonians” in their own words.

Main 1 — Recap and pivot

In Volume I a CT was a change of coordinates (q,p)(Q,P)(q,p) \to (Q,P) that left the equations in Hamiltonian form. We now redefine the same object as a map that preserves the symplectic form ω=dqidpi\omega = dq^i \wedge dp_i. The 2-form ω\omega is the antisymmetric object that, at each point of phase space, assigns a signed area to a pair of tangent vectors — intuitively, the generalization of “the area of a tiny parallelogram in the (q,p)(q,p) plane.”

A map is canonical iff either of the following equivalent conditions holds.

(a) Its Jacobian M=(Q,P)/(q,p)M = \partial(Q,P)/\partial(q,p) is symplectic:

MTJM=J,J=(0InIn0)M^T J M = J, \qquad J = \begin{pmatrix} 0 & I_n \\ -I_n & 0 \end{pmatrix}

(b) The Poisson brackets, evaluated in the old variables, retain the canonical form:

{Qi,Qj}q,p=0,{Pi,Pj}q,p=0,{Qi,Pj}q,p=δij\{Q_i, Q_j\}_{q,p} = 0, \quad \{P_i, P_j\}_{q,p} = 0, \quad \{Q_i, P_j\}_{q,p} = \delta_{ij}

These are matrix and differential statements of the same fact. We now apply that yardstick to flows.

Main 2 — The flow is itself a CT

For a Hamiltonian HH, the Hamiltonian vector field XHX_H is defined by the one-line condition ιXHω=dH\iota_{X_H} \omega = -dH, where ι\iota is the interior product — the operation that contracts a 2-form against a single vector to produce a 1-form. Its flow ϕHt\phi^t_H carries the point (q,p)(q,p) to (Q(t),P(t))(Q(t), P(t)).

Claim: ϕHt\phi^t_H is canonical for every tt.

The proof is a one-line application of the Cartan formula for the Lie derivative — the derivative that measures how a tensor changes when transported along a vector field:

LXHω=d(ιXHω)+ιXH(dω)=d(dH)+0=0\mathcal{L}_{X_H} \omega = d(\iota_{X_H}\omega) + \iota_{X_H}(d\omega) = d(-dH) + 0 = 0

The first term vanishes because d2=0d^2 = 0; the second vanishes because ω\omega is closed, dω=0d\omega = 0. Thus ω\omega is conserved along the flow. A flow that preserves ω\omega automatically has a symplectic Jacobian, and by condition (a) of Main 1 the flow is canonical. The time evolution of a pendulum or the full integration of a Kepler orbit is, all by itself, a one-parameter family of canonical transformations on phase space.

Main 3 — Infinitesimal CTs and Sp(2n)Sp(2n)

Now run the implication the other way. Pick any smooth function G(q,p)G(q,p) on phase space. For a small parameter ε\varepsilon (epsilon), define

δqi=ε{qi,G}=εGpi,δpi=ε{pi,G}=εGqi\delta q^i = \varepsilon \{q^i, G\} = \varepsilon\, \frac{\partial G}{\partial p_i}, \qquad \delta p_i = \varepsilon \{p_i, G\} = -\varepsilon\, \frac{\partial G}{\partial q^i}

To order O(ε2)O(\varepsilon^2) this map satisfies the symplectic condition. We say GG is the generator of an infinitesimal CT. The familiar story — linear momentum generates translations, angular momentum generates rotations — extends in this language to every smooth function on phase space.

The collection of all 2n×2n2n \times 2n real matrices satisfying the symplectic condition forms a group, the symplectic group Sp(2n,R)Sp(2n, \mathbb{R}). Its Lie algebra coincides exactly with the quadratic functions G(q,p)=12zTSzG(q,p) = \tfrac{1}{2} z^T S z on phase space (with SS symmetric and z=(q,p)z = (q,p)), closed under the Poisson bracket.

Here is the cleanest example. Take G=(q2+p2)/2G = (q^2 + p^2)/2. The induced infinitesimal CT is

δq=εp,δp=εq\delta q = \varepsilon\, p, \qquad \delta p = -\varepsilon\, q

— a rotation by angle ε\varepsilon in the (q,p)(q,p) plane. But this GG is exactly the unit-frequency harmonic oscillator Hamiltonian HHOH_{\text{HO}}. So the familiar picture “the harmonic oscillator’s time evolution rotates phase space” is not a coincidence: it is the simplest instance of the equivalence of flows and CTs. The action–angle variables of the next chapter are the same picture, generalized to many dimensions.

In Python

We verify directly that the simple-pendulum flow preserves phase-space area. We sample the boundary of a small rectangle with 200 points, push them along the flow, and print the polygon area every second.

import numpy as np

# H = p^2/2 - cos q (simple pendulum), Hamilton's equations
def f(state):
    q, p = state[..., 0], state[..., 1]
    return np.stack([p, -np.sin(q)], axis=-1)

# 200 points on the boundary of a small rectangle (50 per side)
def rect_boundary(q0, q1, p0, p1, n_per_side=50):
    s = np.linspace(0, 1, n_per_side, endpoint=False)
    side1 = np.stack([q0 + (q1-q0)*s, np.full_like(s, p0)], axis=-1)
    side2 = np.stack([np.full_like(s, q1), p0 + (p1-p0)*s], axis=-1)
    side3 = np.stack([q1 + (q0-q1)*s, np.full_like(s, p1)], axis=-1)
    side4 = np.stack([np.full_like(s, q0), p1 + (p0-p1)*s], axis=-1)
    return np.concatenate([side1, side2, side3, side4], axis=0)

def shoelace(pts):
    x, y = pts[:, 0], pts[:, 1]
    return 0.5 * np.abs(np.dot(x, np.roll(y, -1)) - np.dot(y, np.roll(x, -1)))

pts = rect_boundary(0.5, 0.7, 0.0, 0.3)
dt, n_steps = 0.01, 500
print(f"t=0.0  area = {shoelace(pts):.6f}")
for step in range(1, n_steps + 1):
    k1 = f(pts)
    k2 = f(pts + 0.5*dt*k1)
    k3 = f(pts + 0.5*dt*k2)
    k4 = f(pts + dt*k3)
    pts = pts + (dt/6.0) * (k1 + 2*k2 + 2*k3 + k4)
    if step % 100 == 0:
        print(f"t={step*dt:.1f}  area = {shoelace(pts):.6f}")

The rectangle stretches and curls as time advances, but the printed area sits near 0.060.06 at every sampled instant, with differences confined to roughly 10410^{-4}. The claim of Main 2 — that the flow is a canonical transformation — is visible in the numbers.

To the next chapter

Chapter 3: Integrable systems and action–angle variables pushes this viewpoint one step further. When a system carries nn mutually Poisson-commuting conserved quantities, the canonical transformation built from their joint flow slices phase space into tori, on which the dynamics is simple rotation. Just as the harmonic oscillator’s flow is rotation on a circle, an integrable system’s flow is rotation on an nn-dimensional torus.