Physics
Universityelectromagnetism

Maxwell's Equations

Four equations, one contradiction hiding inside them, and the single missing term James Clerk Maxwell added to fix it — turning a pile of separately-discovered laws into the complete, self-consistent theory of classical electromagnetism.

Before this, you should know:

Imagine a capacitor being charged: current flows in through one wire, charge piles up on one plate, and current flows back out the other wire, with nothing but empty space — no wire, no charge carriers — sitting in the gap between the plates. Now try to apply Ampère's law to a loop that circles the wire feeding the capacitor. Ampère's law says Bdl=μ0Ienc\oint\vec B\cdot d\vec l = \mu_0 I_{\text{enc}}, and it insists that IencI_{\text{enc}} is "the current through any surface bounded by the loop" — but it never specifies which surface, and Stokes' theorem's whole promise was that it wouldn't matter. Stretch a flat disk across the loop, punctured by the wire: it reports Ienc=II_{\text{enc}}=I. Stretch a different surface across the same loop instead, one that bulges out and slips between the capacitor's plates without ever touching the wire: it reports Ienc=0I_{\text{enc}}=0, since no charge carrier ever crosses the gap. Same loop, same law, two different answers. Something in Ampère's law, as written so far, is broken.

Finding the crack: charge conservation

The break shows up cleanly if you take the divergence of Ampère's law in its differential form, ×B=μ0J\nabla\times\vec B=\mu_0\vec J. The divergence of any curl is identically zero — a general fact about vector fields, not specific to this one — so the left side vanishes no matter what B\vec B is:

(×B)=0μ0J=0J=0.\nabla\cdot(\nabla\times\vec B) = 0 \quad\Longrightarrow\quad \mu_0\,\nabla\cdot\vec J = 0 \quad\Longrightarrow\quad \nabla\cdot\vec J = 0.

But that can't be a general law. Charge is locally conserved — it doesn't vanish or teleport — and the precise statement of that fact is the continuity equation: whatever current density flows outward from a point drains the charge density piled up there, at exactly the matching rate,

J=ρt.\nabla\cdot\vec J = -\frac{\partial\rho}{\partial t}.

Inside the charging capacitor, charge is actively accumulating on the plate: ρ/t0\partial\rho/\partial t\neq 0, so J0\nabla\cdot\vec J\neq 0 there. Ampère's law, as Ampère left it, silently demanded J=0\nabla\cdot\vec J=0 everywhere, always — a statement that's only true for steady currents that never pile up charge anywhere. It's not that Ampère's law is wrong; it's incomplete, built for a special case (magnetostatics) that the charging-capacitor problem simply isn't.

Maxwell's fix: the displacement current

Maxwell's move was to add a term to Ampère's law chosen specifically to repair this — and Gauss's law hands you exactly the right one. Recall E=ρ/ϵ0\nabla\cdot\vec E=\rho/\epsilon_0 from Gauss's law. Add the term μ0ϵ0E/t\mu_0\epsilon_0\,\partial\vec E/\partial t to the right side of Ampère's law:

×B=μ0J+μ0ϵ0Et.\boxed{\nabla\times\vec B = \mu_0\vec J + \mu_0\epsilon_0\frac{\partial\vec E}{\partial t}.}

The added piece, ϵ0E/t\epsilon_0\,\partial\vec E/\partial t, is called the displacement current density — not an actual flow of charge, but a changing electric field that turns out to source a magnetic field exactly as if it were one. In the capacitor's gap, no charge crosses, but the electric field between the plates is growing every instant the capacitor charges, and that growing E\vec E supplies precisely the missing piece: the bulging surface, which sees zero conduction current, sees a nonzero displacement current instead, and the two surfaces once again agree. The worked example below checks, in full, that this fix does exactly the job it was built for: restoring the continuity equation as an automatic consequence rather than a special-case accident.

The four equations

With this correction in hand, everything discovered across this entire branch of the track collapses into four equations, each a local, differential statement built from nothing but \nabla\cdot and ×\nabla\times — the divergence and curl introduced back at the start of the mathematical-methods track:

E=ρϵ0(Gauss’s law)B=0(no magnetic monopoles)×E=Bt(Faraday’s law)×B=μ0J+μ0ϵ0Et(Ampeˋre-Maxwell law)\begin{aligned} \nabla\cdot\vec E &= \frac{\rho}{\epsilon_0} &&\text{(Gauss's law)}\\[4pt] \nabla\cdot\vec B &= 0 &&\text{(no magnetic monopoles)}\\[4pt] \nabla\times\vec E &= -\frac{\partial\vec B}{\partial t} &&\text{(Faraday's law)}\\[4pt] \nabla\times\vec B &= \mu_0\vec J + \mu_0\epsilon_0\frac{\partial\vec E}{\partial t} &&\text{(Ampère-Maxwell law)} \end{aligned}

The second equation deserves a moment on its own, because unlike the other three it isn't the correction of some previously-broken law — it's a statement that's been true, silently, since the Biot-Savart law was first written down. Electric field lines start and end on charges, but magnetic field lines never do; the Biot-Savart law builds B\vec B purely out of circulating contributions dl×r^d\vec l\times\hat r, which never produces a field with any net outward flow from a point. No isolated magnetic "charge" — a magnetic monopole, a lone north pole with no south — has ever been observed, and B=0\nabla\cdot\vec B=0 is the precise statement that there is nothing for magnetic field lines to start or stop on: they only ever form closed loops.

These four equations, together with the Lorentz force law F=qE+qv×B\vec F=q\vec E+q\vec v\times\vec B that tells you what the fields do once you have them, are the complete classical theory of electricity and magnetism. Every static problem solved with Coulomb's law or Gauss's law, every circuit built from conductors and capacitance, every magnetic force from the Lorentz force law, every induced current from Faraday's law — all of it is contained in, and derivable from, these four lines. Nothing classical about electromagnetism lies outside them.

And they carry one more secret, planted the moment E/t\partial\vec E/\partial t and B/t\partial\vec B/\partial t entered the equations symmetrically on both sides: a changing E\vec E makes a B\vec B, a changing B\vec B makes an E\vec E, each feeding the other. Special relativity opened with a crisis — Maxwell's equations producing one definite speed cc for light, the same in every reference frame, with no medium and no privileged observer required to make sense of it. That number comes directly out of these four equations, with nothing else added. Finding it is the entire content of the next topic.

A capacitor being charged: a wire carries conduction current I into the left plate and out from the right plate, with charge accumulating shown as plus and minus signs on the facing plate surfaces, and a growing electric field drawn as arrows between the plates. Two different surfaces are stretched across the same Amperian loop drawn around the left wire: a flat disk punctured by the wire, and a bulging surface that passes through the gap between the plates without touching the wire, both labeled as enclosing the same total current once the displacement current through the gap is included.

The same Amperian loop, two different surfaces bounded by it: one pierced by the conduction current in the wire, the other passing through the capacitor's gap, pierced instead by the displacement current — the vacuum permittivity times the rate at which the electric flux changes. Maxwell's correction makes them agree.

Worked example

Starting from the corrected Ampère-Maxwell law, take the divergence of both sides and show that the continuity equation J=ρ/t\nabla\cdot\vec J=-\partial\rho/\partial t follows automatically, using Gauss's law. (click to reveal the solution)

Setting up: start from the corrected law,

×B=μ0J+μ0ϵ0Et.\nabla\times\vec B = \mu_0\vec J + \mu_0\epsilon_0\frac{\partial\vec E}{\partial t}.

Take the divergence of both sides.

Left side: the divergence of a curl vanishes identically, for any vector field whatsoever:

(×B)=0.\nabla\cdot(\nabla\times\vec B) = 0.

Right side: apply the divergence to each term separately, since divergence distributes over addition:

(μ0J+μ0ϵ0Et)=μ0J+μ0ϵ0(Et).\nabla\cdot\left(\mu_0\vec J + \mu_0\epsilon_0\frac{\partial\vec E}{\partial t}\right) = \mu_0\,\nabla\cdot\vec J + \mu_0\epsilon_0\,\nabla\cdot\left(\frac{\partial\vec E}{\partial t}\right).

Space and time derivatives commute — differentiating with respect to position and with respect to time can be done in either order — so

(Et)=t(E).\nabla\cdot\left(\frac{\partial\vec E}{\partial t}\right) = \frac{\partial}{\partial t}\left(\nabla\cdot\vec E\right).

Substituting Gauss's law, E=ρ/ϵ0\nabla\cdot\vec E=\rho/\epsilon_0, into this term:

t(E)=t(ρϵ0)=1ϵ0ρt.\frac{\partial}{\partial t}\left(\nabla\cdot\vec E\right) = \frac{\partial}{\partial t}\left(\frac{\rho}{\epsilon_0}\right) = \frac{1}{\epsilon_0}\frac{\partial\rho}{\partial t}.

Assembling the right side:

μ0J+μ0ϵ01ϵ0ρt=μ0J+μ0ρt.\mu_0\,\nabla\cdot\vec J + \mu_0\epsilon_0\cdot\frac{1}{\epsilon_0}\frac{\partial\rho}{\partial t} = \mu_0\,\nabla\cdot\vec J + \mu_0\frac{\partial\rho}{\partial t}.

Equating both sides (left side was 00):

0=μ0J+μ0ρt.0 = \mu_0\,\nabla\cdot\vec J + \mu_0\frac{\partial\rho}{\partial t}.

Divide through by μ0\mu_0, which is a nonzero constant:

0=J+ρtJ=ρt.0 = \nabla\cdot\vec J + \frac{\partial\rho}{\partial t} \quad\Longrightarrow\quad \boxed{\nabla\cdot\vec J = -\frac{\partial\rho}{\partial t}.}

Interpreting the result: this is exactly the continuity equation, the local statement of charge conservation — and it emerged here as a derived consequence of two of Maxwell's equations together (Ampère-Maxwell and Gauss), not as an assumption fed in by hand. Without the displacement current term, the same calculation forced J=0\nabla\cdot\vec J=0 unconditionally, which is only correct for steady currents. With it, charge conservation holds automatically for any time-dependent charge and current distribution whatsoever — the exact generality the original, uncorrected Ampère's law was missing, and the precise reason Maxwell's single added term was enough to fix it.

Where this leads

Four equations, a handful of vector derivatives, and the entire classical theory of electricity and magnetism sits complete in front of you. What's left is to ask what these equations do when nothing else is around at all — no charge, no current, just the fields themselves, alone in empty space — and discover that they don't just sit there. They move. That's the next and final topic of this branch: the derivation of the electromagnetic wave, and the resolution, straight out of these four lines, of the mystery that opened special relativity.