Definition of Canonical Transformations
Hamilton's equations treat coordinates and momenta with an almost perfect symmetry — pushes , pushes , one minus sign between them. That symmetry hides an offer no Lagrangian ever makes: you may remix positions and momenta into entirely new pairs , scrambling the very identity of "where the particle is" and "how hard it moves", and the dynamics can survive intact. The maps that keep this promise — that preserve the form of Hamilton's equations for some new Hamiltonian — are the canonical transformations, and they are the single most consequential definition in advanced mechanics. Why chase them? Because the hard part of mechanics is never writing the equations — it is solving them, and difficulty lives in the choice of variables. You have already seen that one cyclic coordinate hands you one conserved momentum for free. The canonical-transformation program turns that observation into a strategy: hunt for new phase-space variables in which every coordinate is cyclic, so every new momentum is a constant and the motion is solved by pure algebra. Hamilton–Jacobi theory and action-angle variables are exactly this hunt, carried to completion. This article fixes the definition precisely: what "preserving the canonical form" demands, where the new Hamiltonian comes from, why a total derivative — the future generating function — is the entire freedom available, and which familiar maps (point transformations, the coordinate–momentum exchange) sit inside the canonical family. The machinery for building such transformations, and the sharp tests for recognizing them, each get their own article.
- A transformation , possibly time-dependent, is canonical when Hamilton's equations keep their form in the new variables: , for some new Hamiltonian — whatever the original was.
- The defining requirement compresses into one line: the integrands and may differ only by an exact differential — the germ of the generating-function machinery.
- The new Hamiltonian is : time-independent transformations merely re-express ; time-dependent ones genuinely change it.
- Canonical transformations are far larger than coordinate changes: the exchange , is canonical, while innocent-looking maps like , are not.
- Point transformations — all of Lagrangian mechanics' freedom — form a small subgroup, once momenta are transformed by the induced rule.
- Key idea: A transformation is canonical precisely when it preserves the symplectic structure — equivalently when and differ by an exact differential . All three tests (generating function, symplectic Jacobian, fundamental Poisson brackets) express this single geometric fact.
Where this lives today
The definition of a canonical transformation quietly runs the world's large scientific instruments. A storage ring like the LHC is, to a dynamicist, a composition of millions of canonical maps: each magnet's action on a particle's is a transformation that must preserve the canonical form, and lattice designers verify their one-turn maps to machine precision — a design code that violated canonicity would fake damping or heating that no magnet provides, and beams would be predicted stable that are not. The same discipline governs the long-time solar-system integrations behind ephemerides: symplectic integrators advance the state by a genuinely canonical map each timestep, which is why they hold energy errors bounded over billions of orbits while naive Runge–Kutta schemes spiral secularly away. The transformation view also survived quantization better than the trajectories did. Dirac's observation that canonical transformations are the classical shadow of unitary transformations made the definition in this article the template for changing representations in quantum mechanics, and modern machine-learned dynamics returns the compliment: neural-network flows constrained to be canonical (symplectic networks) learn mechanical systems from data without inventing spurious dissipation — the twenty-first century rediscovering that the form of Hamilton's equations is worth protecting.
The physical picture
In Lagrangian mechanics a change of variables can only relabel the configuration space: new coordinates are functions of old coordinates, and the velocities tag along by the chain rule. Phase space is roomier. Since Hamilton's equations put and on nearly equal footing, nothing in the formalism anchors "coordinate" to something you measure with a ruler. The exchange map , — a quarter-turn of the phase plane — produces variables in which the momentum level-lines have become coordinate level-lines, and yet the equations of motion keep exactly their canonical shape:
If names can be scrambled this freely, choose names that make the problem trivial. The dream scenario — the one that motivates this whole chapter — is a transformation after which the new Hamiltonian depends on the new momenta alone, . Then every is cyclic, every is a constant of the motion, and each advances at a constant rate: the tangled flow in the old chart becomes straight, uniform drift in the new one. You met the one-coordinate version of this luxury in Cyclic Coordinates and Conserved Momenta; canonical transformations exist to manufacture it wholesale:
Two warnings temper the freedom. First, most invertible maps of phase space are not canonical — the property is structural and rather rigid, which is exactly why it is worth defining. Second, phase space carries an area-counting structure: for each conjugate pair the oriented area is dynamically meaningful (its conservation under the flow is Liouville's Theorem), and canonical transformations are precisely the maps that respect it. That geometric characterization, made quantitative, becomes the Symplectic Condition; its algebraic shadow is the preservation of the fundamental brackets in Poisson Brackets: Definition. Here we build the definition from the variational side, where the new Hamiltonian and the generating function emerge on their own.
The defining requirement
Start from what must be preserved. In the old variables the motion obeys Hamilton's canonical equations — derived and dissected in Hamilton's Canonical Equations, quoted here as our fixed point:
where: — the old coordinate–momentum pairs; — the old Hamiltonian; the overdot — total time derivative along the motion. Everything downstream of this article is a statement about changes of variables that leave this shape intact. Now allow the most general smooth, invertible change of phase-space variables, possibly carrying explicit time dependence:
where: each new variable may depend on all the old coordinates and momenta at once — this is the freedom Lagrangian mechanics never had. A point transformation is the special case , no momentum mixing; equation (2) is the full phase-space case. The transformation is called canonical when there exists a function — the new Hamiltonian, colloquially the "Kamiltonian" — such that the motion in the new variables obeys
where: is not required to be re-expressed — only the form of the equations is protected, not the function that fills them. Two subtleties make the definition sharp. The form (3) must hold for every Hamiltonian one might put on the old chart, not merely for one lucky problem — maps that work for a single only are called canonoid and are excluded. And must be constructed from and the transformation itself by a definite rule, which the variational argument below delivers: it is here that the generating function is born. The requirement that connects (1) to (3) is variational. The canonical equations follow from the modified Hamilton's principle, the stationarity of over phase-space paths with fixed endpoints. If both charts must produce their own canonical equations, both integrands must be stationary on the same physical paths, and the complete resolution of that demand is the master condition
where: summation over is implied; — a constant scale factor; — an arbitrary differentiable function of phase-space variables and time, whose total derivative contributes only endpoint terms to the action. Transformations achieving (4) with are called extended canonical; every one of them is a trivial uniform rescaling composed with a map, so no structure is lost by fixing — the restricted convention used from here on. With and the identification of differentials, the condition takes its canonical one-form shape:
where: — an exact differential: the entire licensed difference between the two descriptions. Read equation (5) as the article's headline: a change of variables is canonical exactly when the mismatch between and its new-chart twin can be absorbed into a single function . That function, written in a mixed set of old and new variables, becomes the generating function — the machine that manufactures canonical transformations to order, classified into four standard types in Generating Functions and the Four Types. One immediate dividend of (5) is the rule for the new Hamiltonian, extracted in Derivation B below:
where: — the explicit time derivative of the generating function, taken at frozen phase-space arguments. Time-independent transformations have re-expressed in the new variables; genuinely time-dependent ones shift the Hamiltonian itself — the price, or the reward, of moving to a moving chart (Worked Example 2 cashes this in with numbers).
Which relation when
| you need | reach for | notes |
|---|---|---|
| the definition itself | form invariance, eq. (3) | "for some , for every " |
| test a candidate map from first principles | exactness in eq. (5) | is exact? |
| the new Hamiltonian | eq. (6) | iff the map is time-independent |
| build transformations to order | in mixed variables | see Generating Functions and the Four Types |
| a matrix/Jacobian test | see Symplectic Condition | |
| an algebraic test | etc. | see Poisson Brackets as a Test for Canonicity |
We are deriving the master condition (4): the precise sense in which two phase-space charts may differ while both support canonical equations of motion. The strategy is to impose the modified Hamilton's principle in each chart on the same family of varied paths and ask what relation between the integrands makes the two stationarity statements equivalent. The route is short but the logic deserves care: we are not transforming one action into another, we are demanding that two different actions select the same stationary curves. Watch the boundary term — it is the entire freedom, and it is where the generating function enters mechanics.
Step 1. In the old chart the physical motion makes the phase-space action stationary with endpoints fixed:
Independent variations of and reproduce exactly the canonical equations (1) — this is the modified Hamilton's principle, established on the Hamiltonian side of the corpus.
Step 2. If the new variables are to obey canonical equations with Hamiltonian , the same principle must hold in the new chart over the same physical curves:
Why the same curves: are functions of , so a path in one chart is a path in the other; the variational principles must agree about which paths are the physical ones, or the two dynamics would disagree.
Step 3. Two integrands are stationary on the same paths with fixed endpoints when they differ by a constant multiple and a total time derivative:
The total derivative is harmless because its integral is , a pure endpoint quantity: with endpoints held fixed, , so it drops out of every variation. Why appears: stationarity is insensitive to an overall constant rescaling of the integrand. Maps realizing — e.g. , with — merely dilate phase-space areas uniformly; each factors into a trivial scale change composed with a genuine transformation, so restricting to costs no generality. *With , multiplying through by gives condition (5); the identity transformation satisfies it with , , as it must.*
Go deeper · Derivation B · 1 minThe new Hamiltonian from the time coefficient
The goal is the rule (6), — the only formula in this article that changes the Hamiltonian itself. The strategy is coefficient matching: treat the one-form identity (5) as an equality of differentials in a chart where half the variables are old and half are new, expand , and compare the terms. We deliberately stop after the time coefficient: matching the phase-space coefficients is what generates the transformation equations themselves, and that harvest belongs to the four-types article.
Step 1. For a generic transformation the quantities can serve as independent coordinates on phase space (when they cannot, one of the other mixed pairs works, and the argument is identical). Regard and expand its differential:
Why a mixed chart: expressed in old variables alone, condition (5) would tangle back into and ; the mixed chart keeps the two families of differentials independent so their coefficients can be compared one by one.
Step 2. Substitute into (5) and collect the coefficient of , whose matching is independent of the phase-space terms:
Why only the explicit derivative: along a path contains chain-rule pieces through and , but those ride with and ; the lone coefficient is the partial derivative at frozen arguments. The matching of the and coefficients — which yields and — is carried out in Type-1 Generating Function and its siblings.
Step 3. Specialize to a time-independent transformation, . Then — but as a rule of substitution, not an identity of formulas: . The number assigned to a phase point is unchanged; the functional form generally transforms beyond recognition. For the moving-frame generator of Worked Example 2, gives , and the new-chart equations reproduce the directly-computed motion.
A first gallery of canonical maps
The definition earns its keep through examples, and three families calibrate all intuition. The identity , is canonical with , — and, less trivially, it is the seed from which Infinitesimal Canonical Transformations grows continuous families. The exchange , is canonical for every Hamiltonian (Derivation C), and it is the example to internalize: nothing in Hamiltonian mechanics privileges the ruler over the momentum gauge; only the pairing of the two is sacred, and the minus sign is the pairing's signature. And every point transformation — the full freedom of Lagrangian mechanics — embeds as a canonical map once the momenta transform by the induced linear rule
where: the momentum rule is forced by exactness: with it, collapses at fixed time to zero, so condition (5) holds with an carrying only time dependence. Rotations, translations, the passage to spherical coordinates — all of them are canonical automatically, provided the momenta are not copied across unchanged but transformed by (7). Contrast the map , : perfectly smooth, perfectly invertible on a half-plane, and not canonical — Worked Example 1 exhibits the obstruction numerically. The moral of the gallery:
One more inhabitant of the green region deserves its early mention: the Hamiltonian flow itself. Evolving every phase point forward by a fixed interval is a canonical transformation generated by — the deep reason phase-space volume is conserved (Liouville's Theorem) and the seed of the group-theoretic view developed in Symplectic Group and Phase-Space Geometry.
Go deeper · Derivation C · 1 minThe exchange transformation is canonical for every Hamiltonian
We verify head-on that , (one degree of freedom; the -dimensional case is identical pair by pair) preserves the canonical form with the natural choice of new Hamiltonian, and then confirm it a second way through the exactness condition (5). The double check is the point of the exercise: the direct route shows what canonicity demands, the exactness route shows how little needs to be verified once the one-form condition is trusted. Watch the minus sign — dropping it wrecks both computations, which is the cleanest evidence that the sign is structural.
Step 1. Define the new Hamiltonian by substitution (the map is time-independent, so Derivation B says this is the right rule): with , . Check the first canonical equation by the chain rule:
Why this works for every : no property of was used — only the chain rule and Hamilton's equations (1). Canonicity is a property of the map, uniform across all dynamics.
Step 2. Check the second canonical equation the same way:
Both equations of (3) hold with re-expressed: the exchange is canonical, and the quarter-turn of phase space is dynamically invisible.
Step 3. Re-derive via exactness. At fixed time, compute the mismatch one-form of condition (5):
Exact, with and — precisely condition (5). The same data, repackaged with as the mixed independent pair, is the generator ; that packaging, and its three Legendre-transformed siblings, is the business of Type-1 Generating Function onward. As an algebraic cross-check, (see Fundamental Poisson Brackets); and for the oscillator , the exchange sends it to — the same ellipse traversed with the same frequency, as direct substitution confirms.
Limiting cases
| Case | Result | Meaning |
|---|---|---|
| identity , | canonical; , | the group's unit element; seed of infinitesimal transformations |
| point transformation | canonical with momenta lifted by (7) | all of Lagrangian mechanics' freedom is a small subgroup |
| exchange , | canonical; , re-expressed | coordinates and momenta are interchangeable labels |
| scaling , | canonical for any | area preserved pair by pair; but , with is only extended canonical |
| time-independent map | same numbers, new functional form; energy value untouched | |
| time-dependent map | moving charts genuinely change the Hamiltonian (Worked Example 2) | |
| time evolution | canonical, generated by | Liouville's theorem in embryo; the flow is a curve through the symplectic group |
Worked examples
1 · Pass and fail at one phase point (confidence builder)
Take the oscillator with , , at the phase point , . (a) Verify numerically that the scaling , is canonical with built by substitution. (b) Show that , admits no new Hamiltonian at all.
Step 1. Old-chart rates from (1): and . Energy at the point: .
Step 2. New chart (a): , . Substitution (, ) gives . Value check: — unchanged, as a time-independent map must leave it.
Step 3. Canonical equations in the new chart: , and directly ✓. Then , and directly ✓. Both equations of (3) hold: the scaling is canonical at this point, and — since nothing pinned the numbers — everywhere.
Step 4. Candidate (b): , (take ). If a Hamiltonian existed, the canonical equations would force and . A single function must satisfy both, so its mixed partials must agree: computed from the first expression is ; computed from the second it is . Since , no exists — the map is not canonical, however smooth and invertible it is.
2 · A moving chart and its Kamiltonian (exam level)
An oscillator with , is described from a stage sliding at constant : , , generated by . Build , verify both canonical equations at , , , and compare the values of and .
Step 1. The generator's explicit time derivative is , so rule (6) gives , using and to eliminate old variables. Note is explicitly time-dependent even though was not — the moving chart injects its own clock.
Step 2. Evaluate the chart at the instant: , . First canonical equation: . Directly: ✓.
Step 3. Second canonical equation: . Directly: ✓. The new chart runs on genuine canonical equations — the transformation is canonical with the constructed .
Step 4. Compare values. , while . The two differ by exactly : the Kamiltonian is not the energy — it is the generator of time evolution in the moving chart, and its value carries no invariant meaning. The dynamics it generates, as Steps 2–3 verify, is flawless.
Origins · 1 minCarl Gustav Jacob Jacobi and how this was discovered
Jacobi took Hamilton's 1834–35 dynamical papers — which Hamilton himself prized mainly as an extension of his optics — and rebuilt them into a theory of transformations. Where Hamilton had one characteristic function, Jacobi saw an entire calculus: change the phase-space variables wholesale, keep the equations' form, and steer every problem toward coordinates in which it becomes trivial. His Königsberg lectures of 1842–43, published posthumously as the Vorlesungen über Dynamik, organized mechanics around this idea and solved problems — geodesics on an ellipsoid, attraction by two fixed centers — that had defeated direct assault. Legend has Jacobi answering a colleague who asked why he worked so relentlessly: "Sometimes I have felt sick, but science remained." He died of smallpox at 46, a decade before his lectures reached print and a century before accelerator physicists began applying his transformation theory to machines the size of cities.
Going further
References. Goldstein, Poole & Safko, Classical Mechanics, 3rd ed., §9.1 · Landau & Lifshitz, Mechanics, 3rd ed., §45 · Arnold, Mathematical Methods of Classical Mechanics, Ch. 9 · Taylor, Classical Mechanics, Ch. 13 · José & Saletan, Classical Dynamics, Ch. 5 Key recomputable results on this page: coefficient-matching yields , ; the symplectic identity links the Jacobian test to Poisson brackets; and the bracket example illustrates the unit-bracket test. This page develops only the definition-level material — the four-type generating-function machinery, the symplectic test, and the bracket tests each have their own article. Numbers original to this page: Worked Example 1 (, , mixed-partial mismatch vs ) and Worked Example 2 (, , , vs ).
Builds on: Hamilton's Equations · Hamilton's Principle / Action · Phase Space · Legendre Transform Leads to: Generating Functions and the Four Types · Symplectic Condition · Poisson Brackets as a Test for Canonicity · Symplectic Group and Phase-Space Geometry · Fundamental Poisson Brackets
Why must the canonical form survive for every Hamiltonian, and not just for the problem I am solving?
Because canonicity is meant to be a property of the chart change, not of the dynamics you happen to study. Maps that preserve Hamilton's form for one particular only — called canonoid — do exist, but they are useless as general tools: change the potential and the "nice" variables break. The for-every- demand is what makes the three sharp tests possible (exactness, symplectic Jacobian, fundamental brackets), since each characterizes the map alone with no reference to a Hamiltonian. It is also what lets canonical transformations compose: applying two of them in sequence is again canonical, no matter what dynamics is running underneath — the group property developed in Symplectic Group and Phase-Space Geometry.
Where does the freedom dF/dt actually come from — doesn't adding a total derivative change the action?
It changes the action's value, not its stationary points. The added piece integrates to , which depends only on the path's endpoints; in Hamilton's principle the endpoints are held fixed, so this contribution is the same for the true path and every varied neighbor, and the variation cannot see it. This is the same endpoint-freedom you met on the Lagrangian side (gauge freedom of the Lagrangian), promoted to phase space. What is new here is its promotion from nuisance to engine: because is arbitrary, every choice of in mixed variables manufactures a canonical transformation — the constructive machinery of Generating Functions and the Four Types.
Is K just H written in new letters? When is it the energy?
Only for time-independent transformations, and even then only as a rule of substitution: — same value at each phase point, generally a very different formula. The moment the map carries explicit time dependence, genuinely differs, as in Worked Example 2 where against . Neither number need be "the energy" in any invariant sense: is defined by its job — generating the correct canonical equations in the new chart. Whether itself equals is already a delicate question on the old chart (see The Hamiltonian Function); inherits all of that delicacy plus the moving-chart shift.
If coordinates and momenta can be exchanged, what do position and momentum even mean in Hamiltonian mechanics?
Individually — nothing invariant. The formalism cares only about the pairing: phase space is organized into conjugate pairs , and the structure every canonical map preserves is the pairing itself (the symplectic area of each pair, in the geometric language of the Symplectic Condition). "Position" is whichever member of a pair you choose to call ; the exchange map's minus sign, , is what keeps the pair's orientation intact under the swap. This is a feature, not a defect: it is precisely why variables as abstract as action–angle pairs are legitimate coordinates, and it foreshadows quantum mechanics, where position and momentum representations are two unitarily equivalent descriptions of one state.
How do I actually check whether a given transformation is canonical, in practice?
Three interchangeable tests, in rising order of convenience. From first principles: exhibit making exact — instructive but laborious. Matrix test: assemble the Jacobian of the map and check (Symplectic Condition) — mechanical, ideal for linear maps. Bracket test: verify and in the old variables (Poisson Brackets as a Test for Canonicity) — usually fastest by hand. For one degree of freedom the whole business collapses to a single number, . If the map arrived packaged as a generating function, skip all three: anything generated is canonical by construction.
Is time evolution really a canonical transformation? What does that buy?
Yes — mapping every initial condition to its evolved state satisfies the definition, with itself orchestrating the map (the infinitesimal version, , is built in Infinitesimal Canonical Transformations). The purchase is enormous. It means the flow preserves phase-space volume — Liouville's Theorem, hence equilibrium statistical mechanics. It means numerical integrators that advance by canonical maps inherit the conservation structure exactly (the symplectic integrators of the today-section). And it recasts "solving the dynamics" as "finding the one-parameter family of canonical maps generated by " — the viewpoint from which Hamilton–Jacobi theory looks inevitable rather than clever.
Why is nothing like this possible in the Lagrangian formulation?
Because there the velocities are not independent variables — is defined as the time derivative of , so any change of variables must start from and derive by the chain rule. You can relabel the configuration manifold, nothing more. The Hamiltonian formalism severs that umbilical cord: is an independent coordinate on phase space, related to velocity only through the Legendre transformation that built in the first place (Legendre Transformation). Independence is what permits mixing, and mixing is what the entire canonical-transformation toolbox — generating functions, Hamilton–Jacobi, action–angle variables — is built from. The two formalisms remain equivalent in content; they differ in how much room they leave to move.
Does a canonical transformation change the physics — the actual trajectories?
Never. The particle's worldline is untouched; only its description changes, the way a rotation of map coordinates leaves a mountain where it was. What changes is the difficulty of reading the motion off the chart. In the original variables the oscillator's flow is an ellipse traversed nonuniformly in ; in action–angle variables the same flow is a point moving at constant speed around a circle. The strategic content of this chapter is exactly that gap: since the physics is invariant, spend your effort transforming the chart until the flow becomes trivial, then transform back. Hamilton–Jacobi theory automates the search; the definition in this article is what guarantees the search never corrupts the dynamics.