STEMviz
Physics · Analytical Mechanics and Thermodynamics

The Hamiltonian and Hamilton's Canonical Equations

Lagrangian mechanics describes a system by nn second-order equations for the coordinates qj(t)q_j(t). The Hamiltonian formulation, introduced by William Rowan Hamilton in 1834, trades these for 2n2n first-order equations in the coordinates and their conjugate momenta pjp_j. Nothing new is added to the physics; what changes is the arena. Instead of a trajectory q⃗(t)\vec q(t) in nn-dimensional configuration space, the motion becomes a flow of a point (q⃗,p⃗)(\vec q,\vec p) through 2n2n-dimensional phase space, governed by a single scalar function H(q⃗,p⃗,t)H(\vec q,\vec p,t).

The reformulation is worth the effort for three reasons. First, first-order equations have a cleaner geometric structure — the flow is generated by HH through a fixed antisymmetric bracket, and this symplectic structure is the key to canonical transformations (Chapter 6), Hamilton–Jacobi theory (Chapter 7), perturbation theory, and the transition to quantum mechanics and statistical mechanics. Second, conserved quantities and symmetries sit on an equal footing: pjp_j conserved when qjq_j is cyclic, HH conserved when ∂H/∂t=0\partial H/\partial t = 0, and (Chapter 6) every conserved quantity generates a symmetry. Third, phase-space volume is preserved by the flow (Liouville's theorem), the foundation of statistical mechanics in Chapters 13–15.

How to read this chapter. The machinery is a single device — the Legendre transformation — applied to LL to swap q⃗˙\dot{\vec q} for p⃗\vec p. Learn the recipe in Section 3 and the canonical equations in Section 4; everything else is consequence or example. When you compute HH, always finish by eliminating every q˙j\dot q_j in favour of pjp_j: a Hamiltonian with a stray velocity in it is not yet a Hamiltonian.

1. Phase Space and the First-Order Idea

A Lagrangian equation of motion, ddt∂L∂q˙j=∂L∂qj\dfrac{d}{dt}\dfrac{\partial L}{\partial\dot q_j} = \dfrac{\partial L}{\partial q_j}, is second order because ∂L/∂q˙j\partial L/\partial\dot q_j depends on the velocities and its time derivative brings in accelerations. Any second-order system can be written as a first-order one by treating the velocities as independent variables; the Hamiltonian formulation does this in a particular, structure-preserving way, using the canonical momenta

pj=∂L∂q˙jp_j = \frac{\partial L}{\partial\dot q_j}

as the new variables rather than the velocities themselves. The state of the system is then a point (q⃗,p⃗)=(q1,…,qn,p1,…,pn)(\vec q,\vec p) = (q_1,\dots,q_n,p_1,\dots,p_n) in phase space, and the dynamics is a vector field on that space: through each point passes exactly one trajectory, so phase-space paths never cross.

Keep reading: The Hamiltonian and Hamilton's Canonical Equations

This chapter is Premium. Unlock every Physics lesson — theory, interactive visualizations, quizzes, exercises and flashcards — with a one-time purchase or a monthly plan, or get every subject at once with the Full Course Bundle. The first 2 chapters of every block are free with an account.