Maxwell's equations from first principles
Electric field in rust, magnetic field in blue, throughout.
Maxwell's equations are four statements about how electric and magnetic fields relate to their sources and to each other. Each one comes in two equivalent forms. The integral form states a global fact about a surface or a loop, and it is the easiest form to build intuition with. The differential form states the same fact at a single point in space. The two are linked by the divergence theorem, which converts flux through a closed surface into divergence inside it, and by Stokes' theorem, which converts circulation around a loop into curl through it.
The two operators to keep in mind are these. Divergence (∇·) measures how much a field spreads out from a point, like a source or a sink. Curl (∇×) measures how much a field circulates around a point, like a whirlpool. Every Maxwell equation specifies either the divergence or the curl of E or B. By Helmholtz's theorem, knowing both the divergence and the curl of a field (plus boundary conditions) pins the field down completely. That is why these four equations are sufficient.
1. Gauss's law: charge is a source of E
What it means. Electric field lines spread out from a point only where there is charge, and the amount of spreading is proportional to the amount of charge. Positive charge is a source of field lines, negative charge is a sink, and empty space is neither.
Starting point. Coulomb's law gives the field of a point charge: E = Q/(4πε₀r²), pointing radially outward.
Derivation of the flux. Enclose the charge in a sphere of radius r. The flux through the sphere is the field times the area:
The r² cancels. This cancellation is the whole story. The field weakens as 1/r², and the sphere's area grows as r², so the total flux is independent of the size of the surface. It is also independent of the shape: any closed surface subtends the same total solid angle, 4π, from a charge inside it.
Charges outside the surface. For a charge outside, every field line that enters the surface also leaves it, so its net contribution to the flux is zero. By superposition, the net flux counts only the enclosed charge.
Intuition. Picture field lines that begin on positive charge and end on negative charge. The flux through a surface counts net lines out. The law depends on the exact inverse-square behaviour: if the force fell off as 1/r2.1, Gauss's law would fail. Experiments confirm the exponent is 2 to extraordinary precision.
2. No magnetic monopoles
What it means. There is no magnetic counterpart of charge. B-field lines never start or end; they always close on themselves. Every field line that enters a closed surface also leaves it.
Intuition. Cut a bar magnet in half and you get two dipoles, never an isolated north pole. Microscopically, B comes from moving charges and from spin, and both produce loop-shaped fields.
Practical consequence. The magnetic flux through any surface bounded by a given loop is the same no matter which surface you choose. That is what makes "the flux through a loop" a well-defined quantity, and equation 3 depends on it.
3. Faraday's law: a changing B curls E
What it means. The circulation on the left of the integral form is the EMF around the loop. Wherever the magnetic field is changing, it is wrapped by a circulating electric field, and the faster the flux changes, the larger the EMF. No charges are needed to produce this electric field.
What is new here. An electric field produced by charges alone is conservative: it has zero curl, and it can be written as the gradient of a potential. The induced field is different. It has curl, so "voltage between two points" becomes path-dependent. That path dependence is exactly why the probe-lead loop area matters when you measure a fast edge on a scope.
The minus sign (Lenz's law). The induced EMF drives a current whose own B-field opposes the change in flux. If the sign were positive, a small flux change would induce a current that increased the flux further, which would feed on itself and violate energy conservation. The minus sign is required by energy conservation, not chosen for convenience. In the figure, B points out of the page and is growing, so E circulates clockwise.
A subtlety in the integral form. The flux rule dΦ/dt also covers motional EMF, where a conductor moves through a static B-field. The differential form captures only the "transformer" part, the part caused by B changing in time. The motional part comes from the v×B term in the Lorentz force.
4. Ampère–Maxwell law: current and a changing E curl B
What it means. A magnetic field circulates around anything that carries current, and it also circulates around any region where the electric field is changing. The two sources are interchangeable in their effect: a changing electric field produces a magnetic field exactly as a current does.
Ampère's original law. Without the second term, this is Ampère's law: current produces circulating B. For a long straight wire,
Why Ampère's law alone is inconsistent. The divergence of any curl is identically zero. Taking the divergence of Ampère's law therefore forces ∇·J = 0. But charge conservation, expressed as the continuity equation, says
So Ampère's law alone is only valid when charge density never changes. It fails whenever charge builds up somewhere.
Maxwell's fix. Maxwell added the term μ₀ε₀ ∂E/∂t. Check the divergence of the full right-hand side, using Gauss's law (∇·E = ρ/ε₀):
The added term is exactly what makes the equation consistent with charge conservation.
The capacitor picture. Consider a charging capacitor. Draw one surface that cuts the wire and another that bulges through the gap between the plates. Both surfaces are bounded by the same loop, so they must give the same answer for ∮B·dl. Through the wire, conduction current I flows. Through the gap, no charge moves, but E is growing. The rate of change of electric flux times ε₀ equals I exactly. This "displacement current" is how AC passes through a capacitor in circuit theory.
Why light exists
In vacuum there are no charges or currents (ρ = 0, J = 0). Take the curl of Faraday's law:
The first term drops out because ∇·E = 0 in vacuum. The same curl can also be computed from the right side of Faraday's law, substituting the Ampère–Maxwell law:
Setting the two equal gives the wave equation:
This describes waves travelling at speed c = 1/√(μ₀ε₀). Numerically:
- μ₀ε₀ ≈ (1.2566×10⁻⁶)(8.854×10⁻¹²) ≈ 1.113×10⁻¹⁷ s²/m²
- c ≈ 2.998×10⁸ m/s
This matches the measured speed of light, which is how Maxwell identified light as an electromagnetic wave.
Why both coupling terms are needed. The wave is self-sustaining: a changing E creates B through equation 4, and a changing B creates E through equation 3. Without Maxwell's displacement term, this loop is broken and there are no waves.
Impedance of free space. The ratio |E|/|H| in a plane wave is
Note that since the 2019 SI redefinition, μ₀ is measured rather than defined as exactly 4π×10⁻⁷. The difference from 4π×10⁻⁷ is about one part in 10¹⁰.
Structural view
The four equations split into two pairs.
The homogeneous pair (equations 2 and 3) has no sources. It follows automatically from writing the fields in terms of potentials:
- B = ∇×A, which guarantees ∇·B = 0, since the divergence of a curl is zero.
- E = −∇φ − ∂A/∂t, which gives ∇×E = −∂(∇×A)/∂t = −∂B/∂t. The −∇φ term contributes nothing, since the curl of a gradient is zero.
The sourced pair (equations 1 and 4) tells the fields how to respond to charge and current.
What completes the theory. Two further pieces are needed:
- Lorentz force, F = q(E + v×B), which tells charges how to respond to the fields.
- Constitutive relations inside materials. Bound charges and bound currents are folded into D = εE and H = B/μ. The sourced pair then becomes ∇·D = ρfree and ∇×H = Jfree + ∂D/∂t.
In special relativity, E and B are not separate things. They are components of a single field tensor, and each pair of equations collapses into one compact tensor equation. What one observer measures as a pure E-field, a moving observer sees as partly B.