Skip to content

Hamiltonian Mechanics Review

Hamiltonian mechanics describes classical dynamics as motion on phase space. Instead of using positions and velocities (q,q˙)(q,\dot q), it uses canonical coordinates and momenta (q,p)(q,p) and a Hamiltonian function H(q,p,t)H(q,p,t).

For nn degrees of freedom, Hamilton’s equations are

q˙i=∂H∂pi,p˙i=−∂H∂qi.\dot q^i = \frac{\partial H}{\partial p_i}, \qquad \dot p_i = - \frac{\partial H}{\partial q^i}.

This page reviews the mechanics needed for quantum mechanics: phase space, Hamiltonian flow, the Legendre transform from Lagrangian mechanics, energy conservation, and the analogy with quantum Hamiltonians as generators of time evolution.

Hamiltonian mechanics is the classical language closest to operator quantum mechanics. It supplies:

  • canonical variables qiq^i and pip_i, the ancestors of position and momentum operators;
  • phase-space motion, the classical comparison point for wave packets and semiclassical dynamics;
  • Hamiltonians as generators of time evolution;
  • Poisson-bracket formulas that preview quantum commutators;
  • the starting point for canonical quantization and many path-integral constructions.

The quantum Hamiltonian is not merely the classical energy function with hats added. Quantization can introduce domain questions, ordering ambiguities, spectra, and Hilbert-space structure. Still, Hamiltonian mechanics provides the organizing bridge.

For a system with nn generalized coordinates qiq^i, phase space has coordinates

(q1,…,qn,p1,…,pn).(q^1,\ldots,q^n,p_1,\ldots,p_n).

It is 2n2n-dimensional. A classical state at a time is a point in phase space. A classical trajectory is a curve

t↦(q(t),p(t)).t\mapsto(q(t),p(t)).

This is different from quantum Hilbert space. A wavefunction is not a probability distribution over phase space, and a Hilbert-space ray is not a phase-space point. Semiclassical methods compare the two structures, but they do not identify them.

For a one-dimensional particle, the phase-space coordinates are simply (x,p)(x,p). For a particle in polar coordinates, they might be (r,θ,pr,pθ)(r,\theta,p_r,p_\theta), where pθp_\theta is angular momentum.

Start with a Lagrangian

L(q,q˙,t).L(q,\dot q,t).

The canonical momenta are

pi=∂L∂q˙i.p_i = \frac{\partial L}{\partial\dot q^i}.

If these equations can be solved for the velocities q˙i\dot q^i as functions of (q,p,t)(q,p,t), the Hamiltonian is the Legendre transform

H(q,p,t)=∑ipiq˙i−L(q,q˙,t),H(q,p,t) = \sum_i p_i\dot q^i - L(q,\dot q,t),

where the velocities on the right are rewritten in terms of (q,p,t)(q,p,t).

This invertibility is not automatic. A singular Lagrangian, common in constrained systems and gauge theories, requires additional constraint analysis. This review sticks to regular systems where the velocity-momentum relation can be inverted.

Hamilton’s equations are first-order equations on phase space:

q˙i=∂H∂pi,\dot q^i = \frac{\partial H}{\partial p_i},

and

p˙i=−∂H∂qi.\dot p_i = - \frac{\partial H}{\partial q^i}.

Together, they replace the second-order Euler–Lagrange equations. Specifying (q(t0),p(t0))(q(t_0),p(t_0)) gives the initial data for a classical trajectory.

The sign difference between the two equations is structural. It is the local coordinate form of the symplectic geometry of phase space. Symplectic Vector Spaces develops the finite-dimensional linear version of that structure; here the coordinate equations are the main tool.

Changes of phase-space variables that preserve this Hamiltonian form are reviewed in Canonical Transformations.

For a particle in one dimension with

L=12mx˙2−V(x),L = \frac12m\dot x^2 - V(x),

the canonical momentum is

p=∂L∂x˙=mx˙.p = \frac{\partial L}{\partial\dot x} = m\dot x.

Solving for x˙=p/m\dot x=p/m, the Hamiltonian is

H(x,p)=px˙−L=p22m+V(x).H(x,p) = p\dot x-L = \frac{p^2}{2m}+V(x).

Hamilton’s equations give

x˙=∂H∂p=pm,\dot x = \frac{\partial H}{\partial p} = \frac{p}{m},

and

p˙=−∂H∂x=−dVdx.\dot p = - \frac{\partial H}{\partial x} = - \frac{dV}{dx}.

Combining them gives Newton’s equation:

mx¨=−dVdx.m\ddot x = - \frac{dV}{dx}.

For the harmonic oscillator,

H(x,p)=p22m+12mω2x2.H(x,p) = \frac{p^2}{2m} + \frac12m\omega^2x^2.

Hamilton’s equations are

x˙=pm,p˙=−mω2x.\dot x=\frac{p}{m}, \qquad \dot p=-m\omega^2x.

Taking one more derivative of the first equation gives

x¨=p˙m=−ω2x,\ddot x = \frac{\dot p}{m} = -\omega^2x,

or

x¨+ω2x=0.\ddot x+\omega^2x=0.

This classical oscillator phase-space flow is the comparison point for coherent states, ladder operators, and the quantum oscillator spectrum.

Along a Hamiltonian trajectory,

dHdt=∑i(∂H∂qiq˙i+∂H∂pip˙i)+∂H∂t.\frac{dH}{dt} = \sum_i \left( \frac{\partial H}{\partial q^i}\dot q^i + \frac{\partial H}{\partial p_i}\dot p_i \right) + \frac{\partial H}{\partial t}.

Substitute Hamilton’s equations:

dHdt=∑i(∂H∂qi∂H∂pi−∂H∂pi∂H∂qi)+∂H∂t.\frac{dH}{dt} = \sum_i \left( \frac{\partial H}{\partial q^i} \frac{\partial H}{\partial p_i} - \frac{\partial H}{\partial p_i} \frac{\partial H}{\partial q^i} \right) + \frac{\partial H}{\partial t}.

The sum cancels, so

dHdt=∂H∂t.\frac{dH}{dt} = \frac{\partial H}{\partial t}.

If HH has no explicit time dependence, then HH is conserved along the classical motion. In quantum mechanics, a time-independent Hamiltonian generates time evolution and is conserved as an observable in closed-system dynamics, but the operator statement requires commutators and domains.

The Hamiltonian determines a vector field on phase space:

XH=∑i(∂H∂pi∂∂qi−∂H∂qi∂∂pi).X_H = \sum_i \left( \frac{\partial H}{\partial p_i} \frac{\partial}{\partial q^i} - \frac{\partial H}{\partial q^i} \frac{\partial}{\partial p_i} \right).

Hamilton’s equations say that the trajectory follows this vector field:

ddt=XH\frac{d}{dt} = X_H

along the curve. This is the classical version of “the Hamiltonian generates time evolution.” The quantum version is that a self-adjoint Hamiltonian generates a unitary family

U(t)=exp⁡(−iℏHt).U(t) = \exp \left( -\frac{i}{\hbar}Ht \right).

For the quantum generator role, see Hamiltonians as Generators of Time Evolution and Unitary Time Evolution.

For a classical observable f(q,p,t)f(q,p,t), Hamiltonian evolution can be written

dfdt={f,H}+∂f∂t,\frac{df}{dt} = \{f,H\} + \frac{\partial f}{\partial t},

where the canonical Poisson bracket is

{f,g}=∑i(∂f∂qi∂g∂pi−∂f∂pi∂g∂qi).\{f,g\} = \sum_i \left( \frac{\partial f}{\partial q^i} \frac{\partial g}{\partial p_i} - \frac{\partial f}{\partial p_i} \frac{\partial g}{\partial q^i} \right).

The full bracket theory belongs to Poisson Brackets. The preview matters here because canonical quantization replaces, heuristically,

{f,g}⟶1iℏ[f^,g^],\{f,g\} \quad \longrightarrow \quad \frac{1}{i\hbar} [\hat f,\hat g],

with many caveats about ordering and domains. The Heisenberg Group is the group-level home for the canonical commutation relations.

The classical Hamiltonian function H(q,p)H(q,p) often suggests a quantum Hamiltonian operator. For a particle in a potential one writes

H(x,p)=p22m+V(x)H(x,p) = \frac{p^2}{2m}+V(x)

classically, and

H^=P^22m+V(X^)\hat H = \frac{\hat P^2}{2m}+V(\hat X)

quantum mechanically.

This notation hides real work. The operator P^2\hat P^2 needs a domain, V(X^)V(\hat X) needs spectral meaning, and products of noncommuting variables can have ordering ambiguities. Finite-dimensional Hamiltonian matrices also depend on basis choices and truncations.

The operational quantum statement is not “replace every classical formula by an operator.” It is: choose a Hilbert space, define a self-adjoint Hamiltonian, and use it to generate time evolution through the Schrödinger equation.

From Phase Space to Canonical Quantization carries the Legendre transform and Hamilton equations to fields, including the singular transforms that signal constraints.

  • Confusing phase space with Hilbert space.
  • Treating pip_i as always equal to mq˙im\dot q^i in any coordinate system.
  • Performing the Legendre transform before checking that velocities can be solved in terms of momenta.
  • Forgetting the minus sign in p˙i=−∂H/∂qi\dot p_i=-\partial H/\partial q^i.
  • Assuming HH is conserved when it depends explicitly on time.
  • Treating a classical Hamiltonian formula as a complete quantum Hamiltonian operator.
  • Ignoring operator ordering when quantizing products of qq and pp.
  • Using Poisson-bracket to commutator replacement as an exact theorem rather than a correspondence rule with caveats.
  • H. Goldstein, C. Poole, and J. Safko, Classical Mechanics, 3rd ed., Addison-Wesley, 2002.
  • L. D. Landau and E. M. Lifshitz, Mechanics, 3rd ed., Butterworth-Heinemann, 1976.
  • V. I. Arnold, Mathematical Methods of Classical Mechanics, 2nd ed., Springer, 1989.
  • R. Abraham and J. E. Marsden, Foundations of Mechanics, 2nd ed., AMS Chelsea, 2008.
  • R. Shankar, Principles of Quantum Mechanics, 2nd ed., Springer, 1994.
  • B. C. Hall, Quantum Theory for Mathematicians, Springer, 2013.
  1. Starting from L=(1/2)mx˙2−V(x)L=(1/2)m\dot x^2-V(x), derive H=p2/(2m)+V(x)H=p^2/(2m)+V(x).
Solution

The canonical momentum is

p=∂L∂x˙=mx˙.p = \frac{\partial L}{\partial\dot x} = m\dot x.

Thus x˙=p/m\dot x=p/m. The Legendre transform gives

H=px˙−L=p2m−(p22m−V(x))=p22m+V(x).H=p\dot x-L = \frac{p^2}{m} - \left( \frac{p^2}{2m}-V(x) \right) = \frac{p^2}{2m}+V(x).
  1. Use Hamilton’s equations for H=p2/(2m)+V(x)H=p^2/(2m)+V(x) to recover Newton’s equation.
Solution

Hamilton’s equations are

x˙=∂H∂p=pm,p˙=−∂H∂x=−dVdx.\dot x = \frac{\partial H}{\partial p} = \frac{p}{m}, \qquad \dot p = - \frac{\partial H}{\partial x} = - \frac{dV}{dx}.

Since p=mx˙p=m\dot x, the second equation becomes

mx¨=−dVdx.m\ddot x = - \frac{dV}{dx}.
  1. Show that a time-independent Hamiltonian is conserved along Hamiltonian flow.
Solution

Along a trajectory,

dHdt=∑i(∂H∂qiq˙i+∂H∂pip˙i)+∂H∂t.\frac{dH}{dt} = \sum_i \left( \frac{\partial H}{\partial q^i}\dot q^i + \frac{\partial H}{\partial p_i}\dot p_i \right) + \frac{\partial H}{\partial t}.

Using Hamilton’s equations, the sum cancels pairwise. If ∂H/∂t=0\partial H/\partial t=0, then

dHdt=0.\frac{dH}{dt}=0.
  1. Compute the canonical Poisson bracket {qi,pj}\{q^i,p_j\} from the definition.
Solution

Use

{f,g}=∑k(∂f∂qk∂g∂pk−∂f∂pk∂g∂qk).\{f,g\} = \sum_k \left( \frac{\partial f}{\partial q^k} \frac{\partial g}{\partial p_k} - \frac{\partial f}{\partial p_k} \frac{\partial g}{\partial q^k} \right).

For f=qif=q^i and g=pjg=p_j,

∂qi∂qk=δki,∂pj∂pk=δjk,\frac{\partial q^i}{\partial q^k} = \delta^i_k, \qquad \frac{\partial p_j}{\partial p_k} = \delta_{jk},

while the other two derivatives vanish. Therefore

{qi,pj}=δji.\{q^i,p_j\} = \delta^i_j.