Physics · Article
Canonical transformations
Relabel one position–momentum state, preserve the canonical relationship, and carry the Hamiltonian through the inverse map. An exact shear shows why invertibility and unchanged energy values are not sufficient tests.
Previous article: Poisson brackets
Back to PhysicsAfter reading, you can
- Map a state and recover its original position and momentum with compatible units.
- Check the ordered canonical bracket and distinguish a canonical map from a merely invertible one.
- Rewrite the supplied Hamiltonian and verify the corresponding instantaneous rates.
- Use a type-two generating function for the same shear and keep its domain and time assumptions visible.
Relabel one state before moving anything
Take a stipulated classical particle of mass 3 kg moving along one fixed line. Its signed position is q, measured in metres; its mechanical momentum is p = m v, measured in kg·m/s. At one possible state B, q = 1 m and p = −3 kg·m/s, so the velocity is −1 m/s.
Now label the same state with Q = q and P = p + c q, where c = 3 kg/s. State B becomes Q = 1 m and P = 0 kg·m/s. The body has not stopped: the new momentum coordinate P contains a position-dependent addition. Recovering p gives the same velocity as before.
For preparation, use Units, standards, and physical constants to check compatible units, and Algebra, functions, graphs, and logarithms to practise substitution and inverse rules. Derivatives, Taylor series, and local approximation is a useful return path for the derivative tests below. The needed Hamiltonian and bracket conventions are introduced here.
Declare the model and its two kinds of coordinates
For this lesson choose mass m = 3 kg and positive stiffness k = 12 N/m. The ideal one-dimensional oscillator has Hamiltonian H(q,p) = p²/(2m) + kq²/2. Here H is its total mechanical energy, with kinetic part p²/(2m) and spring potential kq²/2. The variables q and p can independently take any real values; the model has no explicit time dependence.
A position–momentum pair labels a state in phase space. A point in its diagram is not a location in an ordinary two-dimensional room: one axis is length and the other is momentum. Our figure compares selected states, rather than showing how a single state evolves with time.
Hamilton’s equations for this model are q̇ = ∂H/∂p = p/m; ṗ = −∂H/∂q = −kq. A dot means a derivative with respect to physical time. A partial derivative changes one coordinate while holding the other fixed. The first rate has units m/s; the second has units N.
A reversible map needs the canonical test
Our shear is Q = q; P = p + cq, with c constant. Its inverse is q = Q; p = P − cQ. These rules work for every real pair, so this example is globally invertible. The units matter: c q has units kg·m/s and can therefore be added to p.
To test a differentiable one-pair map, use the ordered Poisson bracket {A,B} = (∂A/∂q)(∂B/∂p) − (∂A/∂p)(∂B/∂q). The derivatives are taken with respect to the original q and p. In particular, {q,p} = 1. The order matters: {p,q} = −1.
A canonical map preserves this relationship: {Q,P} = 1, with {Q,Q} = {P,P} = 0. For the shear, ∂Q/∂q = 1, ∂Q/∂p = 0, ∂P/∂p = 1 and ∂P/∂q = c. Thus {Q,P} = 1 × 1 − 0 × c = 1. The test does not depend on a particular state or on our numerical mass and stiffness.
This is the one-pair symplectic condition: it preserves the canonical position–momentum structure. With continuously differentiable maps on an open region, the nonzero Jacobian determinant also gives a local inverse. A local derivative test alone is not a proof that an arbitrary map is globally one-to-one; here we have the explicit global inverse.
Read the same states in two coordinate panels
The table and diagram label five separate choices A, B, C, D and O. For example, A shifts from (q,p) = (−1 m, −3 kg·m/s) to (Q,P) = (−1 m, −6 kg·m/s), while B shifts to (1 m, 0 kg·m/s). Matching letters and shapes identify the same physical state in the two panels.
The outlined rectangle is an arbitrary selected phase region. Its width is 2 m and its momentum height is 6 kg·m/s, so its area is 12 J·s. The shear maps it to a parallelogram with the same area. Phase area has action units J·s; it is neither spatial area in m² nor energy in J.
All four corners have H = 7.5 J, but the straight polygon edges are not an oscillator orbit or an energy contour. For instance, the midpoint of the lower original edge has q = 0 and p = −3 kg·m/s, giving H = 1.5 J. No elapsed time, order of visits or motion along those edges is implied.
Q = q; P = p + (3 kg/s)q.
A: circle; B: square; C: diamond; D: triangle; O: cross. Matching shapes identify the same state.
Hatched selected phase regions; each outline encloses 12 J·s.
The states are separate choices. Polygon edges mark a selected region, not a motion path or an energy contour.
Both panels use 140 pixels per metre horizontally and 18 pixels per kg·m/s vertically.
B has P = 0 but p = −3 kg·m/s and velocity −1 m/s.
A–D: H = 7.5 J; O: H = 0 J.
The shear is defined for all real q and p. The visible axes cover −1.25 to +1.25 m and −7.5 to +7.5 kg·m/s.
The invertible map P_bad = 2p would double this region’s area to 24 J·s.
O: zero position and zero momentum.
Two position–momentum coordinate panels show an original rectangle and its sheared parallelogram. A, B, C and D are the four corners; O is the zero state. Both panels use the same unit-valued scales, and each selected region has phase area 12 J·s.
| State | q (m) | p (kg·m/s) | Q (m) | P (kg·m/s) | H (J) |
|---|---|---|---|---|---|
| A | −1 | −3 | −1 | −6 | 7.5 |
| B | 1 | −3 | 1 | 0 | 7.5 |
| C | 1 | 3 | 1 | 6 | 7.5 |
| D | −1 | 3 | −1 | 0 | 7.5 |
| O | 0 | 0 | 0 | 0 | 0 |
Carry the Hamiltonian through the inverse
For this time-independent canonical map, the new Hamiltonian is the old one evaluated through the inverse: H′(Q,P) = (P − cQ)²/(2m) + kQ²/2. Do not simply replace the letter p by P in the original expression. At B, the correct kinetic energy is 1.5 J and the potential energy is 6 J, giving 7.5 J; the naive replacement would give only 6 J.
The numerical coordinate expression changes, while the energy value for a given state stays the same. P is now the coordinate conjugate to Q in the canonical equations. In this shear it is not the mechanical momentum m Q̇.
The transformed equations are Q̇ = (P − cQ)/m; Ṗ = (c/m)(P − cQ) − kQ. They agree with differentiating the map: Q̇ = q̇ and Ṗ = ṗ + c q̇. At B, Q̇ = −1 m/s and Ṗ = −15 N, whereas the physical momentum rate ṗ is −12 N. The new coordinate rate Ṗ need not equal the mechanical force.
Invertible can still be noncanonical
Compare the different rule Q = q; P_bad = 2p. It is globally invertible, with p = P_bad/2, but {Q,P_bad} = 2. It therefore fails the canonical test with the same physical time and the stated bracket convention. It would double the selected region’s phase area from 12 J·s to 24 J·s.
Substitution still gives a correct scalar energy function, H_bad(Q,P_bad) = P_bad²/(8m) + kQ²/2. Having correct energy values is not enough to justify applying the standard canonical equations to these coordinates.
At original state B, P_bad = −6 kg·m/s. The standard rule applied to H_bad would give Q̇ = P_bad/(4m) = −0.5 m/s, rather than the actual −1 m/s. It would give P_baḋ = −kQ = −12 N, rather than the actual 2ṗ = −24 N. Both disagreements expose the missing canonical structure.
Generate the same shear from one function
A type-two generating function uses the old position q and new momentum P as its independent arguments. Choose F₂(q,P) = qP − cq²/2. Its units are J·s. Hold P fixed when differentiating with respect to q, and hold q fixed when differentiating with respect to P.
The rules p = ∂F₂/∂q = P − cq; Q = ∂F₂/∂P = q reproduce our inverse and hence the same shear. The mixed derivative ∂²F₂/(∂q∂P) = 1 makes these particular equations regular and explicitly solvable. A generating function must have a usable local inverse relation; writing an arbitrary function does not guarantee one global coordinate chart.
The minus sign is essential to this chosen map. Using a plus sign in front of cq²/2 would produce P = p − cq instead, which is a different canonical shear. Adding a constant to F₂ changes neither derivative and therefore does not change the map.
Keep the domain, time and purpose visible
The shear is defined for all real states; the visible plot is a bounded window. A point outside that window is not outside the map’s mathematical domain. A convenient canonical coordinate need not be a directly measured length or mechanical momentum, and a canonical change need not make every problem simpler.
For several independent position–momentum pairs, all fundamental brackets must be checked: each matching {Qᵢ,Pᵢ} is 1 and the cross-pair brackets are 0. A unit determinant alone is insufficient. Our single-pair shear avoids those extra indices, but the distinction matters before generalizing.
Time-dependent transformations require a further Hamiltonian adjustment. For a regular type-two generator F₂(q,P,t), the added term is ∂F₂/∂t, expressed in the new coordinates along with the old Hamiltonian. Its units are J. Our F₂ has no explicit time argument, so that term is zero; the time-independent substitution used here is sufficient.
Return to the published derivative lesson if holding one variable fixed is unfamiliar. You can already explain the core result from the point mapping, inverse and table; the bracket and generating-function calculations show why this relabeling preserves the standard Hamiltonian equations.
Worked examples
Recover the mechanical state from new coordinates
In the supplied oscillator and shear, a state has Q = −0.5 m and P = 1.5 kg·m/s. Recover q and p, then find its physical velocity and energy.
- The inverse gives q = Q = −0.5 m and p = P − cQ = 1.5 kg·m/s − (3 kg/s)(−0.5 m) = 3 kg·m/s.
- Use the original mechanical relation: v = p/m = (3 kg·m/s)/(3 kg) = 1 m/s.
- The kinetic energy is p²/(2m) = 1.5 J and the potential is kq²/2 = 1.5 J. Their sum is 3 J.
q = −0.5 m, p = 3 kg·m/s, v = 1 m/s and H = H′ = 3 J. The positive new P is not used directly as m v.
Test a reciprocal rescaling
For a separate time-independent map of the same oscillator, set S = 2q and T = p/2, with S in metres and T in kg·m/s. Is it canonical? Check the energy and rates at q = 1 m, p = −3 kg·m/s.
- The inverse is q = S/2 and p = 2T. The ordered bracket is {S,T} = 2 × (1/2) − 0 = 1, so this globally invertible rescaling is canonical.
- The inverse substitution gives H_new(S,T) = 2T²/m + kS²/8. At S = 2 m and T = −1.5 kg·m/s, its kinetic and potential terms are 1.5 J and 6 J.
- The standard canonical rates are Ṡ = 4T/m = −2 m/s and Ṫ = −kS/4 = −6 N. These equal 2q̇ and ṗ/2, as differentiating the map requires.
Yes. The energy is 7.5 J and the transformed rates match the same physical evolution. This is a separate algebraic comparison, not the shear drawn in the figure.
A zero generating-function value can have nonzero derivatives
Use F₂(q,P) = qP − cq²/2 with c = 3 kg/s. At q = 2 m and P = 3 kg·m/s, find F₂, p and Q. Does F₂ = 0 mean the state is motionless?
- The two action terms are qP = 6 J·s and cq²/2 = 6 J·s, so F₂ = 0 J·s.
- Differentiate before inserting the state: p = P − cq = 3 kg·m/s − 6 kg·m/s = −3 kg·m/s, and Q = q = 2 m.
- For the supplied mass, the physical velocity is p/m = −1 m/s. This state lies outside the diagram’s horizontal window but inside the global map domain.
F₂ = 0 J·s, p = −3 kg·m/s and Q = 2 m. A function value of zero does not make its derivatives zero or stop the particle.
Try it yourself
Why can the coefficient in P = p + cq not be a bare dimensionless 3 when q is a length and p is momentum? State the required units.
Show the answer and reasoning
c must have units kg/s. A bare dimensionless 3 would make cq a length, which cannot be added to momentum.
Divide the required momentum unit kg·m/s by the position unit m. The result is kg/s, and (kg/s)m = kg·m/s.
For the supplied shear, calculate {P,Q}. Does reversing the bracket order preserve the value +1?
Show the answer and reasoning
{P,Q} = −1. Reversing the order reverses the sign.
P_q = c, Q_p = 0, P_p = 1 and Q_q = 1. The ordered definition gives c × 0 − 1 × 1 = −1.
In the supplied oscillator, a state has Q = 0.5 m and P = 0 kg·m/s. Find its mechanical momentum, velocity and energy.
Show the answer and reasoning
p = −1.5 kg·m/s, v = −0.5 m/s and H′ = 15/8 J = 1.875 J.
p = P − cQ gives −1.5 kg·m/s. Divide by 3 kg for velocity. The kinetic contribution is 0.375 J and the potential contribution is 1.5 J; P = 0 does not remove the kinetic energy.
A separate selected original rectangle spans 0 ≤ q ≤ 1 m and 0 ≤ p ≤ 4 kg·m/s. What is its phase area before and after the same shear? Are its edges a prescribed motion path?
Show the answer and reasoning
The phase area is 4 J·s both before and after the shear. Its edges do not prescribe a motion path.
Width times momentum height gives (1 m)(4 kg·m/s) = 4 J·s. The canonical shear preserves this phase area. No initial-value evolution or order of visits was specified.
Replace F₂ by G₂(q,P) = qP + cq²/2, keeping c = 3 kg/s. What map does it generate? At q = 1 m, p = −3 kg·m/s, find its new P and decide whether it is noncanonical.
Show the answer and reasoning
It generates Q = q, P = p − cq. The state has P = −6 kg·m/s, and this different shear is still canonical.
p = ∂G₂/∂q = P + cq and Q = ∂G₂/∂P = q. Solving gives P = p − cq. Its ordered bracket is again 1 × 1 − 0 × (−c) = 1; the sign changes the map rather than destroying canonicity.
For two independent canonical pairs, take Q₁ = 2q₁, P₁ = p₁, Q₂ = q₂ and P₂ = p₂/2. All scale factors are dimensionless. The full diagonal Jacobian has determinant 1. Is this map canonical?
Show the answer and reasoning
No. The matching brackets are {Q₁,P₁} = 2 and {Q₂,P₂} = 1/2, instead of 1 for each pair.
The determinant is 2 × 1 × 1 × (1/2) = 1, but the full canonical test preserves each matching bracket as well as the cross-pair zeros. Opposite area scalings in the two pairs can cancel in the determinant while violating that test.
What to carry forward
- A canonical relabeling preserves the position–momentum bracket and the standard Hamiltonian equations when the Hamiltonian is transformed correctly.
- Use the inverse map and compatible units; the new momentum coordinate need not equal mechanical momentum.
- Keep local invertibility, global domain, explicit time dependence and the purpose of a phase-space picture separate.
References
Sources for the concepts and teaching approaches in this article.
- Classical DynamicsDavid Tong — University of CambridgeCourse notesClassical DynamicsThe Hamiltonian Formalism, §§4.4 and 4.4.3
- Apuntes de Mecánica ClásicaFernando O. MinottiCourse notes · PDFNotes on Classical Mechanics (first term, 2013)Transformaciones canónicas y corchetes de Poisson, pp. 37–38Corchetes de Poisson, pp. 42 and 46
- Structure and Interpretation of Classical MechanicsGerald Jay Sussman and Jack Wisdom — The MIT PressTextbook chapterTypes of Generating Functions