← thecodex.expert
Classical Mechanics Hub Physicist Biographies
Definition Curious Exploring Deep Dive Sources
Analytical Mechanics · Concept

Hamiltonian Mechanics

Reading time: 9 minConfidence: HighLast verified: October 2026

Hamiltonian mechanics describes a system with n degrees of freedom by generalised coordinates qi and conjugate momenta pi = ∂L/∂q̇i, together with the Hamiltonian H(q, p, t) = Σpiq̇i − L, obtained by a Legendre transformation of the Lagrangian. When the constraints and potential are time-independent and T is quadratic in velocities, H = T + V, the total energy. The dynamics are given by Hamilton's equations, 2n first-order equations in the 2n-dimensional phase space. The formulation underlies statistical mechanics, perturbation theory, chaos theory and the canonical quantisation of quantum mechanics.

Curious

One sentence that captures itHamiltonian mechanics describes a system by its positions and momenta together and by its total energy, and this bookkeeping turns out to be the doorway to quantum physics.

In 1833–1835 the Irish mathematician William Rowan Hamilton, who had first worked on optics, recast mechanics in a symmetric form in which positions and momenta are equal partners. The state of a system becomes a single point in a space of all positions and momenta, called phase space, and its motion is a flow through that space governed by one function, the Hamiltonian.

For everyday problems this is no easier than Newton's or Lagrange's methods. Its power showed later: the Hamiltonian is the central object of quantum mechanics (see Schrödinger Equation) and of statistical mechanics (see Partition Function).

Exploring

Worked example — harmonic oscillatorFor a mass m on a spring of stiffness k, H = p²/(2m) + ½kx². At fixed energy E the system traces an ellipse in the (x, p) plane enclosing area 2πE/ω, where ω = √(k/m). For m = 1 kg, k = 100 N/m and E = 2 J, the area is 2π × 2/10 ≈ 1.26 J s. In the old quantum theory, this area was required to be a multiple of Planck's constant, giving quantised energies (see Quantum Harmonic Oscillator). (Computed in Python.)
LagrangianHamiltonian
Variablesq, q̇q, p
FunctionL = T − VH = Σpq̇ − L (often T + V)
Equationsn second-order2n first-order
SpaceConfiguration spacePhase space
Quantum linkPath integralOperators, Schrödinger equation
Common mistake — Commonly ConfusedThe Hamiltonian is not always the total energy: with time-dependent constraints, moving coordinate systems or certain velocity-dependent potentials, H and the energy can differ, and either may or may not be conserved. Also, the canonical momentum p = ∂L/∂q̇ need not equal mv; for a charged particle in a magnetic field it is mv + qA.

Deep Dive

Primary sourceHamilton, W.R. (1834). “On a General Method in Dynamics.” Philosophical Transactions of the Royal Society, 124, 247–308; Hamilton, W.R. (1835). “Second Essay on a General Method in Dynamics.” Philosophical Transactions, 125, 95–144.; Goldstein, H., Poole, C., Safko, J. (2002). Classical Mechanics (3rd ed.). Addison Wesley.

Structure. Phase space carries a symplectic structure that Hamiltonian flow preserves; consequences include canonical transformations, Liouville's theorem on conservation of phase-space volume, and the algebra of Poisson brackets. Integrable systems can be described by action-angle variables, and the Kolmogorov–Arnold–Moser (KAM) theorem describes how most such motions survive small perturbations while others become chaotic.

Quantum mechanics. Canonical quantisation replaces q and p by operators with [q̂, p̂] = iℏ and H by the Hamiltonian operator, whose eigenvalues are the allowed energies; the time-dependent Schrödinger equation is iℏ∂ψ/∂t = Ĥψ. This is why the word “Hamiltonian” appears throughout quantum physics (see Exchange Interaction for a condensed-matter example).

Computation. Long-term simulations of planetary systems use symplectic integrators, which respect the Hamiltonian structure and avoid the slow energy drift of ordinary numerical methods.

Sources

  • Hamilton, W.R. (1834). Philosophical Transactions, 124, 247–308.
  • Goldstein, H., Poole, C., Safko, J. (2002). Classical Mechanics (3rd ed.). Addison Wesley.
  • Arnold, V.I. (1989). Mathematical Methods of Classical Mechanics (2nd ed.). New York: Springer.
Last verified: October 2026 · Source: Hamilton (1834–35); Goldstein et al. (2002); Arnold (1989) · Confidence: high