Electromagnetism

Counting what comes out, and never looking inside

Draw any closed surface. The field crossing it depends only on the charge enclosed — not on where that charge sits, not on its shape, not on anything outside.
17 min read 7 figures Fields, not forcesThe shape decides

Assumes: Field lines are a choice, not a discovery

Here is a claim that sounds too strong to be exactly true. Draw any closed surface at all — a sphere, a cube, a crumpled paper bag, anything that has an inside and an outside. Add up the electric field crossing it, counting outward as positive and inward as negative. The answer depends on the total charge enclosed and on nothing else whatsoever.

Not on where inside the charge sits. Not on how it is distributed. Not on the shape of the surface. And not, at all, on any charge outside it, however large and however close.

A closed surface with the charge inside. Every field line from the enclosed charge crosses the surface exactly once on its way out, so the net flux counts the charge.
Fig. 1 A closed surface with a charge inside it. Every line that starts on the charge must cross the boundary to get away, so the outward count equals the number of lines the charge emits.

The counting argument

The claim is nearly obvious in the line picture, which is the strongest argument for keeping that picture around.

Field lines start on positive charges and end on negative ones. They do not begin or end anywhere else. So a line that starts inside the surface has exactly two options: end on a negative charge inside, or leave. And a line that comes in from outside has exactly two options too: end on a negative charge inside, or leave again.

Count the crossings with sign. A line that enters and leaves contributes +1+1 and 1-1 and cancels itself. Only lines with an end inside fail to cancel. So the net count is the number of line-ends inside, which is the enclosed charge.

A closed surface with the charge outside. Each line from the outside charge that enters the surface also leaves it, so the crossings cancel and the net flux is zero.
Fig. 2 The same surface with the charge outside it. Every line that enters also leaves, so the crossings cancel in pairs and the net flux is zero — even though the field is strong everywhere on the surface.

That second figure is where the counterintuitive content sits. The field on the surface is not zero anywhere. It is large on the near side and smaller on the far side, pointing in all sorts of directions. And the sum is exactly zero, by a cancellation that has nothing to do with the numbers happening to work out and everything to do with lines having two ends.

The precise statement replaces the count with an integral:

EdA=Qencε0.\oint \mathbf{E} \cdot d\mathbf{A} = \frac{Q_{\text{enc}}}{\varepsilon_0}.

The dot product does the sign-keeping, since it measures only the component crossing the surface and ignores anything running along it.

Why the exponent has to be two

Gauss’s law and the inverse-square law are the same statement. Each implies the other, and seeing why makes the exponent stop looking arbitrary.

A closed surface with the charge inside. Every field line from the enclosed charge crosses the surface exactly once on its way out, so the net flux counts the charge.
Fig. 3 The same charge inside a sphere rather than a blob. Nothing in the count has changed and nothing can: every line still leaves exactly once, so the total is still the number of lines the charge started. The blob and the sphere are not two cases of a rule — they are the same case, and the freedom to choose between them is what makes the law a method rather than a curiosity.

The surface is a bookkeeping device, then, and not a physical object. It has no thickness, no material and no effect on the field; it is a boundary drawn in order to count what crosses it. That is worth saying plainly because the pictures encourage the opposite reading, and a reader who takes the surface to be doing something will find the planar case below unintelligible.

Why the field falls off as the square. The same number of field lines crossing shells at one, two and three times the distance. The shell's area grows as the square of the radius, so the lines per unit area falls as its inverse.
Fig. 4 The same number of lines crossing shells at one, two and three times the distance from a charge. Nothing is created or destroyed between the shells; the lines are simply spread over more area.

Put a point charge at the centre of a sphere of radius rr. By symmetry the field is radial and has the same magnitude everywhere on the sphere, so the flux is E×4πr2E \times 4\pi r^2. Gauss’s law fixes that product at Q/ε0Q/\varepsilon_0, and therefore

E=Q4πε0r2.E = \frac{Q}{4\pi\varepsilon_0 r^2}.

Coulomb’s law is not an independent input. It is what conservation of line-ends looks like in a space where a sphere’s area grows as r2r^2.

Why the field falls off as the square. The same number of field lines crossing shells at one, two and three times the distance. The shell's area grows as the square of the radius, so the lines per unit area falls as its inverse.
Fig. 5 Two shells, drawn with more lines. Doubling the line count changes nothing physical: the ratio between the densities at the two radii is fixed at four however many lines are drawn.

The dimensional reading is worth keeping. The exponent is one less than the number of spatial dimensions. Gravity obeys an inverse square for the same reason and not by analogy — Newton’s law and Coulomb’s law share a geometry, not a mechanism. Experiments testing the exponent are therefore testing the dimensionality of space, and they have confirmed it as 22 to within about one part in 101610^{16}.

Two nearby results have the same origin and different exponents, which is the best evidence that the geometry rather than the electricity is doing the work. Light and sound both fall off as the inverse square of distance from a point source, because the same energy per second is spread over the same growing sphere — the intensity of a wave obeys the law for exactly the argument in the figure. And a long straight source gives 1/r1/r instead, because a cylinder’s area grows linearly. Nothing about the emitter changes the exponent; only the shape of the surface it is spread over.

What flux is counting

The word flux is borrowed from fluid flow, and the borrowing is both helpful and dangerous.

A closed surface with the charge inside. Every field line from the enclosed charge crosses the surface exactly once on its way out, so the net flux counts the charge.
Fig. 6 The same charge and the same surface, drawn with twice as many lines. The number crossing has doubled and the answer has not changed, because the answer was never the number of lines — it is the number of lines per unit of charge, and both went up together. The line count is a choice about legibility, in exactly the way the shape of the surface is.

That is the first thing to be careful about. Drawing more lines does not put more field anywhere; the density of lines is meaningful and their absolute number is not, so any statement that survives the doubling is about the field and any statement that does not was about the drawing. Flux is of the first kind. What it adds up, at each patch of the surface, is the component of the field crossing that patch, weighted by the patch’s area — a quantity that would be unchanged if the picture were redrawn with a hundred lines or with four.

The borrowing from fluid flow is helpful, because the arithmetic is identical. If the arrows were water velocities, the flux through a surface would be the volume of water passing per second, and the statement that flux out of a closed surface counts what is inside would be the statement that water is not created except at taps.

Dangerous, because nothing is flowing. The electrostatic field is static; no material is moving along the arrows, and no energy is being carried across the surface. The analogy transfers the mathematics of a conserved flow and none of the substance, which is a distinction the word does nothing to preserve.

What the flux really counts is sources. A field whose flux out of every closed surface is proportional to the charge enclosed is a field whose lines begin and end only on charges — and that is a statement about where the field comes from, not about anything travelling.

Symmetry has to be supplied

Gauss’s law is true for every surface and useful for almost none. The gap between those two facts is the practical content of the subject.

The law gives one number — the total flux. Finding the field requires knowing how that total is distributed over the surface, and the law says nothing about that. It becomes a calculation only when a symmetry argument can be made first: the field has the same magnitude everywhere on this surface and crosses it perpendicularly. Then the integral collapses to E×AE \times A and EE can be divided out.

Three symmetries permit it, and essentially only three.

Spherical. A point charge, a uniformly charged sphere, a charged shell. Choose a concentric sphere and the field is radial and uniform on it. The famous consequence is that a uniform shell produces no field at all inside itself: enclose zero charge and get zero flux, and symmetry forces the field itself to zero rather than merely its sum. Newton needed a page of geometry to prove the gravitational version; Gauss’s law does it in a line.

Cylindrical. A long straight wire. A coaxial cylinder encloses charge proportional to its length while its area also grows with length, so the field falls as 1/r1/r rather than 1/r21/r^2 — a genuinely different law from the same principle, because the geometry of the source changed.

Planar. A large flat sheet, or any source large enough that its edges are far away. A box straddling the sheet encloses charge proportional to its cross-section, and the area does not grow with distance at all. The field is uniform: it does not fall off with distance from an infinite sheet. That result underlies the parallel-plate capacitor and it is one of the least intuitive in electrostatics.

Anything less symmetric — two charges, a finite rod, a cube of charge — and the law remains true and stops being a method. The field must then be found by integrating over the source, and Gauss’s law is demoted to a check on the answer.

A closed surface with the charge outside. Each line from the outside charge that enters the surface also leaves it, so the crossings cancel and the net flux is zero.
Fig. 7 A surface with the charge outside it, drawn once more because this is the case that shows what the law does not give. The flux through it is exactly zero, and the field on it is nowhere zero and nowhere the same twice. One number is known about the whole surface and nothing at all is known about any point of it — which is the ordinary situation, and the reason the three symmetries below are worth naming.

What the counting costs

The law’s power comes from refusing to look inside, and the refusal is not free: what it declines to look at is usually what was wanted.

The accounting is stark. A field in three dimensions has three components at every point, and Gauss’s law supplies one number per surface. Three unknown functions against one scalar equation is not a solvable arrangement, and the only reason the standard examples work is that symmetry has already reduced the three functions to one — a magnitude that depends on a single coordinate — before the law is applied at all. The symmetry argument does the work; the law finishes the sentence.

That has a consequence worth stating in the strongest terms, because it is where the method quietly fails. The symmetry is an assumption, and the law does not check it. An infinite plane is never infinite. A long wire has ends. A charged sphere sitting near anything else is no longer spherically symmetric in its surroundings, and the field on a concentric sphere is no longer uniform, and the step from “flux equals Q/ε0Q/\varepsilon_0” to “EE times 4πr24\pi r^2 equals Q/ε0Q/\varepsilon_0” is no longer legitimate. The flux statement stays exactly true throughout. Only the useful part dies.

The error this produces is real and routinely measured. The uniform field between capacitor plates is the planar result, and it holds only where the edges are far away; near them the field bulges outward and weakens, and the capacitance of a real capacitor exceeds the plate-area formula by an amount that depends on the ratio of gap to plate size. For plates ten centimetres across separated by a millimetre the discrepancy is on the order of a per cent, which is negligible for storing charge and fatal for defining a standard. Precision capacitors therefore carry a guard ring — a separate electrode surrounding the plate at the same potential, which moves the fringing to the edge of the guard and leaves the measured region genuinely uniform. That ring is an idealisation being purchased with hardware, and it is the most honest illustration available of what an infinite plane costs when one is needed and none exists.

The version with no surface in it

Everything above concerns a surface drawn by hand, and the choice of surface can look like an unwelcome piece of human intervention in a law of nature. It is removable.

Shrink the surface toward a point and the enclosed charge becomes the local charge density times the vanishing volume, while the flux becomes a property of how the field spreads at that point — its divergence. The two limits give

E=ρε0,\nabla \cdot \mathbf{E} = \frac{\rho}{\varepsilon_0},

which says the same thing with no surface mentioned anywhere: at every point, the degree to which the field spreads out is set by the charge that is there.

The equivalence of the two forms is the divergence theorem, and it is worth appreciating what it accomplishes. A statement about the boundary of a region and a statement at every point inside it turn out to carry identical information — which is the same relationship as between a rate of change and a total, one dimension up. The surface version is easier to reason with and the point version is easier to compute with, and both are among the small number of statements that survive unchanged from electrostatics into the full electrodynamics.

The differential form is also what makes the field theory local in the sense the field concept was introduced to achieve. It contains no distant charges, no integral over anything far away, and no reference to a surface somebody chose. It relates what the field is doing here to what the charge is doing here, and that is the whole ambition of writing physics in fields rather than in forces.

Inside a conductor

One application is worth following through because its consequences are everywhere.

In a conductor at equilibrium, the field must be zero everywhere inside. If it were not, charges would feel a force and move, and the situation would not be equilibrium. That is the whole argument.

Now take any closed surface entirely within the conductor’s material. The field on it is zero, so the flux is zero, so the enclosed charge is zero. Shrink the surface anywhere and the conclusion holds: there is no charge anywhere in the bulk. Every excess charge on a conductor sits on its surface.

This is why a metal box shields its interior. Fields outside rearrange the surface charge, the rearrangement cancels the external field within the metal, and the cavity inside is left with the field its own contents produce and no more. A car in a lightning strike, a coaxial cable’s braid, the mesh in a microwave oven door and the perforated foil in an MRI room are all the same argument. The mesh works because holes much smaller than a wavelength are, to the field, not there.

The argument even survives being run in reverse. If the exponent in Coulomb’s law were not exactly two, a charged conducting shell would have a measurable field inside it. That experiment — Cavendish’s in 1773, refined ever since — is the most sensitive test of the inverse-square law available, and it works by looking for nothing and finding nothing.

There is a pleasing economy in that. A null result is usually the weakest kind of evidence; here it is the strongest available, because the prediction of exactly zero is a consequence of the exponent being exactly two and of nothing else. Measuring a small quantity precisely is hard. Confirming that a quantity is zero is limited only by the sensitivity of the instrument, which is why the same strategy — look for the thing that should not be there — has settled several other questions in physics far more decisively than any positive measurement could have.

It survives the loss of the law it came from

The derivation started with Coulomb’s inverse square and counted lines through a sphere, so it is natural to read the result as a repackaging of that law. It is more than that, and the difference shows up as soon as anything moves.

The field of a charge in uniform motion is not spherically symmetric. It is compressed into the plane transverse to the motion, strengthened there and weakened ahead and behind, by factors of γ\gamma — which means the Coulomb expression the derivation began with is simply wrong for such a charge.

Gauss’s law is still exactly true. The total flux through any closed surface containing the charge is still q/ε0q/\varepsilon_0, because the field has been redistributed over the surface and not removed from it. What the law counts is a total, and the total is what survives.

That is why it is one of Maxwell’s four equations rather than a corollary of one. The inverse-square law is a solution — the static, symmetric one — and the flux statement is the equation that solution satisfies. A statement about a total is more robust than the particular distribution it was first read off, and this is the cleanest example of it in the subject.

The same accounting, with charge taken out

Nothing in the counting is electrical. It says that what emerges from a closed surface is what is inside making it, and that shape of statement is available wherever something is neither created nor destroyed in transit.

Put a fluid in place of the field and the flux through a closed surface is the net volume leaving per second, which must equal the rate at which the enclosed mass falls. Put heat in place of it and the same sentence is the equation a thermal engineer writes. Put probability in place of it — the quantum-mechanical current against the probability density — and it is the statement that the particle is somewhere.

Each of these is J=ρ/t\nabla\cdot\mathbf{J} = -\partial\rho/\partial t, the continuity equation, and the electrostatic case on this page is the special one where nothing is changing so the right-hand side vanishes. The divergence theorem that converts the surface count into a statement at a point knows nothing about what is flowing.

Where the model stops

Gauss’s law in the form above is exactly true and there is nothing to correct in it. The limits are limits of what it can do, and of what the pictures showing it can represent.

It gives a total, not a distribution. Without symmetry, one equation cannot determine a field that varies from point to point. This is the practical ceiling and it is a low one.

It says nothing about direction. Flux is a scalar. Two very different fields can produce identical flux through the same surface, and the law cannot distinguish them. The missing information is supplied by a second law — that the electrostatic field has no curl — and the pair together do determine the field.

Statics only, as stated. The law itself survives into electrodynamics unchanged, which is unusual and worth noting. But the line picture behind it does not: with changing fields, lines can close on themselves with no charge at either end, and the intuition of “lines start on charges” needs replacing. Once that happens, the field can propagate on its own, and the propagating solutions are light.

Both figures are slices. A closed surface in a plane is a curve, and the flux that matters is through an area. The counting argument is dimension-independent; the drawing is not.

The deeper caution is about what the law explains. It is often presented as the reason the field of a point charge is inverse-square, and that is the wrong way round in one respect: Gauss’s law is an equivalent restatement, not a cause. What it genuinely buys is a shift in what has to be known — from where every charge is to how much charge is inside, which is the same shift that makes counting arrangements more powerful than tracking particles.

The ladder from here

The next rung is the three symmetries worked all the way through, where the same counting gives three different falloffs and the exponent turns out to belong to the source rather than to the force. After it: conductors with cavities, and induced charge. The method of images, which replaces a conductor by a fictitious charge that reproduces its boundary condition. Dielectrics, and the version of the law with the polarisation folded in. The magnetic version, which sets the flux to zero always and thereby states that no isolated magnetic charge has ever been found. And Gauss’s law for gravity, which is the same equation with a sign change and rather different consequences.

Gauss derived it in 1813 and left it unpublished until 1867. Much of nineteenth-century electromagnetism consists of results Gauss had already worked out and not mentioned.

Part 1 of 4

This essay is one argument about Gauss's law. The others:

What links here

Essays that reach for this one mid-argument — the half of a link its own author cannot write down.

What this makes readable

Essays that declare this one a prerequisite.

The objects named here

The third axis, after the field and the reading path: the things themselves, and every essay that touches each one.

ConductorElectric fieldField linesFluxGauss's lawThe inverse-square lawSymmetry