Hamiltonian mechanics is a formulation of classical mechanics in which a system’s evolution is described by generalized coordinates and their conjugate momenta, governed by a function called the Hamiltonian. For many familiar mechanical systems, this function represents total energy expressed in terms of position and momentum. Hamilton’s equations provide an alternative to Newton’s laws of motion, with the same physical predictions when applied to equivalent systems. The formulation also supplies mathematical structures used in statistical and quantum physics. (ocw.mit.edu)
Historical development
William Rowan Hamilton developed his approach by adapting mathematical methods from optics to dynamics. His papers On a General Method in Dynamics and Second Essay on a General Method in Dynamics appeared in 1834 and 1835, respectively. They described motion through characteristic and principal functions related to the action, introducing ideas that became central to Hamilton–Jacobi theory. The second essay explicitly presented Hamilton’s equations of motion. (maths.tcd.ie)
Coordinates, momenta, and the Hamiltonian
For a system with (n) degrees of freedom, generalized coordinates (q_1,\ldots,q_n) specify its configuration. They may be Cartesian positions, angles, or other independent variables. Starting from a Lagrangian (L(q,\dot q,t)), the conjugate momenta are defined by
[ p_i=\frac{\partial L}{\partial\dot q_i}. ]
These are generalized momenta, not necessarily ordinary linear momentum. Their interpretation depends on the coordinates and Lagrangian. The Hamiltonian is obtained through a Legendre transform in the velocity variables:
[ H(q,p,t)=\sum_{i=1}^{n}p_i\dot q_i-L(q,\dot q,t), ]
where the velocities must be expressed in terms of (q,p,t). Thus, position and momentum become independent variables in the Hamiltonian description. (mitp-content-server.mit.edu)
The regular construction requires the momentum–velocity relation to be locally invertible. A sufficient condition is that the velocity Hessian matrix, with entries (\partial^2L/\partial\dot q_i\partial\dot q_j), be nonsingular. When this fails, additional constraint methods are needed rather than a straightforward inversion. (ocw.mit.edu)
For particles in Cartesian coordinates with a position-dependent potential,
[ H=\sum_a\frac{\mathbf p_a^2}{2m_a}+V(q). ]
Here the two terms are kinetic energy and potential energy. The identification of the Hamiltonian with physical total energy is not universal: time-dependent coordinate transformations can produce a Hamiltonian with additional terms. (ocw.mit.edu)
Hamilton’s equations
The evolution equations are
[ \dot q_i=\frac{\partial H}{\partial p_i}, \qquad \dot p_i=-\frac{\partial H}{\partial q_i}. ]
The partial derivatives hold the remaining independent variables fixed. These (2n) first-order differential equations replace the usual (n) second-order equations for the coordinates. Initial values of all coordinates and momenta determine a trajectory, subject to the usual existence and uniqueness conditions. For regular Lagrangians, the equations are equivalent to the Euler–Lagrange equations. (mitp-content-server.mit.edu)
A simple example is the harmonic oscillator, with mass (m) and spring constant (k):
[ H(q,p)=\frac{p^2}{2m}+\frac{kq^2}{2}. ]
Hamilton’s equations give (\dot q=p/m) and (\dot p=-kq), hence (\ddot q+(k/m)q=0). Its angular frequency is (\sqrt{k/m}). For positive (m,k), nonzero constant-energy trajectories are ellipses in the coordinate–momentum plane. (mitp-content-server.mit.edu)
Phase space and conservation laws
The (2n)-dimensional space of coordinates and momenta is phase space. A point represents an instantaneous state, while time evolution defines a flow through this space. Unlike configuration space, phase space includes the momentum information needed to distinguish states at the same position. (mitp-content-server.mit.edu)
The Poisson bracket of two functions is
[ {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). ]
Evolution can then be written as
[ \frac{df}{dt}={f,H}+\frac{\partial f}{\partial t}. ]
A time-independent quantity (f) is conserved if ({f,H}=0). In particular, (dH/dt=\partial H/\partial t), so an explicitly time-independent Hamiltonian is conserved. If (H) does not depend on a coordinate (q_i), its conjugate momentum (p_i) is conserved. (damtp.cam.ac.uk)
Liouville’s theorem states that Hamiltonian evolution preserves phase-space volume. Regions may stretch and deform without changing their volume, even for explicitly time-dependent Hamiltonians. This property underlies the evolution of ensembles in statistical mechanics. Ordinary dissipative motion, by contrast, generally does not preserve volume in its usual coordinate–momentum description. (damtp.cam.ac.uk)
Canonical transformations and Hamilton–Jacobi theory
A canonical transformation changes phase-space coordinates while preserving the form of Hamilton’s equations, with an appropriate transformation of the Hamiltonian. Such transformations can mix coordinates and momenta, making them more general than changes of configuration coordinates alone. They preserve Poisson brackets and the underlying symplectic structure, which encodes the pairing between coordinates and momenta. Time-dependent transformations also require a correction to the transformed Hamiltonian. (mitp-content-server.mit.edu)
The Hamilton–Jacobi equation expresses dynamics through a principal function (S(q,t)):
[ \frac{\partial S}{\partial t} +H\left(q,\frac{\partial S}{\partial q},t\right)=0. ]
Its solutions generate canonical transformations that can simplify the motion. For suitable integrable systems, this leads to action–angle coordinates: the actions remain constant while the angles advance uniformly. These coordinates provide a starting point for perturbation theory, although finding the required solutions is possible only in special cases. (mitp-content-server.mit.edu)
Quantum and computational connections
In quantum mechanics, canonical quantization replaces classical canonical variables with operators satisfying corresponding commutation relations. The classical Hamiltonian motivates a Hamiltonian operator, but quantization is not an unrestricted replacement rule: complicated classical expressions can introduce ordering issues and higher-order corrections. (damtp.cam.ac.uk)
Computationally, symplectic integrators approximate Hamiltonian evolution while preserving its symplectic structure. Splitting methods construct an approximate step by composing exactly solvable flows of simpler Hamiltonian components. Their structural preservation is distinct from exact conservation of the original Hamiltonian, which a numerical scheme generally does not guarantee. (mitp-content-server.mit.edu)