The covariant formulation of Maxwell's equations unifies electric and magnetic fields into a single framework built on special relativity. Instead of treating and as separate vector fields that transform in complicated ways between reference frames, this approach packages them into a single tensor object that transforms cleanly under Lorentz transformations. The result is a set of equations that are manifestly Lorentz-invariant and far more compact than the traditional vector calculus form.
Covariant formulation overview
The central idea is to rewrite electromagnetism using the language of four-vectors and tensors in Minkowski spacetime. Because these mathematical objects have well-defined transformation rules under Lorentz boosts and rotations, any equation built from them is automatically consistent with special relativity.
Advantages vs traditional formulation
- Space and time are treated on equal footing, so Lorentz invariance is built in from the start rather than checked after the fact.
- The six components of and merge into a single antisymmetric tensor , cutting down on bookkeeping.
- Relativistic effects (length contraction of field lines, mixing of electric and magnetic fields under boosts) emerge naturally from the tensor transformation law.
- All four of Maxwell's equations reduce to just two tensor equations.
Relationship to special relativity
The formulation lives in four-dimensional Minkowski spacetime, where an event is labeled by coordinates . Every quantity in the theory (potentials, currents, fields) is expressed as a four-vector or tensor, meaning it transforms via Lorentz transformation matrices . This guarantees that the laws of electromagnetism take the same form in every inertial frame, which is exactly what the postulates of special relativity demand.
Mathematical framework
Four-vectors in spacetime
A four-vector has one timelike and three spacelike components and transforms under Lorentz transformations just like the position four-vector. Two key examples:
- Four-position:
- Four-velocity: , where is the Lorentz factor
The inner product of two four-vectors, computed with the metric tensor, is a Lorentz scalar (the same in all frames).
Metric tensor definition
The metric tensor defines the geometry of spacetime. In flat Minkowski spacetime with the signature:
All off-diagonal components vanish. The metric serves two roles:
- It computes invariant intervals:
- It raises and lowers tensor indices (see below).
Be careful with sign conventions. Some textbooks use . The physics is the same, but signs in component expressions for will differ.
Raising and lowering indices
The metric tensor converts between contravariant (upper) and covariant (lower) indices:
- Lowering:
- Raising:
In Minkowski spacetime this is straightforward: raising or lowering a spatial index leaves the component unchanged, while raising or lowering the time index flips the sign. For example, if , then .
Electromagnetic field tensor
The electromagnetic field tensor is a rank-2 antisymmetric tensor that encodes all six components of the electric and magnetic fields. It's defined as the antisymmetric derivative of the four-potential:
Tensor components and structure
Because , the diagonal entries vanish and only six independent components remain. Written as a matrix (using the convention):
The time-space components () carry the electric field, while the space-space components () carry the magnetic field. Specifically:
Electric and magnetic fields
You can read off the fields from the tensor:
- Electric field:
- Magnetic field:
The key conceptual point: and are not independent entities. They are different components of the same object, . What one observer calls a pure electric field, another observer (in a different frame) may see as a mixture of electric and magnetic fields.
Transformation properties
Under a Lorentz transformation , the field tensor transforms as:
This is the standard transformation law for a rank-2 contravariant tensor. It automatically mixes the and components in exactly the right way, reproducing the field transformation formulas you may have seen derived by other methods.

Maxwell's equations in covariant form
All four of Maxwell's equations collapse into two tensor equations. The source information is carried by the four-current density:
where is the charge density and is the current density.
Inhomogeneous equations
This single equation packages together two of Maxwell's equations:
- Setting gives Gauss's law:
- Setting (spatial) gives Ampère's law with Maxwell's correction:
Homogeneous equations
The square brackets denote antisymmetrization over all three indices. This equation encodes the other two Maxwell equations:
- Gauss's law for magnetism:
- Faraday's law:
An equivalent way to write the homogeneous equations uses the Levi-Civita tensor:
The homogeneous equations are automatically satisfied whenever is derived from a four-potential via . This is because the antisymmetric derivative of an antisymmetric derivative vanishes identically (a consequence of partial derivatives commuting).
Compact tensor notation
To summarize, the full content of Maxwell's equations in covariant form is:
- (inhomogeneous: sources generate fields)
- (homogeneous: no magnetic monopoles, Faraday's law)
These two equations replace the four traditional Maxwell equations and are manifestly Lorentz-invariant.
Electromagnetic stress-energy tensor
The stress-energy tensor describes how energy and momentum are distributed in the electromagnetic field and how they flow through space.
Tensor definition and components
The physical content of each block of components:
- is the electromagnetic energy density:
- is the energy flux (Poynting vector) divided by : , where
- is the Maxwell stress tensor, representing the flux of the -th component of momentum in the -th direction.
Note that is symmetric () and traceless in vacuum ().
Conservation of energy and momentum
The right-hand side is the negative of the Lorentz force density. In regions with no charges or currents (), this reduces to , which is a local conservation law: the energy and momentum stored in the electromagnetic field are conserved.
When sources are present, the right-hand side accounts for energy and momentum being transferred between the field and the charged matter.
Lorentz force in covariant form
The relativistic equation of motion for a charged particle is:
Here is the four-force (the rate of change of four-momentum with respect to proper time). The spatial components reproduce the familiar Lorentz force:
The time component gives the rate at which the field does work on the particle: .
Gauge invariance
The four-potential contains redundant degrees of freedom. Gauge invariance is the statement that this redundancy doesn't affect any physical observable.
Four-potential and gauge transformations
The four-potential combines the scalar and vector potentials:
A gauge transformation replaces with:
where is any smooth scalar function of spacetime. Because , the antisymmetry kills the terms:
So the physical fields and are completely unaffected.

Lorenz and Coulomb gauges
You can exploit gauge freedom to impose a condition on that simplifies calculations.
Lorenz gauge:
- This is the natural choice for relativistic problems because the condition itself is Lorentz-invariant.
- The field equations decouple into four independent wave equations: , where is the d'Alembertian.
Coulomb gauge:
- Useful in non-relativistic or radiation problems.
- The scalar potential satisfies Poisson's equation: (instantaneous response).
- The vector potential satisfies a modified wave equation.
- Not Lorentz-invariant, so less natural in a relativistic context.
Physical significance of gauge choice
No measurement can distinguish between two potentials related by a gauge transformation. The electric and magnetic fields, the Lorentz force, and the stress-energy tensor are all gauge-invariant. The choice of gauge is purely a matter of mathematical convenience: pick whichever gauge makes your particular problem easiest to solve.
Applications and examples
Electromagnetic waves in vacuum
With no sources () and in the Lorenz gauge, the potential satisfies:
This is the wave equation in four-dimensional spacetime. Its plane-wave solutions describe electromagnetic radiation propagating at speed , with and perpendicular to each other and to the propagation direction. The covariant form makes it transparent that these wave solutions are the same in every inertial frame.
Fields of moving charges
For a point charge moving with four-velocity , the four-current density is:
Solving the inhomogeneous equation with retarded boundary conditions yields the Liénard-Wiechert potentials. The resulting fields show characteristic relativistic features: field lines of a charge in uniform motion are compressed in the transverse direction (a manifestation of Lorentz contraction), and the electric and magnetic fields mix under boosts exactly as the tensor transformation law predicts.
Relativistic electrodynamics
The covariant formulation is indispensable for problems where charges move at speeds comparable to :
- Synchrotron radiation: Accelerating relativistic charges radiate in a narrow forward cone. The covariant framework handles the Lorentz boosts between the rest frame and the lab frame cleanly.
- Particle accelerators: The transformation of fields between frames is essential for designing beam optics and understanding beam-beam interactions.
- Relativistic Doppler effect: The four-vector description of the wave vector makes frequency shifts under boosts straightforward.
Connection to Lagrangian formalism
Electromagnetic Lagrangian density
The dynamics of the electromagnetic field can be derived from a single scalar Lagrangian density:
The first term is the free-field kinetic term (it contains the energy stored in and ). The second term couples the field to external sources. Because is a Lorentz scalar, the action is Lorentz-invariant.
Derivation of field equations
Applying the principle of least action () with as the dynamical variable:
-
Write the action:
-
Vary with respect to :
-
Integrate by parts (discard boundary terms):
-
Since is arbitrary, the integrand must vanish:
This recovers the inhomogeneous Maxwell equations. The homogeneous equations don't come from the action; they follow identically from the definition .
Note that the Lorenz gauge condition is not derived from the Lagrangian. It's an additional constraint you impose separately to fix the gauge freedom.
Noether's theorem and conserved quantities
Noether's theorem states that every continuous symmetry of the action yields a conserved current. For the electromagnetic Lagrangian:
- Spacetime translation invariance (the Lagrangian doesn't depend explicitly on ) gives conservation of energy and momentum, encoded in (in the absence of sources).
- Gauge invariance () leads to charge conservation: . You can verify this directly by taking of the inhomogeneous equation and using the antisymmetry of .
- Lorentz invariance yields conservation of angular momentum, including both orbital and "spin" contributions from the field.