Skip to content
Tutorials Center
My learning

Topics

Lesson 9 of 38 · Charge and Electric Fields

Gauss's Law

Understand electric flux and Gauss's law, then use it to find the field of a sphere, a line and a plane of charge, with numerical checks in Python.

Adding up fields from every little bit of a charged object is hard. Gauss's law is a shortcut: when the charge has a lot of symmetry (a sphere, a long line, a flat sheet), it gives the field in one or two lines. It also tells you something deep: the field lines leaving a closed surface are decided only by the charge inside.

Electric flux

Imagine field lines passing through a surface like air through a window. The electric flux through a small flat area A in a uniform field E is

Text
Φ = E A cos θ        unit: N·m²/C

where θ is the angle between the field and the normal (the perpendicular) to the surface. If the field is perpendicular to the surface, θ = 0 and Φ = E A. If the field slides along the surface, Φ = 0. For a curved surface you add up E A cos θ over many small pieces.

The law

For any closed surface (a Gaussian surface),

Text
Φ_total = Q_enclosed / ε₀

with ε₀ = 8.854 × 10⁻¹² C²/(N·m²). Charges outside the surface contribute nothing to the total flux, because every field line that goes in comes out again.

You can use Gauss's law to find E only when symmetry lets you pull E out of the flux sum. Choose the Gaussian surface so that E is constant in size and either perpendicular or parallel to the surface.

Spherical symmetry

Point or sphere Use a sphere surface
1 / 3

Result 1: a point charge or charged sphere

Take a sphere of radius r centered on the charge Q. The field is perpendicular to the surface and the same everywhere on it, so Φ = E · 4π r². Setting this equal to Q/ε₀:

Text
E = Q / (4π ε₀ r²) = kQ / r²

We recover Coulomb's law. For a uniformly charged sphere (or a conducting sphere) the same result holds outside: it acts like a point charge at its center.

Inside a conductor in equilibrium, the field is zero, and any excess charge sits on the surface. A Gaussian surface just inside the conductor encloses no charge, so the field is zero there.

Result 2: a long straight line

For a very long line of charge with linear density λ (C/m), use a cylinder of radius r and length L. Flux goes only through the curved side: Φ = E · 2π r L. Enclosed charge = λL.

Text
E = λ / (2π ε₀ r)

Result 3: a large flat sheet

For an infinite sheet with surface charge density σ (C/m²), use a small "pillbox" through the sheet. Flux goes through both faces: Φ = 2 E A. Enclosed charge = σA.

Text
E = σ / (2 ε₀)

This is independent of the distance from the sheet (for a really large sheet). The field between two parallel plates of opposite charge is E = σ/ε₀, a fact you will use for capacitors.

Python Field formulas from Gauss's law

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Checking the law numerically

Let us test Gauss's law without symmetry shortcuts: add up the flux through a cube for a point charge inside it, and then outside.

Python Numerical flux through a cube

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The printed numbers are Φ ε₀ / Q: about 1 when the charge is inside and about 0 when it is outside, as Gauss's law predicts. Small differences come from the numerical sum.

Gauss's law is always true, but it only helps you find E when the symmetry is high. For an irregular shape, use superposition or a computer.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. A closed surface encloses a net charge of +8.85 nC. The total flux through it is

    Φ = Q/ε₀ = 8.85e-9 / 8.85e-12 = 1000 N·m²/C.
  2. 2. A charge sits outside a closed surface. The net flux through the surface is

    Every field line entering the surface also leaves it.
  3. 3. The field of an infinite sheet of charge with density σ is

    A pillbox gives 2EA = σA/ε₀, so E = σ/(2ε₀).
  4. 4. The field of a long line charge λ falls with distance as

    E = λ / (2π ε₀ r).

Summary

  • Flux Φ = E A cos θ; for a closed surface Φ = Q_enclosed / ε₀.
  • Use a Gaussian surface that matches the symmetry: sphere, cylinder or pillbox.
  • Sphere: E = kQ/r²; line: E = λ/(2π ε₀ r); sheet: E = σ/(2ε₀).
  • The field inside a conductor in equilibrium is zero.

Next: Electric Potential Energy and Potential