A topic in the Open Knowledge Graph — a free, open map of 15,495 topics and the order to learn them in.
A canonical transformation is a change of phase-space variables (q, p) → (Q, P) that keeps Hamilton's equations in the same form, with some new Hamiltonian K(Q, P, t). Such transformations can be built from a generating function, such as F₂(q, P, t), whose partial derivatives give the old momenta and the new coordinates. A good choice can turn a hard problem into one where the new coordinates are cyclic and the motion is trivial. A one-variable transformation is canonical exactly when the Poisson bracket {Q, P} equals 1.
Begin with simple examples: the identity, the exchange Q = p, P = −q, and a point transformation of coordinates. Check each with the Poisson bracket test. Then work through the harmonic oscillator transformation that makes the Hamiltonian depend only on P. Emphasize that time evolution itself is a canonical transformation; this is the link to Liouville's theorem.
In Lagrangian mechanics you may choose any generalized coordinates you like. Hamiltonian mechanics allows a wider freedom: you may mix coordinates and momenta, provided the new variables still obey Hamilton's equations. Such a change (q, p) → (Q, P) is called canonical. The new Hamiltonian K(Q, P, t) then satisfies dQ/dt = ∂K/∂P and dP/dt = −∂K/∂Q.
A quick test uses Poisson brackets. For one degree of freedom the transformation is canonical when {Q, P} = 1, computed with respect to q and p. More generally, all the fundamental brackets {Qᵢ, Pⱼ} = δᵢⱼ and {Qᵢ, Qⱼ} = {Pᵢ, Pⱼ} = 0 must hold. The exchange Q = p, P = −q passes this test. Doubling both q and p fails it, because {2q, 2p} = 4.
Generating functions give a way to build canonical transformations. One common type is F₂(q, P, t). It defines the transformation through
p = ∂F₂/∂q, Q = ∂F₂/∂P, K = H + ∂F₂/∂t.
The choice F₂ = qP gives the identity. Other types, such as F₁(q, Q, t) with p = ∂F₁/∂q and P = −∂F₁/∂Q, are related to F₂ by Legendre transforms.
The payoff is that a clever transformation can make every new coordinate cyclic. The harmonic oscillator shows this. With q = √(2P/mω) sin Q and p = √(2mωP) cos Q, the Hamiltonian H = p²/2m + mω²q²/2 becomes K = ωP. Since K does not contain Q, P is constant and equals E/ω. Since ∂K/∂P = ω, the new coordinate grows steadily, Q = ωt + φ. Substituting back gives q(t) = √(2E/mω²) sin(ωt + φ). The new variables P and Q are, up to a factor, the action and angle variables of Hamilton-Jacobi theory.
Canonical transformations also clarify the structure of mechanics. An infinitesimal transformation generated by a function G shifts q by ε ∂G/∂p and p by −ε ∂G/∂q. Momentum generates translations, angular momentum generates rotations, and the Hamiltonian generates time evolution. Because time evolution is canonical, it preserves phase-space volume, which is Liouville's theorem. The same pattern carries into quantum mechanics, where unitary operators replace canonical transformations and commutators replace Poisson brackets.