Gauss's law says that the net flux through any closed surface is the net charge inside it divided by ε0, Φ=qin/ε0
about 40 min1 simulation3 practice questions1 Python program6 questions to check yourself
This lesson is free to read. Enroll free to keep your place and take the tests.
Lesson 2 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
A fence round a charge
Put a positive charge in the middle of a field. Lines start on it and spread out in all directions. Now build a fence round the charge. The fence can be a ball, a box or a lumpy bag. Every line has to get out, so every line crosses the fence.
The number of lines that cross the fence is fixed by the charge. It does not depend on the shape or the size of the fence. A bigger fence is crossed by the same lines, in a wider spread. This is the idea behind Gauss's law.
Two panels. The left panel, A charge inside, shows a red plus charge q at the centre of a blue dashed circle and a larger green wavy closed curve. Twelve orange lines run outward from the charge and cross both the circle and the green curve, so the flux through each is the same. The right panel, A charge outside, shows a green circle with a red charge q to its right. Six orange lines from the charge go through the circle: each one enters at a blue square on the near side and leaves at a red dot on the far side, so the net flux is zero.
The flux of a point charge through a sphere
Let us check the idea for the simplest fence, a sphere with the charge at its centre. At a distance r the field of a point charge q is
E=4πε0r2q
The constant ε0 (epsilon zero) is the permittivity of free space, 8.85×10−12C2/(N m2). In Coulomb's law it appears as 4πε01=9.0×109N m2/C2.
The field is radial and has the same size at every point of the sphere. So the flux is the field times the area of the sphere, 4πr2:
Φ=E×4πr2=4πε0r2q×4πr2=ε0q
Look at what happened to r. It cancelled. The field falls as 1/r2 and the area grows as r2, so the flux is the same for a small sphere and for a huge one. This cancelling is the whole reason Gauss's law works. If the force fell as 1/r3, the flux would shrink as the sphere grew, and the law would fail.
Any shape
Why does the shape not matter? Look at the lines. A line that leaves the sphere does not stop, since lines start and end only on charges. It goes on and crosses any other closed surface that surrounds the charge. So the number of lines through the second surface is the same as through the sphere.
We count a line as positive where it leaves and negative where it enters. A line that goes out, comes back in and goes out again crosses the surface three times, but its count is +1−1+1=+1. So each line from the charge counts once, whatever the shape of the surface.
Gauss's law
Putting the results together, we have Gauss's law:
∮E⋅dS=ε0qin
In words: the net flux through a closed surface equals the net charge inside the surface divided by ε0.
qin is the sum of the charges inside, with their signs.
A positive qin gives a net flux that goes outward. A negative qin gives a net flux that goes inward.
The surface we choose is imaginary. We call it a Gaussian surface. We can draw it anywhere, and in any shape.
A worked example. A closed surface holds charges of +5.0 nC, −2.2 nC and +1.2 nC. Find the net flux.
The charge inside.qin=5.0−2.2+1.2=4.0 nC =4.0×10−9 C.
The flux.Φ=ε0qin=8.85×10−12C2/(N m2)4.0×10−9C=452N m2/C. It is outward, since qin is positive.
Charges outside the surface
A charge that sits outside the surface sends lines through it. Each line goes in at one place and comes out at another. The positive flux where it leaves cancels the negative flux where it enters, so the net flux from that charge is zero. The right picture above shows this.
Take care here. Gauss's law gives the net flux, not the field. The field on the surface comes from all the charges, those inside and those outside. A charge outside changes the field at the surface. It does not change the net flux.
Think of a box with no charge inside, near a charge that is outside. The net flux through the box is zero. The field at the surface of the box is not zero.
A worked example. A point charge of 9.0 nC sits at the centre of a cube of side 0.20 m. Find the flux through one face.
The whole cube.Φ=ε0q=8.85×10−12C2/(N m2)9.0×10−9C=1017N m2/C.
One face. The six faces are alike, so each gets a sixth: 61017=169.5N m2/C.
The side of the cube never entered the calculation. A cube ten times larger gives the same answer.
What if the charge moves? Push the charge off the centre, but keep it inside the cube. The flux through the whole cube stays 1017N m2/C. The faces no longer get equal shares. The faces that are closer get more. Now take the charge outside the cube. The net flux through the cube falls to zero.
Gauss's law and Coulomb's law
We built Gauss's law from Coulomb's law. We can go the other way. Put a charge q at the centre of a sphere of radius r. Gauss's law gives E×4πr2=q/ε0. So E=4πε0r2q, the field of a point charge. The force on a second charge q0 there is qq0/(4πε0r2), which is Coulomb's law.
The two laws say the same thing about a point charge. The gain of Gauss's law is that it holds for any arrangement of charges, and for surfaces of any shape. In the next lesson we use it to find fields that would be hard to find with Coulomb's law.
Make q2 negative and slide the radius past it. What happens to the flux? Then set q1 and q2 to opposite values with the same size. What is the net flux when both are inside?
Practise with new numbers
Try it in Python
Gauss's law is a statement about a sum over a surface, so a computer can test it. The program adds E⋅dS over thousands of small patches on the six faces of a cube. Then it compares the sum with q/ε0.
Common mistakes
Counting the charges outside the surface. They add nothing to the net flux. Only qin counts.
Thinking the field is zero when the net flux is zero. The flux can be zero while the field is large at every point of the surface.
Thinking the flux depends on the size or shape of the surface. It depends only on the charge inside.
Using only the enclosed charges to find the field at the surface. The field comes from all the charges. Gauss's law gives the net flux, and only a symmetric arrangement lets it give the field.
Forgetting the sign of the charge. A negative qin gives a negative flux, with the net flux going inward.
Remember these
Gauss's law: ∮E⋅dS=ε0qin, with ε0=8.85×10−12C2/(N m2).
qin is the net charge inside the closed surface, with signs. Charges outside add nothing to the net flux.
The flux does not depend on the shape or the size of the surface.
A point charge at the centre of a cube sends 6ε0q through each face.
Gauss's law holds for every field, and it follows from the inverse square law.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
The net flux through a closed surface is −300N m2/C. What can you say about the charge inside?
A charge sits at the centre of a sphere of radius 10 cm. The sphere is replaced by one of radius 20 cm. What happens to the net flux, and what happens to the field on the surface?
A point charge is just outside a closed box. Is the net flux through the box zero? Is the field zero on its surface?
A closed surface holds a charge +q and a charge −q. What is the net flux? Is the field zero on the surface?
A point charge sits at the centre of a cube. The flux through one face is 80N m2/C. What is the charge?
Enroll free in Electric Flux and Gauss's Law
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.
. The shape and the size of the surface do not matter. A charge outside the surface sends as many lines in as out, so it adds nothing to the net flux. The law follows from the inverse square law of Coulomb.