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 is fixed for all time. For a mass on a spring the force is , giving oscillation with .
Two quantities organize the motion. The kinetic energy and the potential energy , whose negative slope is the force, . Their sum, the total energy, stays constant as the particle moves:
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 and momentum 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 ; the second reproduces Newton’s law, since . So Hamilton’s equations contain exactly the same physics as , only now written symmetrically in and and driven entirely by the energy function .
Where the Lagrangian fits
Between Newton and Hamilton sits the Lagrangian , whose Euler-Lagrange equation follows from the principle of least action: the actual path makes the action stationary. The Hamiltonian is obtained from the Lagrangian by switching from velocity to momentum . We go straight to the Hamiltonian because it, not the Lagrangian, is what quantum mechanics quantizes. The least-action idea does return in Feynman’s path-integral formulation.
Phase space¶
In the Hamiltonian picture a complete classical state is a single point 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 .
For the harmonic oscillator , 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()
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 is the energy. The quantum Hamiltonian 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 : position is , momentum is , energy is . In quantum mechanics each becomes an operator, and the recipe (called canonical quantization) is direct:
Feeding this into gives the Schrodinger equation. The classical Hamiltonian literally becomes the quantum Hamiltonian by substituting operators for and .
The Poisson bracket becomes the commutator. Classical mechanics has a bracket that measures how two observables co-vary,
Quantization promotes this bracket to the commutator through the rule , which turns into
This single non-zero commutator is the seed of the uncertainty principle: because and 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 , apply Hamilton’s equations and show they combine into .
Solution
, so . And . Differentiating the first and substituting gives , which is Newton’s law with .
Problem 2: Hamiltonian of a falling body¶
Write the Hamiltonian for a mass in a uniform gravitational field, , and use Hamilton’s equations to find .
Solution
The momentum decreases at a constant rate, which is exactly .
Problem 3: Phase-space area¶
The harmonic-oscillator ellipse has semi-axes in and in . Show its enclosed area is .
Solution
The area of an ellipse is :
Setting this area equal to is the old Bohr-Sommerfeld quantization rule, and it reproduces .
Problem 4: A Poisson bracket¶
Compute for and interpret the result.
Solution
The bracket with the Hamiltonian generates time evolution, the classical shadow of in quantum mechanics.
Problem 5: Quantize a free particle¶
Apply canonical quantization to the free-particle Hamiltonian (no potential) and write the resulting and time-independent Schrodinger equation.
Problem 6: Check the commutator¶
Using , act with on a test function and confirm that .
Problem 7: Energy conservation¶
Show from Hamilton’s equations that whenever has no explicit time dependence, so the total energy is conserved.