Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Classical Mechanics: From Newton to Hamilton

Before quantum mechanics we need one idea from classical physics done properly: the Hamiltonian. Newton’s laws are what you learned first, but quantum mechanics is not built on forces. It is built on energy, on the variables position and momentum, and on a bracket that becomes the commutator. This page explains why we reformulate classical mechanics and how that reformulation hands us the Schrodinger equation.

Newton’s mechanics

Newton’s second law says a force changes a particle’s momentum:

Give the force and the initial position and velocity, and the trajectory x(t)x(t) is fixed for all time. For a mass on a spring the force is F=kxF = -kx, giving oscillation x(t)=Acos(ωt)x(t) = A\cos(\omega t) with ω=k/m\omega = \sqrt{k/m}.

Two quantities organize the motion. The kinetic energy T=12mv2T = \tfrac{1}{2}mv^2 and the potential energy V(x)V(x), whose negative slope is the force, F=dV/dxF = -dV/dx. Their sum, the total energy, stays constant as the particle moves:

E=T+V=12mv2+V(x)=constant.E = T + V = \tfrac{1}{2}mv^2 + V(x) = \text{constant}.

Newton’s picture is intuitive, but it is awkward for quantum mechanics: it centers on force, a vector that is hard to generalize to abstract coordinates, and it hides the energy, which is the quantity quantum mechanics actually quantizes. We want a formulation built directly on energy.

The Hamiltonian reformulation

The trick is to stop using position and velocity, and instead use position qq and momentum p=mvp = mv as the two independent variables. The Hamiltonian is the total energy written in terms of these:

All of the dynamics now follows from a single, strikingly symmetric pair of first-order equations:

The first equation just restates p=mq˙p = m\dot q; the second reproduces Newton’s law, since H/q=dV/dq=F-\partial H/\partial q = -dV/dq = F. So Hamilton’s equations contain exactly the same physics as F=maF = ma, only now written symmetrically in qq and pp and driven entirely by the energy function HH.

Phase space

In the Hamiltonian picture a complete classical state is a single point (q,p)(q, p) in phase space, the plane of position versus momentum. As time runs, the point moves along a curve, and because energy is conserved that curve is a contour of constant HH.

For the harmonic oscillator H=p22m+12mω2q2H = \frac{p^2}{2m} + \frac{1}{2}m\omega^2 q^2, the constant-energy contours are ellipses. A low-energy state traces a small ellipse near the origin; higher energy means a bigger ellipse.

Source
import numpy as np
import matplotlib.pyplot as plt

m, omega = 1.0, 1.0
q = np.linspace(-3, 3, 400)
p = np.linspace(-3, 3, 400)
Q, P = np.meshgrid(q, p)
H = P**2 / (2 * m) + 0.5 * m * omega**2 * Q**2

fig, axes = plt.subplots(1, 2, figsize=(11, 4.2))

# Phase-space energy contours (ellipses)
levels = [0.2, 0.5, 1.0, 1.8, 2.8]
cs = axes[0].contour(Q, P, H, levels=levels, cmap='viridis')
axes[0].clabel(cs, fmt='E=%.1f', fontsize=8)
# One trajectory, arrow shows clockwise flow
E = 1.0
theta = np.linspace(0, 2 * np.pi, 200)
axes[0].plot(np.sqrt(2 * E) * np.cos(theta), np.sqrt(2 * E) * np.sin(theta), 'k', lw=1)
axes[0].annotate('', xy=(np.sqrt(2 * E) * np.cos(0.3), np.sqrt(2 * E) * np.sin(0.3)),
                 xytext=(np.sqrt(2 * E), 0.0),
                 arrowprops=dict(arrowstyle='->', color='k'))
axes[0].set_xlabel('position q')
axes[0].set_ylabel('momentum p')
axes[0].set_aspect('equal')
axes[0].set_title('Fig.1a Phase space: energy contours are ellipses')

# Time view: position and momentum oscillate, 90 deg out of phase
t = np.linspace(0, 4 * np.pi, 400)
axes[1].plot(t, np.sqrt(2 * E) * np.cos(t), color='#2e4057', lw=2, label='q(t)')
axes[1].plot(t, -np.sqrt(2 * E) * np.sin(t), color='#d1495b', lw=2, label='p(t)')
axes[1].axhline(0, color='gray', lw=0.6)
axes[1].set_xlabel('time t')
axes[1].legend(fontsize=9)
axes[1].set_title('Fig.1b Newton view: q and p oscillate in time')

plt.tight_layout()
plt.show()
<Figure size 1100x420 with 2 Axes>

The two panels are the same motion in two languages: Hamilton’s phase-space ellipse (left) and Newton’s time trajectories (right). Quantum mechanics will replace the sharp phase-space point with a spread-out probability cloud, because position and momentum can no longer be pinned down at once.

Why the Hamiltonian is the bridge to quantum mechanics

Three features of the Hamiltonian formulation carry over almost verbatim into quantum mechanics.

Energy is the central object. Quantum mechanics quantizes energy, and HH is the energy. The quantum Hamiltonian H^\hat H is what appears in the Schrodinger equation, and its eigenvalues are the allowed energy levels.

States and observables. A classical observable is any function of (q,p)(q, p): position is qq, momentum is pp, energy is H(q,p)H(q,p). In quantum mechanics each becomes an operator, and the recipe (called canonical quantization) is direct:

Feeding this H^\hat H into itΨ=H^Ψi\hbar\,\partial_t\Psi = \hat H\Psi gives the Schrodinger equation. The classical Hamiltonian literally becomes the quantum Hamiltonian by substituting operators for qq and pp.

The Poisson bracket becomes the commutator. Classical mechanics has a bracket that measures how two observables co-vary,

{A,B}=AqBpApBq,so{q,p}=1.\{A, B\} = \frac{\partial A}{\partial q}\frac{\partial B}{\partial p} - \frac{\partial A}{\partial p}\frac{\partial B}{\partial q}, \qquad \text{so}\quad \{q, p\} = 1.

Quantization promotes this bracket to the commutator through the rule {A,B}1i[A^,B^]\{A,B\} \to \frac{1}{i\hbar}[\hat A, \hat B], which turns {q,p}=1\{q,p\}=1 into

This single non-zero commutator is the seed of the uncertainty principle: because x^\hat x and p^\hat p do not commute, no state can have a definite position and a definite momentum at the same time. The operators and differential equations page showed why non-commuting operators behave this way; here we see where that particular commutator comes from.

Problems

Problem 1: Recover Newton from Hamilton

For H=p22m+V(q)H = \frac{p^2}{2m} + V(q), apply Hamilton’s equations and show they combine into mq¨=dV/dqm\ddot q = -dV/dq.

Problem 2: Hamiltonian of a falling body

Write the Hamiltonian for a mass mm in a uniform gravitational field, V(z)=mgzV(z) = mgz, and use Hamilton’s equations to find p˙\dot p.

Problem 3: Phase-space area

The harmonic-oscillator ellipse p22m+12mω2q2=E\frac{p^2}{2m} + \frac{1}{2}m\omega^2 q^2 = E has semi-axes 2mE\sqrt{2mE} in pp and 2E/mω2\sqrt{2E/m\omega^2} in qq. Show its enclosed area is 2πE/ω2\pi E/\omega.

Problem 4: A Poisson bracket

Compute {q,H}\{q, H\} for H=p22m+V(q)H = \frac{p^2}{2m} + V(q) and interpret the result.

Problem 5: Quantize a free particle

Apply canonical quantization to the free-particle Hamiltonian H=p2/2mH = p^2/2m (no potential) and write the resulting H^\hat H and time-independent Schrodinger equation.

Problem 6: Check the commutator

Using p^=id/dx\hat p = -i\hbar\,d/dx, act with [x^,p^][\hat x, \hat p] on a test function f(x)f(x) and confirm that [x^,p^]f=if[\hat x, \hat p]f = i\hbar f.

Problem 7: Energy conservation

Show from Hamilton’s equations that dH/dt=0dH/dt = 0 whenever HH has no explicit time dependence, so the total energy is conserved.