Electromagnetism
Electric Field
Define the electric field as force per unit charge, build it from point charges, and explore superposition and field lines.
Gauss’ Law
Understand electric flux, relate closed surfaces to enclosed charge, and use symmetry to find the field.
Electric Potential
Move from force to energy: potential energy landscapes, the electric potential, and its relationship to the field.
Electric Current
Follow charges into motion: electron drift, the surface charge that steers the field, Ohm’s law, and circuits.
Gauss’ Law
When representing the electric field using a field line diagram, we can imagine the field lines “flowing out of” positive charges and “flowing into” negative charges. If you then enclose a region of space with a box, you can then begin counting the number of field lines flowing into/out of the box. It turns out this counting procedure is deeply connected to the charges within the box.
Gauss’ law makes this flowy analogy formal by connecting electric flux through a closed surface to the net charge inside the surface.
Electric flux measures how much electric field “passes through” a surface. The field itself is not a flowing substance; we are actually determining the field component perpendicular to the surface.
For a flat surface in a uniform field,
where is the area and is the angle between the electric field and the surface’s normal — an arrow perpendicular to the surface. Flux has units of .
θ = 30° · Field points through the surface
When the normal points along the field, and . When the field runs along the surface, and the flux is zero. Reversing the normal reverses the sign of the flux.
Why does the cosine appear?
Why does the cosine appear?
Only the perpendicular component contributes. Equivalently, the area presented to the field is the projected area . Multiplying either way gives .
We can package the area and orientation into an area vector, . The same relation is the dot product
If the field varies or the surface curves, divide the surface into tiny patches, each with its own normal, and add their contributions:
The integral is the limit of that sum as the patches become small.
Closing the Surface
A closed surface surrounds a volume completely, like the six faces of a box or the surface of a sphere. For a closed surface, we choose every normal to point outward. A field pointing out contributes positive flux; a field pointing in contributes negative flux.
In a uniform field, a box has just as much inward flux as outward flux. Inspect its faces below, then change the field’s direction.
Each face has area 4 m² · E = 100 N/C
The net flux is zero even though the field is nonzero on the surface and throughout the box. Zero net flux means the signed contributions cancel; it does not mean there is no field.
Charge Inside, Flux Outside
Gauss’ law states that
The circle on the integral reminds us to include the entire closed surface. is the net charge inside, including both signs, and is the vacuum permittivity. It is related to Coulomb’s constant by .
The Gaussian surface is an imaginary boundary used for this calculation. It is not a conducting shell, and drawing or resizing it does not change the field.
How does this agree with Coulomb’s law?
How does this agree with Coulomb’s law?
Place a point charge at the center of a sphere of radius . Its field is radial, so the normal component everywhere on the sphere is . The sphere has area , giving
The inverse-square decrease in the field exactly balances the increase in area. A larger sphere has the same total flux. The sign of determines whether the net flux is outward or inward.
This calculation shows the spherical case. The full law applies to any closed surface: changing its shape redistributes the local contributions without changing their sum, as long as no charge crosses the boundary.
What about charges outside the surface?
What about charges outside the surface?
An external charge can produce a strong field on a Gaussian surface. Its contributions to the total flux nevertheless cancel: some point inward and others outward. The cancellation follows from the inverse-square field and the orientation and area of the surface patches; the field strengths at the entry and exit points need not be equal.
By superposition, every charge contributes to the field on the left side of Gauss’ law. Only enclosed charges contribute to the net flux on the right side. Two equal and opposite enclosed charges also give zero net flux, despite producing a nonzero field.
Gauss’ Law Explorer
Start with a centered charge, then move it off-center. The field and surface shading change, but the total flux stays the same. Try an external charge, an enclosed dipole, and different surface shapes. A charge crossing the boundary changes the enclosed charge and the total flux.
Gauss’ Law Explorer
Move charges and change the Gaussian surface. Compare enclosed charge with total electric flux.
The surface shading represents the signed normal component . Hover over a patch to inspect it. A point charge exactly on the boundary makes the ordinary surface integral singular, so move it clearly inside or outside before reading the total.
Using Symmetry
Gauss’ law is true for every closed surface. It becomes a shortcut for finding when symmetry tells us the field’s direction and where its magnitude is constant. The trick is in identifying the symmetry of the charge distribution and then choosing a surface that matches this symmetry.
This isn’t always possible. But when it is: identify where the field is normal or tangent to the surface, simplify the flux integral, calculate the enclosed charge, and find the field.
Spherical symmetry: a charged sphere
Spherical symmetry: a charged sphere
For a spherically symmetric charge distribution, choose a concentric Gaussian sphere. The field is radial and has constant magnitude on that sphere. For positive enclosed charge,
Outside a sphere of radius and total charge , all its charge is enclosed, so .
Inside a uniformly charged solid insulating sphere, only the fraction of the charge is enclosed:
The field rises linearly from zero at the center, then falls as outside. This differs from a conductor in electrostatic equilibrium, whose field inside the conducting material is zero.
Cylindrical symmetry: an infinite line of charge
Cylindrical symmetry: an infinite line of charge
For an infinite straight line with uniform charge per length , use a coaxial cylinder of radius and length . The field is radial and constant on the curved side. It is tangent to both end caps, which contribute zero flux.
For positive , the field points away from the line; for negative , it points toward it. A long finite wire approximates this result near its middle when is small compared with its length.
Problem Solving
Net Charge and Total Flux
Net Charge and Total Flux
Problem
A closed surface encloses and . A charge lies outside. What is the net electric flux?
Use
.
Solve
Check
Positive net enclosed charge gives positive outward flux; the external charge affects the field but adds no net flux.
Inside a Uniformly Charged Sphere
Inside a Uniformly Charged Sphere
Problem
A solid insulating sphere of radius carries a uniformly distributed charge . Find the field at .
Use
and .
Solve
directed radially outward.
Check
At half the sphere’s radius, the field is half its surface value, consistent with the linear dependence inside.
Field of an Infinite Sheet
Field of an Infinite Sheet
Problem
An isolated infinite sheet has uniform charge density . Find the field magnitude on either side.
Use
A pillbox has flux through two end caps: .
Solve
The field points away from the positively charged sheet on each side.
Check
The arbitrary cap area cancels, and both sides contribute equally to the outward flux.
Gauss’ Law Checkpoint