
Physics II course sequence · Interactive lesson
Gauss's law for electricity
Coulomb's law will give you any field at all, provided you are willing to do the integral. Gauss's law gives you the field in a single line — but only where symmetry lets you lift E out of the integral. Learn to recognise those cases, and learn what the law still asserts everywhere else.
UPII-12.01 · Lesson 1 of 8 in this unit. Position is not a completion score.Build the model
Only charge can start or stop an electric field line.
The key idea
Gauss's law says the electric flux out through any closed surface equals the net charge enclosed divided by ε₀, whatever the surface's shape and wherever inside it the charge sits.
Example. Place q = +4.0 nC anywhere inside a closed surface and the outward flux is 4.0 × 10⁻⁹ ÷ 8.854 × 10⁻¹² = 4.5 × 10² N m² C⁻¹ — the same for a sphere, a cube or a crumpled paper bag.
The complete physical model and assumptions
Electric flux counts how much field pierces a surface: for each patch, take the component of E along the outward normal, multiply by the patch's area, and add. Gauss's law states that over any closed surface this total is fixed by the charge inside and by nothing else, ∮E⋅dA = qenc/ε₀. It is not a new postulate. It follows from two properties of the Coulomb field — the 1/r² fall-off and superposition — because the flux a point charge sends through a patch depends only on the solid angle that patch subtends, the r² growth of area cancelling the 1/r² decay of the field exactly. A charge outside the surface then contributes nothing, its lines entering and leaving with equal and opposite flux. The law is exactly true for every closed surface you can imagine, but it is useful for finding a field only where symmetry makes E constant in magnitude and fixed in orientation over a surface you can choose, so that ∮E⋅dA collapses to E × A: spherical, infinite cylindrical and planar symmetry, and nothing else. Off the axis of a charged disc, or near the end of a finite rod, Gauss's law remains true and tells you nothing, because E will not come out of the integral.
1Flux is the field component that pierces a surface
Give every patch of a surface an area vector dA: its magnitude is the patch's area, its direction the outward normal. The flux through that patch is E⋅dA = E cos θ dA, with θ the angle between field and normal, and the flux through the whole surface is the sum, ΦE = ∫ E⋅dA. The cosine does real work. A field lying in the plane of the patch pierces nothing and contributes zero; a field along the normal contributes everything. Take a uniform E = 2.0 × 10³ N C⁻¹ and a rectangle 0.20 m × 0.30 m, of area 0.060 m². Held square to the field it collects ΦE = 2.0 × 10³ × 0.060 = 1.2 × 10² N m² C⁻¹. Tilt it so its normal makes 60° with the field and the flux drops to 1.2 × 10² × cos 60° = 60 N m² C⁻¹. Turn it edge-on and the flux is zero although the field never changed. On a closed surface the word outward fixes the sign once and for all: flux leaving counts positive, flux entering negative, and ΦE carries units of N m² C⁻¹.
2Why a closed surface's flux counts only the charge inside
Put a point charge q at the centre of a sphere of radius r. The field is radial of magnitude q/(4πε₀r²), the outward normal is radial everywhere, so cos θ = 1 and ΦE = [q/(4πε₀r²)] × 4πr² = q/ε₀. The r² in the area has cancelled the 1/r² in the field, which is why no radius survives in the answer. Now deform that sphere into any shape you like. Push one patch out to twice the distance and its area grows fourfold while the field there falls fourfold: the flux through it does not move. Only the solid angle a patch subtends at the charge matters, and the solid angles around a fully enclosing surface always total 4π, wherever inside the charge sits. Put the charge outside instead and every line that enters the surface must leave it again, contributing −ΔΦ and then +ΔΦ, so its net flux is exactly zero. Superposition finishes the argument: fields add, so fluxes add, and ∮E⋅dA = qenc/ε₀ for any closed surface and any arrangement of charge.
3Symmetry is what makes the law calculable
Gauss's law is one equation with the unknown field buried in an integral, so it yields E only where you can lift E out. That needs a surface on which two things hold at every point: E has the same magnitude, and E makes the same angle with the outward normal — ideally 0° over the part carrying the flux and 90° over the rest. Exactly three charge symmetries supply such a surface. Spherical symmetry, where the charge density depends only on distance from a centre, is matched by a concentric sphere. Infinite cylindrical symmetry, density depending only on distance from an axis, is matched by a coaxial cylinder whose flat end caps carry no flux because E lies in their planes. Planar symmetry, an infinite charged sheet, is matched by a pillbox straddling it, whose curved side contributes nothing. In each case the integral collapses to E × A and the law becomes one line of algebra. For a finite rod, a cube, or a charged disc anywhere off its axis, no such surface exists: the law is still exactly true and still returns nothing, so you go back to integrating Coulomb's law.
4One law, three distance laws
The shape of the Gaussian surface is what sets how fast the field dies away, and all three standard results come from the same line of algebra. Around a point charge or a spherical ball of total charge Q, the effective area is 4πr², so E = Q/(4πε₀r²) and the field falls as 1/r². Around an infinite line of density λ, a coaxial cylinder of length L has curved area 2πrL and encloses λL, so E(2πrL) = λL/ε₀ and E = λ/(2πε₀r), falling as 1/r. The L cancels, which is the algebraic signal that the answer belongs to the line and not to the box you drew round it. For λ = 3.0 × 10⁻⁸ C m⁻¹ at r = 5.0 cm, E = 3.0 × 10⁻⁸ ÷ (2π × 8.854 × 10⁻¹² × 0.050) = 1.1 × 10⁴ N C⁻¹. For an infinite sheet of density σ, a pillbox of face area A encloses σA and leaks flux from both faces, so E(2A) = σA/ε₀ and E = σ/(2ε₀), with no distance in it at all. The pattern is one line long: the area the flux has to spread through grows as r², as r, or not at all.
5Inside a conductor the law does the work for you
In electrostatic equilibrium no current flows, so the field inside the conducting material is zero — any surviving field would push the mobile charges until it was cancelled. Draw a Gaussian surface wholly within that material, just under the skin. E = 0 at every point of it, so the flux is zero, so qenc = 0: no excess charge can sit anywhere in the bulk. Whatever you put on a conductor migrates to its surfaces. Hollow the conductor out and the same argument applies to a surface drawn through the metal around the cavity. With the cavity empty, the flux is zero and the cavity wall carries no net charge. Place +8.0 nC inside the cavity of an initially neutral conductor and the enclosed total must still be zero, so −8.0 nC is induced on the cavity wall and, since the conductor's own charge is conserved, +8.0 nC appears on the outer surface. That is electrostatic shielding, obtained from a flux argument with no field calculation anywhere in it.
6Where it sits in the Maxwell system
Gauss's law is the first of Maxwell's four equations, and it is the only one of the four whose right-hand side is charge. The derivation above was electrostatic, since Coulomb's law describes a charge at rest, but Maxwell's system asserts the law unchanged when charges move and fields vary in time, and no experiment has yet found an exception. Read as geometry, it says that an electric field line can begin only on positive charge and end only on negative charge; where there is no charge a line cannot stop, so in a changing field it simply closes on itself. Apply it to a region containing no charge and the consequence is immediate: the outward flux through every closed surface you can draw there is zero, so as many lines enter as leave. That is the condition an electromagnetic wave crossing empty space has to satisfy, and it is what forbids any component of E along the direction of travel, since a pillbox straddling a wavefront would then collect unbalanced flux. The law that counts charge ends up fixing the shape of a field pattern that has no charge in it at all.
Key equations
Read the units, assumptions and limits before substituting.
Electric flux through a surface
ΦE = ∫ E⋅dA = ∫ E cos θ dA
Turns a vector field spread over a surface into the one signed number Gauss's law constrains.
E in N C⁻¹, dA the outward-normal area element in m², θ the angle between them; ΦE in N m² C⁻¹Gauss's law in integral form
∮ E⋅dA = qenc / ε₀
Charge, not geometry, sets the outward flux: +1.0 nC enclosed gives 113 N m² C⁻¹ through any surface.
qenc is the net charge inside the closed surface, in C; ε₀ = 8.854 × 10⁻¹² C² N⁻¹ m⁻²Spherical symmetry
E(r) = qenc(r) / (4πε₀r²)
Outside any spherically symmetric ball of charge the field is exactly that of a point charge at its centre.
r measured in m from the centre; qenc(r) is the charge inside radius r, in CInfinite line of charge
E = λ / (2πε₀ r)
A cylinder's curved area grows as r, so the field thins as 1/r rather than 1/r².
λ the linear charge density in C m⁻¹, r the perpendicular distance from the line in mLarge uniformly charged sheet
E = σ / (2ε₀)
No distance appears: close to a wide flat sheet the field does not weaken with distance.
σ the surface charge density in C m⁻², E in N C⁻¹, pointing away from a positive sheetConductor in electrostatic equilibrium
∮ E⋅dA = 0 for any surface drawn inside the metal
Forces qenc = 0 throughout the bulk, so every excess charge sits on a surface.
holds wherever no current flows, since a field in the bulk would push the mobile charges until it vanishedInteractive lab
Predict first. Explore the model. Compare the result.
Explore the model
Try this. Drag the Gaussian radius out past the ball's surface and watch the flux readout stop moving: beyond r = R each new shell encloses no extra charge, so the flux locks at q/ε₀ while the field keeps thinning as 1/r².
Live results
- ENCLOSED CHARGE
- 8.00 nC
- OUTWARD FLUX
- 904 N m² C⁻¹
- FIELD AT r
- 11235 N C⁻¹
- SURFACE FIELD
- 28762 N C⁻¹
Results follow this lesson’s model and assumptions. Displayed values are rounded.
Predict → change one variable → check
Plan a change before running it. Every other input stays at the saved baseline.
Saved baseline. Ball charge Q: 8.0 nC; Ball radius R: 5.0 cm; Gaussian sphere radius r: 8.0 cm
This experiment is kept only while this page is open. It does not change saved course progress.
Catch the common trap
Gauss's law does not say that the field on your surface comes only from the enclosed charge. The E inside the integral is the total field, from every charge there is; what outside charges contribute is zero net flux, not zero field. Put a lone +5.0 nC charge 2.0 cm outside a spherical surface and the field on that sphere is nowhere zero — about 1.1 × 10⁵ N C⁻¹ on the near face — yet ∮E⋅dA = 0, because as much flux enters as leaves. The damage shows at the next step, when the surface is any old shape and the student writes E = qenc/(ε₀A) anyway. Lifting E out of the integral is legitimate only when symmetry guarantees that E has one magnitude and one orientation to the surface at every point of it. Without that guarantee the law is still true and still useless for finding E.
Practice & worked examples
3 authored examples. Make an attempt, then reveal the reasoning one step at a time.
EasyExample 1
A hollow plastic shell of radius 12 cm carries +6.0 nC spread uniformly over its surface. Find the outward electric flux through an imaginary spherical surface of radius 20 cm sharing its centre, and the field strength there.
Sketch your answer or reasoning, then compare it with the authored solution. Your writing is not automatically graded or saved.
0 of 4 steps revealed.
- The flux through a closed surface depends only on the charge inside it, and all +6.0 nC lies within r = 0.20 m: ΦE = qenc/ε₀ = 6.0 × 10⁻⁹ ÷ 8.854 × 10⁻¹² = 6.777 × 10² N m² C⁻¹.
- The charge is spherically symmetric, so on the chosen sphere E is radial and has one magnitude everywhere: ∮E⋅dA = E × 4πr².
- Area: 4π(0.20 m)² = 0.5027 m². So E = 677.7 ÷ 0.5027 = 1.348 × 10³ N C⁻¹, directed outward.
- Check against Coulomb: outside a spherical shell the field should match a point charge at the centre, kq/r² = 8.988 × 10⁹ × 6.0 × 10⁻⁹ ÷ 0.040 = 1.35 × 10³ N C⁻¹. Note that the shell's own 12 cm radius never entered — only the fact that the charge was all inside.
Answer. ΦE = 6.8 × 10² N m² C⁻¹ and E = 1.3 × 10³ N C⁻¹ radially outward.
MediumExample 2
A long straight wire carries a uniform λ = +45 nC m⁻¹. A thin coaxial cylindrical shell of radius 4.0 cm around it carries a uniform −30 nC m⁻¹. Find the field at 2.0 cm and at 10.0 cm from the axis, far from the ends.
Sketch your answer or reasoning, then compare it with the authored solution. Your writing is not automatically graded or saved.
0 of 5 steps revealed.
- Far from the ends the arrangement is symmetric about the axis, so E is radial and depends only on r. Take a coaxial cylinder of radius r and length L: E lies in the planes of its two flat caps, so they carry no flux, and the curved wall contributes E × 2πrL.
- Gauss's law gives E(2πrL) = λenc L/ε₀, so E = λenc/(2πε₀r). The length L cancels, as it must.
- At r = 2.0 cm only the wire is inside: λenc = +45 nC m⁻¹, so E = 45 × 10⁻⁹ ÷ (2π × 8.854 × 10⁻¹² × 0.020) = 4.0 × 10⁴ N C⁻¹, radially outward.
- At r = 10.0 cm the shell is inside too: λenc = 45 − 30 = +15 nC m⁻¹, so E = 15 × 10⁻⁹ ÷ (2π × 8.854 × 10⁻¹² × 0.100) = 2.7 × 10³ N C⁻¹, still outward.
- Limiting case: had the shell carried −45 nC m⁻¹, λenc outside would be zero and so would the external field. That is why a coaxial cable leaks nothing.
Answer. E = 4.0 × 10⁴ N C⁻¹ outward at r = 2.0 cm, and E = 2.7 × 10³ N C⁻¹ outward at r = 10.0 cm.
HardExample 3
A solid insulating sphere of radius R = 8.0 cm carries a charge density that grows outward, ρ(r) = ρ₀(r/R) with ρ₀ = 3.0 × 10⁻⁵ C m⁻³. Find the field at r = 4.0 cm and at r = 16 cm, and identify where the field is strongest.
Sketch your answer or reasoning, then compare it with the authored solution. Your writing is not automatically graded or saved.
0 of 6 steps revealed.
- ρ depends only on r, so spherical symmetry survives and ∮E⋅dA = E × 4πr² on any concentric sphere.
- Inside, qenc must be integrated rather than assumed: qenc(r) = ∫₀ʳ ρ₀(r′/R)4πr′² dr′ = (4πρ₀/R)(r⁴/4) = πρ₀r⁴/R.
- So for r ≤ R, E = πρ₀r⁴ ÷ (R × 4πε₀r²) = ρ₀r²/(4ε₀R). The field climbs as r², not as r, because the charge is piled towards the rim. At r = 4.0 cm: E = 3.0 × 10⁻⁵ × 0.040² ÷ (4 × 8.854 × 10⁻¹² × 0.080) = 1.69 × 10⁴ N C⁻¹.
- Total charge: Q = πρ₀R³ = π × 3.0 × 10⁻⁵ × (0.080 m)³ = 4.825 × 10⁻⁸ C.
- Outside, all of it is enclosed: E = Q/(4πε₀r²). At r = 0.16 m, E = 8.988 × 10⁹ × 4.825 × 10⁻⁸ ÷ 0.0256 = 1.69 × 10⁴ N C⁻¹.
- The two agree, and not by accident: both reduce to ρ₀R/(16ε₀), since r = R/2 inside and r = 2R outside happen to give the same value. The maximum sits at the surface, E(R) = ρ₀R/(4ε₀) = 6.8 × 10⁴ N C⁻¹, with the field rising as r² up to it and falling as 1/r² beyond.
Answer. E = 1.69 × 10⁴ N C⁻¹ at both r = 4.0 cm and r = 16 cm, radially outward; the field peaks at the surface with 6.8 × 10⁴ N C⁻¹.
Quick check
Select an answer and explain it before checking.
Review & continue
Gauss's law says the electric flux out through any closed surface equals the net charge enclosed divided by ε₀, whatever the surface's shape and wherever inside it the charge sits.
- Explain the relationship without looking at the equation.
- Check a sign, a unit and a model assumption in your working.
- Return to the lab or worked example if a step is still unclear.
Optional supporting lessons
These chapter resources can help with earlier ideas; they are not additional required Physics II completion tasks.