Quantum Field Theory: Action and Lagrangians
The Quantum Field Theory page introduced field operators. We now need equations for their evolution and an algebra specifying how they combine.
Start from a classical action. Its variation gives the field equations, and its Hamiltonian supplies the generator of time evolution. We will apply this construction to scalar, electromagnetic, and spinor fields, obtaining the Klein–Gordon, Maxwell, and Dirac equations.
Principle of Least Action
To derive dynamics for the fields introduced on the previous page, begin with the particle construction in Classical Mechanics §2. For a path , define the action
The physical path makes stationary: its first-order change vanishes for every small variation with fixed endpoints. Despite the name “least action,” the stationary value need not be a minimum.
Perturb , expand the action to first order, and integrate the velocity term by parts. The endpoint condition removes the boundary term. Setting the remaining variation to zero gives
For , this reproduces Newton's equation. The advantage is that we can derive motion from one scalar function instead of specifying force components separately. We can use the same variational method with a relativistic Lagrangian.
The Lagrangian also determines the Hamiltonian. Its quantum version generates time evolution, as in The Dirac Equation §2, and its spectrum is central to the negative-energy problem in Relativistic QM §3.
From particles to fields
Replace the particle coordinate with a field configuration. In mechanics, is the unknown position. For a field , the unknown is the field value at every spatial point; labels those points.
The Lagrangian becomes a spatial integral of a Lagrangian density . Integrating over time gives the spacetime action
Stationarity gives one local equation for each independent field component:
The equation relates the field's change in time to its spatial variation. We derive it by varying the field inside the spacetime region while holding its boundary values fixed.
Deriving the field Euler–Lagrange equation
Perturb the field by , chosen to vanish on the spacetime boundary. This fixes the initial and final configurations and removes spatial boundary contributions. Expanding to first order gives
Remove the derivative from the variation. Integrate the second term by parts in each spacetime direction. The resulting surface term vanishes because is zero on the boundary. We obtain
We can choose freely inside any small region. For the integral to vanish for every such choice, its coefficient must vanish point by point:
This is the Euler–Lagrange equation for a field. The particle's time derivative has become a spacetime divergence.
Build Lorentz invariance into the action. If is a Lorentz scalar, then has the same value in every inertial frame. Its stationary configurations therefore satisfy covariant field equations.
For the scalar, vector, and spinor fields in the Fields section, we will use the simplest standard free-field densities: , , and . Their variations give the Klein–Gordon, source-free Maxwell, and Dirac equations.
To construct the Hamiltonian, follow Classical Mechanics §3. Define the momentum density conjugate to the field, , and take the Legendre transform:
The spatial integral is the total Hamiltonian; after quantization it becomes the operator .
The Hamiltonian uses a chosen time coordinate. As discussed in the Fields section, a state specifies the whole system at one instant. Defining that instant chooses a slicing of spacetime, and uses that frame's time derivative.
A boosted observer uses different time slices and hence different functions to describe the same field history. The covariant action and field equations remain valid. The Hamiltonian formulation expresses their evolution relative to the chosen frame.

A field history assigns a value to each spacetime point. A time slice gives one configuration; its conjugate momentum is also needed to specify the classical state.
The geometry of H
A point in state space specifies the system at one instant, as in Classical Mechanics §3. For a particle it is the pair . For a field it is the pair of functions , with one conjugate pair at each spatial point. This state space is infinite-dimensional.
The Hamiltonian assigns an energy to each configuration. Hamilton's equations give its evolution, and . Here a functional derivative measures how changes when we vary the field function locally.
A field history traces a curve through state space. For a well-posed evolution problem, the initial configuration and momentum determine that curve. The image below illustrates this flow for one oscillator mode.

The Hamiltonian has two related roles. It is the energy, conserved when there is no explicit time dependence. It also generates time translations through Hamilton's equations. Noether's theorem connects these roles: every continuous symmetry of the action carries a conserved quantity, and time-translation symmetry gives the conserved energy. The same theorem later supplies the conserved charge of QED.
After quantization, Heisenberg evolution takes the form from the Fields section. This is the operator version of classical Hamiltonian evolution.
Quantization also changes the algebra. Classical Mechanics §4 expressed evolution through the Poisson bracket, for an observable with no explicit time dependence. First Quantization introduced its canonical quantum replacement, , giving .
Apply that prescription to the conjugate fields at equal time. We get . The delta function expresses the local pairing of field and momentum. Expanding in oscillator modes then gives .
These are the operator relations needed on the previous page. Field Quantization derives the mode algebra from the canonical field commutator and fixes its normalization. Canonical quantization supplies the starting prescription; it is not itself a consequence of classical mechanics. For half-integer-spin fields, we will use anticommutators and examine their relation to spin and statistics.

Vary the field inside a small region while keeping boundary data fixed. Stationarity for every such variation gives the local Euler–Lagrange equation.
Lagrangians of QFT
Klein Gordon
Begin with a real scalar field of mass . We want its small disturbances to obey the relativistic energy–momentum relation. Choose a density quadratic in the field and its first derivatives, contracting indices to make it Lorentz invariant:
The derivative term is : time variation contributes kinetic energy, while spatial gradients contribute to the energy cost of a nonuniform configuration. Varying this density gives
The two derivatives in arise when we integrate the variation of the first-derivative terms by parts.
Varying the scalar density
The derivative term describes variations in spacetime, and the second term contains the mass. To interpret the derivative term, expand its repeated index:
Raise an index with the Minkowski metric, , as in Special Relativity §6. With , , and , the sum is
Here is the sum of the squares of the three spatial derivatives.
Differentiate the density to find the motion. Use
First differentiate with respect to . Rewrite the kinetic term with the metric so that both factors use lower-index derivatives. The product rule gives two equal terms because is symmetric:
Both derivative factors contribute. Treating and as independent would miss one term, because the metric relates them. Their factor of two cancels the in the density.
The mass term has no field derivatives. Applying the spacetime divergence to the result therefore gives
The operator is the d'Alembertian[1], the Minkowski-space counterpart of the Laplacian.
Now differentiate the mass term with respect to the field value:
Substitute both derivatives into the Euler–Lagrange equation:
This is the Klein–Gordon equation. Relativistic QM §2 introduced it and explained the difficulty of treating it as a single-particle probability equation. Here it governs a field.
Because it is second order in time, initial data must specify both and . With suitable boundary conditions, those data determine the evolution, with disturbances propagating within the light cone.
Maxwell
For electromagnetism, use the four-potential . Build its free density from the field tensor introduced in Special Relativity §8:
This density contains derivatives of the potential and no mass term. We will see how that absence enters the field equation.
Variation with respect to the potential gives
The factor compensates the repeated antisymmetric components when differentiating the two factors of . A term proportional to would instead add a massive-vector contribution; we have chosen the massless electromagnetic theory.
Varying the electromagnetic density
Apply the Euler–Lagrange equation to each component . First differentiate with respect to . Both factors of contribute:
Differentiate one tensor component at a time. Treat the sixteen entries as independent variables for this partial derivative. The component depends on two entries, with coefficients and .
A Kronecker delta is when its indices match and otherwise. The derivative is therefore
For example, has derivative with respect to , derivative with respect to , and zero for all other entries.
Raising the indices with the constant metric gives the second derivative:
Contract the first result with . Antisymmetry, , gives
The raised-index derivative gives the same result:
Each product contributes . Substituting both into the density derivative gives
Next differentiate with respect to itself. The density depends only on its derivatives, so
A mass term proportional to would contribute here and change the equation to the massive-vector, or Proca, equation. The electromagnetic density has no such term.
Combine the two derivatives. The Euler–Lagrange equation becomes
The derivative with respect to is zero. Removing the overall minus sign from the remaining term gives
This is the source-free version of from §8. The component gives Gauss's law; the three spatial components give Ampère–Maxwell's law. The other two Maxwell equations follow from the definition of in terms of .
Dirac
The spinor has four complex components and transforms between frames by the matrix from §5. The Dirac Equation introduced this field for massive spin- particles; it can also carry charge.
First find a Lorentz-invariant pairing. The Lagrangian must be a scalar. A candidate is , so test whether it has the same value in every frame.
The quantity is a density, the time component of a current. A boost mixes it with spatial current components, so we cannot use it as a scalar mass term. Its transformation matrix confirms this distinction.
Why the probability density is not a Lorentz scalar
Using , we obtain
For this to equal , we would need , or unitarity. Spatial rotations satisfy this: their spinor matrices have the form [2], with a Hermitian generator . Taking the adjoint reverses the exponent, so .
This is the same exponential construction used for in First Quantization. Lorentz boosts, however, do not act unitarily on the finite spinor components. We can check this directly.
The matrix acts on spinor components, just as acts on vector components. For a boost along the first spatial axis, §5 gives
Here is Hermitian, and the rapidity satisfies .
This follows from the general expression in §5, which also derives the hyperbolic-function expansion.
The boost exponent has no factor of . Because is Hermitian, is Hermitian and for a nonzero boost. Thus is not a Lorentz scalar.
In single-particle Dirac theory, this quantity is a probability density, the time component of a current. A boost mixes that density with the spatial current, so its value can change between frames.
Insert to obtain an invariant pairing. Define the Dirac adjoint . The useful transformation identity is
This identity gives , so . The matrices cancel between the two factors.
Checking the invariant spinor pairing
For rotations, this follows from unitarity and commutation with . For the boost above, anticommutes with , so ; also . The adjoint therefore transforms as
The transformation matrices now cancel in the pairing:
The matrix thus serves as the invariant pairing matrix for spinors. Its role here is analogous to the Minkowski metric in vector contractions: has the same value in every frame.
We can now write the free Dirac density:
The first term is kinetic and the second is the mass term. The gamma-matrix transformation identity from §5 makes transform as a spinor, so pairing it with gives a scalar.
Expanding the contracted Dirac derivative
Expanding the repeated index gives
No additional minus sign belongs in the spatial terms: the contraction already uses the upper-index matrices and lower-index derivatives .
Both terms now have the form and are Lorentz scalars. We can vary the action to obtain their equations of motion.
Vary and separately. For a complex field, varying its real and imaginary parts is equivalent to treating the field and its complex conjugate as independent variables during differentiation. Since differs from the conjugate by an invertible constant matrix, we can use and instead.
This is a choice of variables in the variational calculation. We then apply the Euler–Lagrange method introduced in Classical Mechanics §2 to each component.
Start with . There is no derivative of in this density, so its Euler–Lagrange equation reduces to
This is the Dirac equation. The kinetic term is linear in , so the variation leaves a first-order differential equation.
Next vary . Differentiating its derivative term and mass term gives
Insert both expressions into the Euler–Lagrange equation. Since the gamma matrices are constant, the spacetime derivative acts only on :
This is the adjoint Dirac equation. We could also obtain it by taking the adjoint of the Dirac equation and multiplying by . The two variations give mutually conjugate equations.
The Dirac equation is first order in both time and space, as sought in Relativistic QM §4. Initial data specify at one instant; an independent is unnecessary. This Lagrangian therefore reproduces the first-order dynamics constructed by factoring the Klein–Gordon operator in The Dirac Equation.
We have recovered the three free wave equations from actions and identified the conjugate variables used to quantize them. The next chapter carries out that step for scalar and spinor fields, checking that their excitations have positive energies and the appropriate particle statistics.
Next: Field Quantization
Distinguish a squared derivative value from a repeated derivative. multiplies first derivatives. By contrast, takes a second derivative. The Lagrangian contains the former; varying it produces the latter. ↩︎
Define a matrix or operator exponential by . The series gives and . If , then , so the exponential is unitary. ↩︎