Relativistic Hamiltonian and Canonical Formalism
The Lagrangian answers which worldline. The Hamiltonian answers how much energy — and in relativity it answers with something startling: the Legendre transform of the free-particle Lagrangian is not merely related to the energy-momentum relation, it is the energy-momentum relation. Turn the crank and falls out. Nothing about energy was assumed and the mass shell was not put in by hand: it is the output of a mechanical procedure applied to a Lagrangian obtained, in the relativistic Lagrangian for a free particle, from nothing but the length of a worldline. That is where most treatments stop, and the result has a defect impossible to unsee once noticed: is not a Lorentz scalar. It is the time component of a four-vector, obtained by singling out as the worldline parameter — the one choice a relativist spends the whole subject learning not to make. The repair: keep the parameter arbitrary, as the proper-time principle insists you must, and build a Lorentz-scalar Hamiltonian instead:
It is a scalar, it generates the correct dynamics — and it is zero. Not small: identically zero on every physical trajectory. A vanishing Hamiltonian appears to generate no evolution at all, and the appearance is a trap. What the formalism is saying is that the value of the relativistic Hamiltonian is a gauge artefact and its derivatives are the physics — and then the two halves snap together: and are one theory in two gauges. Fixing the parameter to makes the Legendre transform invertible; leaving it free leaves the Hamiltonian zero.
- Legendre-transform : the canonical momentum is , and . The energy-momentum relation is not assumed — it is derived.
- The transform is provably legitimate: the Hessian is positive-definite, , so is a bijection from the ball onto all of momentum space.
- Hamilton's equation says velocity is momentum over energy, and enforces by itself, because always. But is not covariant: it privileges . Keep the parameter free and you get the scalar , which vanishes on shell — in signature , with .
- Quantise the constraint, , and becomes — the Klein-Gordon equation.
- KEY IDEA — the two Hamiltonians are one theory in two gauges. Choosing as the worldline parameter breaks reparametrisation invariance, and that is exactly what makes the Legendre transform regular and non-zero. Keep the parameter free and the transform is singular and is identically zero. The Hamiltonian's VALUE is a gauge choice; only its DERIVATIVES are physics.
A Legendre transform trades a function's dependence on a variable for dependence on the slope in that variable. Geometrically, is minus the intercept of the tangent to whose slope is — well defined exactly when is strictly convex, so slope and point determine one another. The relativistic free Lagrangian is strictly convex on the whole interior of the light cone and its Hessian never degenerates, so the transform returns : the energy-momentum relation is the Legendre transform of the arc length of a worldline. But that Lagrangian was already gauge-fixed — it came from the reparametrisation-invariant action of the proper-time principle by the act of choosing to label the worldline. Undo that choice and the transform becomes singular: the Hessian degenerates, stops being invertible, and the Hamiltonian collapses to zero identically. Both are true of the same free particle. Which you meet depends entirely on whether you told the worldline how to count.
Where this lives today
Relativistic quantum mechanics. Imposing the mass-shell constraint on the state is the derivation of the Klein-Gordon equation. The alternative, substituting operators into , is a dead end: the square root of is non-local and treats space and time asymmetrically. Dirac's response — factorise the constraint into something linear in , at the price of matrices — gave the Dirac equation and predicted antimatter. Both roads begin at .
Constrained dynamics, and gravity. Dirac's 1950 analysis was written with general relativity in view, and there the vanishing Hamiltonian becomes the central structural fact — the ADM Hamiltonian constraint, and the Wheeler-DeWitt equation. The "problem of time" in quantum gravity is this article's vanishing Hamiltonian, scaled up.
The physical picture
Hold two pictures side by side. In the first you are a laboratory with a clock on the wall, and you use it. Noether hands you the generator of time translation, — the energy: concrete, and the number in every collision calculation ever done. What you paid for it is covariance, since a laboratory moving relative to you gets a different number. In the second you refuse to have a clock. You have only the worldline, and may label its points any way you like. Ask what generates evolution in the label: the answer must be a Lorentz scalar, since the label is nobody's time — and the formalism looks like it refuses to answer. The generator is zero. It is not a refusal. Freedom to relabel the worldline is a redundancy, and whenever a theory carries one, the generator of evolution in the redundant parameter is constrained to vanish. Reparametrisation invariance forces the way gauge invariance forces Gauss's law: the zero is not the absence of dynamics but the presence of a symmetry. And the dynamics is all still there, because Hamilton's equations do not use the value of — they use its derivatives:
A function can vanish everywhere on a surface and have perfectly good derivatives off it, and it is the off-shell derivatives that Hamilton's equations sample. Impose the constraint only after you have differentiated — set first and the equations of motion are . The two pictures relate in one line: the lab Hamiltonian is what you get by solving for , and solving a constraint is gauge fixing. The non-zero energy of the first picture and the vanishing scalar of the second are one object, seen before and after a gauge is chosen.
The core equations
Everything below is in the signature , re-derived and never transcribed, so a timelike vector has positive norm:
There is no minus sign under any square root here, and units are SI throughout. The Lagrangian we start from — derived in the relativistic Lagrangian for a free particle, not assumed — is .
The canonical momentum, the slope of in :
For a free particle canonical and mechanical momentum coincide. In an electromagnetic field they do not — they differ by — the owned business of the charged-particle Lagrangian, recalled here and not re-derived.
The Hamiltonian, the Legendre transform:
Hamilton's equations, with as the evolution parameter:
The first says — velocity is momentum over energy — and since for any , it automatically returns however large becomes. The speed limit is not bolted onto the formalism; it is a corollary of the shape of .
The covariant Hamiltonian, which this article owns:
The non-relativistic expansion, and where it dies. Writing and expanding ,
Rest energy, then Newton, then the mass-velocity correction — measured, and weighed below. But the series converges only for :
and above it does not converge at all: not that the next term is large — there is no sum. Truncations of a divergent series do not merely lose accuracy; they can lose the sign. Differentiating the truncation in units gives , which peaks at only , turns over, and crosses zero at . Beyond that the four-term Hamiltonian sends the particle backwards — as a real proton does below. The symbol is Dirac's and does not mean "approximately". It means weakly equal: zero on the constraint surface, never to be set to zero inside a derivative. Poisson brackets carry the structure into quantum mechanics:
Working it out
The goal is to obtain from and — the part almost always omitted — to prove the recipe is legitimate. A Legendre transform may not be performed on any function you like: it requires that velocity determine momentum and vice versa, a genuine proof obligation. Discharging it uncovers the structural fact the article turns on — the transform is regular here because the Lagrangian has already been gauge-fixed.
Step 1. Take the slope.
Why: the is not inserted — it falls out of differentiating the square root.
Step 2. Check that the slope determines the point. The transform is well defined iff is invertible, which by the inverse function theorem holds wherever the Hessian of is non-singular:
Why: , the one derivative in this subject worth memorising.
Step 3. Diagonalise. The Hessian is a rank-one update of a multiple of the identity, so its eigenvectors are immediate. Along : . Transverse to , twice: . Hence
Why this matters: every eigenvalue is strictly positive, so is strictly convex on the whole open ball and the determinant never vanishes there. The transform is regular. We are allowed.
Step 4. Invert. As runs from to , runs from to : the ball maps onto all of , bijectively — momentum unbounded, velocity not. Explicitly and .
Step 5. Transform. . Factor and use :
Why the cancels exactly: and differ by the full , and for this Lagrangian that difference leaves the rest energy standing.
Step 6. Re-express in the natural variable. A Hamiltonian must be a function of . Form the combination that kills — factorised, never as a subtraction of two large nearly-equal squares:
The energy-momentum relation was never assumed. It is the Legendre transform of a length. In our signature this is exactly — a positive invariant, as a timelike vector must have.
Go deeper · Derivation B · 2 minThe covariant Hamiltonian: a scalar generator that vanishes — and, quantised, IS Klein-Gordon
This is the article's owned result. Everything above privileged the laboratory clock: was the evolution parameter and transforms as the time component of a four-vector, not a scalar. We now build the Hamiltonian a relativist would have written first — a Lorentz scalar generating evolution in a parameter belonging to nobody — and watch it vanish. The vanishing is the discovery, not the failure.
Step 1. Demand a scalar. The generator must be a Lorentz scalar built from and ; quadratic in momentum there is essentially one candidate, so write , the and the constant fixed by demanding that Hamilton's equations return a correctly normalised four-velocity.
Step 2. First Hamilton equation. With and ,
Why the constant is invisible here: does not depend on , so it contributes nothing here. It is doing a different job, which Step 4 makes plain.
Step 3. Second Hamilton equation. has no explicit , so : the four-momentum is conserved and is straight — the free particle in full covariant dress.
Step 4. Impose the normalisation — and watch collapse. Step 2 gives . But the four-velocity is normalised — a kinematic identity, not a dynamical statement — and in our signature that reads . Therefore
The Hamiltonian is zero on every physical trajectory, and the constant was chosen to make it so. The sign is the signature working for us: transcribe a mostly-plus metric instead and you would have , forcing . Same physics, different bookkeeping — and mixing the two is how the mass shell acquires a spurious minus sign in half the literature.
Step 5. Why it is not a catastrophe. Steps 2 and 3 differentiated before the constraint was imposed. Off the constraint surface is an ordinary non-zero function with non-zero gradient ; it merely vanishes on the surface, and the surface is where physics lives. Differentiate first, impose second. Why it had to vanish: the action of the proper-time principle is invariant under relabelling the worldline; that article proves by Euler's theorem that the generator of evolution in a pure-gauge parameter must vanish, and owns the result. Here we meet its Hamiltonian face.
Step 6. Quantise the constraint. Promote and demand — Dirac's rule for a first-class constraint — that the constraint annihilate the physical state. Then , so becomes
or, with , the familiar .
This is the Klein-Gordon equation. It was not postulated, and not guessed by substituting operators into — a disaster, since the square root of a differential operator is non-local. It is the quantised mass-shell constraint, and the constraint is the covariant Hamiltonian. The most embarrassing feature of relativistic Hamiltonian mechanics — that its Hamiltonian is zero — is the exact feature that hands you relativistic quantum mechanics.
Limiting cases
| regime | what becomes | what it tells you |
|---|---|---|
| Newton, plus a rest energy classical mechanics never saw, plus the measured mass-velocity term | ||
| , | massless dispersion; for any | |
| the series diverges | : truncations here are not approximations but nonsense | |
| covariant form | on shell, in every frame — the constraint is the mass shell |
Worked examples
1 · A 1.00 GeV proton, and three Hamiltonians that disagree violently
Take a proton, , with kinetic energy — the sort a proton-therapy synchrotron delivers:
Get the momentum from the mass shell, factorised, so no two nearly-equal large numbers are ever subtracted: . Now ask each Hamiltonian for the velocity, through its own Hamilton equation .
The exact one. , i.e. , and .
The Newtonian one. gives — the proton at 146 % of the speed of light. Not a small error, and not one that better arithmetic improves: the formalism has left the domain on which it means anything.
The truncated relativistic one. Surely — which is relativistic, and does contain the leading correction — does better? Its Hamilton equation gives , and with :
It reports the proton moving backwards, at 1.146 times the speed of light. And this is no exotic regime: is a routine therapy proton, and the convergence radius was passed back at , i.e. . Past the convergence radius a truncation does not degrade gracefully — it inverts.
2 · The mass-velocity correction, weighed in hydrogen
The term is not decoration: it is the leading relativistic correction to an atomic electron's kinetic energy, and it shifts spectral lines measurably. Its first-order expectation in the hydrogen ground state, with :
With and ,
a fractional shift of against the binding energy — routine to resolve. A term obtained by Taylor-expanding a square root that came out of a Legendre transform of the arc length of a worldline is visible in a tabletop spectrometer. Two honesty notes, because this is where articles overclaim. is one of three contributions to hydrogen's fine structure — the Darwin term and spin-orbit coupling are the others, all of order — so the mass-velocity piece alone is not the observed splitting. And is a quantum-mechanical input: relativity supplies the operator, the atom supplies the state. What is ours is the coefficient , and that is what the spectrum checks.
3 · The covariant Hamiltonian, and why your computer will lie to you about it
vanishes on shell, and it is tempting to verify that numerically. Here the physics sets a trap so clean it is almost a gift. On 15 October 1991 the Fly's Eye detector in Utah recorded a cosmic-ray proton of energy — the Oh-My-God particle, still the most energetic ever seen. Its Lorentz factor is
and, computed stably from rather than by subtracting a number from ,
Now check the mass shell. You want , but the answer you are looking for is smaller than the numbers you are subtracting by a factor of
Double-precision floating point carries a relative precision of about . The signal sits eight orders of magnitude below the noise floor of the subtraction. In `float64`, for this proton evaluates to exactly — so a naive check happily reports , confirming the constraint for entirely the wrong reason. It is not seeing the mass shell; it is failing to see it. Swap the proton's mass for an electron's and the float64 answer does not budge: still . Set the mass to zero and it still does not budge. A test that returns the same answer whatever you do to its input is not a test. At 50 decimal digits the same computation returns to forty-odd significant figures, and it moves the instant you perturb the mass. This is why every number here is computed with `mpmath` at `dps = 50`, and why the verification script perturbs its inputs and asserts the outputs move. A green tick from a floating-point catastrophe is worth nothing.
Physics of the portrait
Origins · 2 minLegendre transformation and how this was discovered
The transformation is named for a man who was not doing mechanics. Adrien-Marie Legendre, in a memoir of 1787 to the Paris Académie — Mémoire sur l'intégration de quelques équations aux différences partielles — was trying to integrate the partial differential equation of minimal surfaces, and found that trading a function's dependence on a variable for its dependence on the slope in that variable turned a stubbornly nonlinear equation linear. That is all it was: a change of variables that straightens an equation — no energy in it, no momentum, no physics whatever, just geometry about the tangents to a convex curve, which can be reconstructed from the envelope of its tangents. William Rowan Hamilton supplied the interpretation, in the two Philosophical Transactions memoirs of 1834 and 1835 both titled On a General Method in Dynamics: trade velocities for momenta, and the second-order Lagrange equations become the first-order canonical pair. Siméon-Denis Poisson had laid the bracket down a quarter-century earlier (Journal de l'École polytechnique, October 1809) — worth recording, because the historical order runs bracket-before-canonical-equations, the reverse of the pedagogical one. Relativity then did something its inventors could not have anticipated. Max Planck, in 1906, wrote the relativistic kinetic potential and Legendre-transformed it, and out came — the energy, mass included. A convenience of Newtonian mechanics had become the derivation of . Then it broke, in the interesting way: applied to the covariant action, whose parameter is arbitrary, the transform is singular — the Hessian degenerates and the Hamiltonian is identically zero. That degeneracy is not a defect; it is the transformation reporting a gauge symmetry. Paul Dirac made it precise in Generalized Hamiltonian Dynamics (Canadian Journal of Mathematics 2, 129, 1950), inventing constrained Hamiltonian mechanics — primary constraints, first class, weak equality — with quantum gravity already in his sights. Legendre's tangent-line trick, from a memoir on minimal surfaces, turns out to be the instrument that measures redundancy in a physical description.
Going further
Next, put the particle in a field, where the canonical momentum stops coinciding with the mechanical one: the Lagrangian of a charged particle in an electromagnetic field owns that derivation and the gauge argument. For the invariant-mass technology the mass shell makes possible, see relativistic collision kinematics; for the spin dynamics the covariant formalism supports, the BMT equation. And for what happens when you take and defiantly set , see tachyons and superluminal particles — where this article's Hamiltonian grows a barrier with two sides.
If the covariant Hamiltonian is zero, doesn't that mean nothing happens?
No — and this is the misunderstanding the article exists to kill. Hamilton's equations do not use the value of the Hamiltonian; they use its derivatives. vanishes on the constraint surface, but its gradient there is — the four-velocity, the most dynamical object in the theory. A function can vanish identically on a surface and have a perfectly good derivative transverse to it. What the vanishing does mean is that the evolution parameter is not physical: there is no preferred time along the worldline, only the worldline.
Why can't I just replace p with an operator inside the square root and be done with it?
Because the square root of a differential operator is non-local. Expanding in powers of produces derivatives of every order, and an equation with infinitely many spatial derivatives couples arbitrarily distant points — not manifestly covariant, not obviously causal, and first order in against infinite order in , exactly the asymmetry relativity forbids. Quantising the constraint instead gives the local, second-order, manifestly covariant Klein-Gordon equation, and Dirac's factorisation of the same constraint gives his. The square root is the obvious thing to try, and a dead end.
Is the canonical momentum always gamma m v?
Only for a free particle. Canonical momentum is defined as , so it depends on the Lagrangian — and any velocity-dependent interaction breaks its coincidence with the mechanical momentum . In an electromagnetic field the term contributes and : the canonical momentum is not gauge-invariant and is not what a detector measures, while the mechanical momentum is both. That distinction is owned by the charged-particle Lagrangian. It is also the deepest booby-trap here, because both are called "momentum" and both are written .
Why does this article insist on plus m squared c squared rather than minus?
Because we use , in which a timelike four-vector has positive norm. A four-momentum is timelike for any massive particle, so . The opposite convention is equally consistent and gives ; the physics is identical, only the bookkeeping differs. What is not consistent is mixing them — common enough to be worth a rule: check the sign of in any source before copying an equation out of it. If it reads you are in our convention; if , every mass-shell sign in that source is flipped relative to ours. Every metric here was re-derived from , never transcribed.
What exactly is being constrained in the phrase mass-shell constraint?
The phase space. Unconstrained, a relativistic particle's phase space would be the eight-dimensional set of all . But the four components of are not independent: they satisfy , which cuts momentum space to a three-dimensional hyperboloid — the mass shell, the constraint surface, where physical states live. It is first class in Dirac's classification: it generates a gauge transformation rather than restricting initial data, and the transformation it generates is precisely reparametrisation of the worldline. The circle closes — the constraint exists because of the gauge freedom, and generates it.
Does the vanishing Hamiltonian have anything to do with the problem of time in quantum gravity?
It is the same phenomenon, in the simplest system that exhibits it. Any theory whose action is invariant under reparametrisation of its evolution parameter has a Hamiltonian that vanishes on shell, and the free relativistic particle is the minimal example. General relativity is invariant under reparametrisation of all four coordinates, so its Hamiltonian is a sum of constraints and vanishes too; quantising gives , the Wheeler-DeWitt equation, which contains no and so appears to describe a universe in which nothing evolves. The resolutions on offer for the particle — evolution is relative to an internal clock; the parameter was never physical — are the resolutions on offer for gravity.