Learning path

Full curriculum

Full curriculum

Unit content

Hamiltonian mechanics and canonical momentum

Lagrangian mechanics describes a system using generalized coordinates $q_i$ and velocities $\dot q_i$. Hamiltonian mechanics replaces the velocities by canonical momenta $$p_i=\frac{\partial L}{\partial\dot q_i}.$$ When these relations can be inverted for the velocities, define the Hamiltonian by the Legendre transform $$H(q,p,t)=\sum_i p_i\dot q_i-L(q,\dot q,t).$$

For a particle with $$L=\frac12m\dot q^2-V(q),$$ the canonical momentum is $p=m\dot q$. Therefore $$H=p\frac{p}{m}-\left(\frac{p^2}{2m}-V\right) =\frac{p^2}{2m}+V(q),$$ which equals the total mechanical energy in this common case.

Hamiltonian mechanics treats $q_i$ and $p_i$ as independent coordinates of the system's state. The Hamiltonian need not always equal ordinary kinetic plus potential energy, but when the Lagrangian has the standard form and no explicit time dependence, that interpretation applies.

The change of variables is valuable because dynamics becomes a set of first-order equations, symmetries acquire a natural geometric form, and the same Hamiltonian structure extends into statistical mechanics and quantum mechanics. Canonical momentum should not automatically be identified with $m\mathbf v$: in electromagnetic fields, for example, the canonical momentum differs from mechanical momentum because the Lagrangian contains velocity-dependent potentials.