Section 3.2 · Topic 3 of 7
3.2.3 Gauss's law
We have found that the outward flux through a closed surface enclosing a point charge is equal to the charge itself, and that a charge outside contributes nothing. Two more steps take us to the general law: (1) many point charges, by superposition, and (2) continuous charge distributions, by turning the sum into an integral. A third step then gives the law at a single point.
Several point charges
Consider arbitrarily distributed point charges , some inside and some outside it (Figure 3.2.6). By the superposition principle of Section 3.1 the total field is the sum of the individual fields, , and the flux, being an integral, is additive too:
By Eq. (3.2.8) each term equals if is inside and zero otherwise. Hence
Charges outside (in the figure , and ) contribute nothing to the flux: every field line of theirs that enters also leaves it. They do, of course, contribute to the field at the points of . It is only the net flux of their field that vanishes.
Figure 3.2.7 shows the same bookkeeping on computed field lines. Two charges, and , are drawn with lines that each carry the same amount of flux, , so that sends out 12 lines. Six of them end on and six escape to infinity. Counting the crossings of four closed surfaces reproduces Gauss's law line by line.

| surface | encloses | lines out | lines in | net flux |
|---|---|---|---|---|
| 12 | 0 | |||
| 0 | 6 | |||
| and | 6 | 0 | ||
| nothing | 1 | 1 |
Writing with the total charge of the problem. The right-hand side is the charge inside only. In Figure 3.2.7, using the total charge for the surface would give the wrong flux instead of .
Continuous charge distributions: the integral form
Next, consider charge distributed continuously in a volume with volume charge density (Figure 3.2.8). An element carries the charge , which acts as a point charge, and summing Eq. (3.2.9) over all elements turns the sum into an integral:
where is the closed surface bounding . If line or surface charges are present inside , their contributions and are added to the right-hand side. In every case the right-hand side is simply the total charge enclosed by , which we shall often write as .

A closed surface contains a and a point charge, and a charge sits just outside it. What is the outward flux of ? Does the charge change on the surface?
(net flux into the surface). The charge does change at every point of the surface, but its lines enter and leave, so it does not change the net flux.
The differential form
The integral form (3.2.10) is a statement about a whole region. We now shrink the region to a point, in two steps: (1) convert the surface integral into a volume integral with the divergence theorem, and (2) argue that two volume integrals that agree for every volume must have equal integrands.
Step 1
Gauss's theorem (the divergence theorem) of Section 2.4, which holds for any continuously differentiable vector field, states
Using it on the left-hand side of Eq. (3.2.10) and moving everything to one side,
Step 2
This must hold for every volume , however small and wherever it is placed. If the integrand were different from zero at some point, say positive, then by continuity it would be positive in a small ball around that point, and the integral over that ball would be positive, a contradiction. The integrand therefore vanishes everywhere, and we obtain Gauss's law in differential form, .
The same conclusion follows directly from the definition of the divergence as flux per unit volume (Section 2.2), : applying Eq. (3.2.10) to a small volume gives a flux , and the limit is .
In free space , so equivalently and .
Move and resize the Gaussian surface below: the numerically integrated flux changes only when a charge crosses the surface, never when the surface is merely deformed or moved with the same charges inside.
Integral form: the flux out of any closed surface equals the charge inside it. Differential form: at every point, field lines are created where there is positive charge (), absorbed where there is negative charge (), and simply pass through where there is none (). In the river picture of Section 2.2, charges are the springs (sources) and the drains (sinks) of the field.
Equation (3.2.12) is the second fundamental equation of electrostatics. The first, (or ), will be derived in Section 3.3 together with the electrostatic potential. The two together determine the electrostatic field. Gauss's law alone fixes only the divergence of , which is why it can compute a field only when symmetry supplies the missing information (Section 3.2.4).
At a point P in empty space . Does that mean at P?
No. only says that no field lines begin or end at P. Lines may still pass through P. Next to a point charge, for example, but for every .
For the field of a point charge, the divergence in spherical coordinates (Section 2.3) is, for ,
consistent with there, and yet the flux through any sphere around the origin is . All the flux originates at the single point , where is infinitely concentrated. In the language of distributions (generalised functions) this is written , the three-dimensional Dirac delta, so that is the charge density of a point charge.
Gauss's theorem is mathematics, Gauss's law is physics
It is worth pausing on the difference between the two "Gauss" statements we have used. In Section 2.4 we verified for a given vector field on a cube (Example 2.4.2) and on a sphere (Example 2.4.3): the divergence theorem is a mathematical identity, true for any sufficiently smooth vector field. Gauss's law adds the physical statement that the only sources of are charges, : the flux out of any closed surface counts the charge inside it, and nothing else. Figure 3.2.9 summarises the content of the law.
- counts the field lines crossing : outward crossings count , inward crossings .
- Charge inside: all the lines of leave the surface, and the flux is , whatever the shape or size of (, in the figure).
- Charge outside (): every line that enters also leaves, and the flux is zero.
- Where there is no charge, : field lines are neither created nor destroyed. They begin on positive charges and end on negative charges (or at infinity).