JOVANA
Explore Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

From Lagrangian to Hamiltonian: Why Phase Space?

You already know the least-action route to the equations of motion. Here we trade velocity for momentum, meet the Hamiltonian, and discover why viewing motion as a flow in phase space changes everything that follows.

A third way to do mechanics

Newton framed mechanics with forces. Lagrange rebuilt it from the principle of least action, turning motion into the Euler–Lagrange equations on configuration space. Hamilton offers a third, fully equivalent picture — and it is the one a graduate physicist reaches for most, because its geometry is the richest.

The essential shift is in what counts as the state. Lagrangian mechanics describes a system by positions and velocities (q,\dot q): for n coordinates you get n coupled second-order differential equations. Hamiltonian mechanics describes it by positions and momenta (q,p) instead — giving $2n$ first-order equations. Doubling the variables while halving the order is not a cosmetic trade; it produces a beautifully symmetric structure.

Trading velocity for momentum — the Legendre transform

First define the generalized (conjugate) momentum as the derivative of the Lagrangian with respect to each generalized velocity. For a free particle this reduces to the familiar mv, but in general it can look nothing like 'mass times velocity'.

p_i = \frac{\partial L}{\partial \dot q_i}

The momentum conjugate to coordinate q_i.

Now we want to swap \dot q for p as our independent variable. The clean way to change which variable a function 'lives on' is the Legendre transformation — the very same tool that turns internal energy into free energy in thermodynamics. Applied to L, it produces the Hamiltonian H.

H(q,p,t) = \sum_i p_i\,\dot q_i - L(q,\dot q,t)

The Hamiltonian as the Legendre transform of the Lagrangian.

What the Hamiltonian usually is

For the most common case — time-independent constraints, kinetic energy quadratic in the velocities, and a velocity-independent potential — the Hamiltonian equals the total energy, kinetic plus potential. This is why H so often just is the energy of the system.

H = T + V = \frac{p^2}{2m} + V(q)

The Hamiltonian of a particle in a potential — energy in phase-space variables.

Motion as a flow in phase space

Here is the payoff. Collect all positions and momenta into a single point in a $2n$-dimensional space — phase space. The entire instantaneous state of the system is that one point. As time runs, the point traces a unique curve, and because the equations are first-order, exactly one trajectory passes through each point: trajectories never cross. Determinism becomes geometry.

Contrast this with configuration space, where a trajectory can cross itself — a pendulum passes through the same angle twice each swing, once going each way. In phase space those two crossings separate, because the momentum (the direction of travel) is now part of the state. No information is hidden; the full future is encoded in the present point.

This single reframing is why Hamiltonian mechanics is the hub of modern physics. A cloud of phase-space points is exactly a statistical ensemble, so this picture feeds directly into statistical mechanics. And the canonical (q,p) pairing is precisely the structure that quantizes into the operators of quantum mechanics. Over the next four guides we build that machinery — Hamilton's equations, Liouville's theorem, Poisson brackets, and Hamilton–Jacobi theory — and watch each bridge appear.