CoMPhy Lab blogs

PDF version

TL;DR

Gauss’ law states that the net electric flux through any closed surface is proportional to the total charge enclosed inside it. Its integral form, , is most practically used with high‐symmetry geometries (spherical, cylindrical, planar). Even though it might seem universal, using it directly for complex geometries often requires additional methods. The differential form, , underpins charge‐field relationships in Maxwell’s equations. Key insights include: flux remains invariant if charges stay within the boundary, and external charges yield zero net flux through a given surface. Applications to spherical shells, infinite planes, and wires highlight its computational utility. However, without symmetry, one typically reverts to direct integration or other approaches.

Often, one of the first wonders students encounter in electrostatics is the deceptively simple yet powerful Gauss’ law. I still recall my own initial surprise when I realized flux through any closed surface enclosing a single charge remained the same, no matter how oddly shaped that surface was. In this post, I hope to convey that same amazement while walking you through the essential details and derivations.

Question we ask: which of the following three surfaces will see the maximum flux of pass through itself?

fig1 Fig. A cone, a sphere, and a batman symbol (enclose it in the front and the back) encircle a lonely charge of magnitude . Which of the three will experience maximum eleectric field flux passing through them? This is perhaps the most counterintuitive result of the Gauss law.

Try it yourself

Instead of taking my (well, Gauss’) word for it, try finding the flux through the cone and the circle by integrating the dot product of the local electric field and the area (note that for cone, we must account for both the lateral and the base area). Once you find the solution, make a PR at the GitHub repository please show all intermediate steps.

General form of Gauss’ law

Main statement of Gauss' law

The flux of electric field though a closed surface (known as the Gaussian surface) is equal to the amount of change enclosed by that surface. , is the electric field, is the normal vector to the area element , is the change enclosed inside the Gaussian surface and is the permittivity-of-free-space.

  • In the differential form, it is identical to: , where is the local electric changed density.

Let us define the flux as:

Then,

Of course, is

where and are the surface and volumetric change densities, respectively.

Proof:

Caution

I leave it upto you to decide if the following derivations are the proofs or merely consistency checks for the Gauss’ law.

Special case of spherical Gaussian surface enclosing a single charge:

|500

Electric field by a point change:

Flux through a sphere of radius ,

Arbitary Gaussian surface enclosing a single charge:

|750

Electric field by a point change:

Local flux at the indicated location:

Here, is in fact the solid angle subtended by the local area element.

The solid angle integrates to give resulting in


Consequences of Gauss’ law

Displace the charge all you want, it won’t change the flux

The flux of only depends on the amount of charge contained inside a Gaussian surface and not on whether or not the charge is moving inside the space enclosed by this Gaussian surface.

Remarkable property: If charges are moved around but do not cross the boundary of , the flux of through remains unchanged. Despite this unchanging flux, the field itself can undergo substantial modifications everywhere else. Conversely, if charges do cross the boundary of , the flux through will generally change.

A charge outside the Gaussian surface imparts net zero flux in that control surface

It is easier to see by construction that electric field lines coming out of a charge outside a Gaussian surface will pass straight through without creating any global flux.

|750

On the impossibility of equilibrium in electrostatics

In any electrostatic field, a charge cannot be in stable equilibrium.

A single point charge cannot remain in stable equilibrium under the electrostatic influence of other, fixed charges in vacuum. Can you think of a scenario? Say, we do. And now, let us enclose this within a small closed surface . For to be in stable equilibrium, the net electric field from all other charges must point inward everywhere on . Such an inward field is critical to create a restoring force for any small displacement of . However, Gauss’s theorem tells us that the total electric flux through must be zero if no net charge (creating this electrostatic field) is contained inside . This zero flux requirement forces the field to have both inward and outward components on the surface, contradicting the need for a purely inward field. Hence, no purely electrostatic arrangement of external charges can hold a point charge in stable equilibrium in a vacuum. |250

Symmetries to the rescue

Now, one of the best ways to make Gauss’ law practical is by using symmetry arguments. Below are three major symmetry cases that come in handy.

Plannar symmetry

|750

Consider an infinite sheet with uniform surface‐charge density . By symmetry, the electric field must point perpendicular to the sheet and have the same magnitude on either side (left-right symmetry).  Select a “pillbox” (a short cylinder) that straddles the sheet as your Gaussian surface.  The flux then emerges through the two circular faces only; there is no flux through the curved surface because is parallel there.  The integral form of Gauss’s law yields

Hence, an infinite charged plane produces a constant electric field whose magnitude depends solely on .

Special case:

When two parallel sheets carry equal and opposite surface‐charge densities and , superposition implies that the fields from each sheet add in the region between them and cancel outside.  Specifically, in the space between the plates, each sheet contributes in the same direction, giving a total

Outside the plates, the fields from the two sheets have opposite directions and thus cancel to zero, assuming the plates are large compared to their separation. This configuration approximates the uniform field of a parallel‐plate capacitor.

Cyliindrical symmetry

|750

Consider an infinitely long wire with a uniform linear charge density .  By symmetry, the electric field at distance from the wire must point radially outward and have constant magnitude on a coaxial cylindrical surface of radius .  Let us choose this coaxial cylinder as our Gaussian surface (length L).  The flux is through the curved surface only; both end caps see parallel to their planes and hence yield no net contribution.  Applying Gauss’s law,

The field diminishes as from the wire.

Spherical symmetry

Here, let us consider two cases: 1. uniformly charged sphere with charge density and 2. a thin spherical shell with change . Both have a radius of . Also, assume .

|750

For :

Here, the Gaussian surface contains the entire spherical object inside it. So, in both cases, the Gaussian surface sees a total charge of .

Consequently,

For :

  • Shell: Charge enclosed inside the shell for (assuming infinitely thin shell) is . So, .

So, the final result for shell is |750

  • Uniformly changed sphere: For uniformly charged sphere,

Substituting, :

So, the final result for uniformly charged sphere is |750

Note

To play with the above plots, see: Gauss-law-of-electrostatics.ipynb

A critique of the Gauss’ law in the non-local form

One might wonder: is Gauss’ law too good to be true for complicated geometries? Below, I share a brief critique.

Illusion of Generality

The integral form,

can give a misleading impression that it solves any electrostatic field problem elegantly. While it is indeed general as a statement of charge–field relationships, practical usage relies heavily on symmetry arguments to simplify the surface integral.

Dependence on Symmetry

Gauss’s integral theorem is most effective when the field and geometry exhibit high symmetry (e.g., spherical, cylindrical, or planar). In such cases, one can choose a closed surface where the electric field is either constant in magnitude or zero over different parts of the surface. This makes the flux integral collapse to a simple multiplication, thus giving a direct link between enclosed charge and field magnitude.

Limitations in Complex Geometries

For configurations lacking these symmetries—such as a uniformly charged disk or other irregular charge distributions—no straightforward closed surface simplifies the flux integral. In these scenarios, one must resort to more laborious methods, like direct integration of Coulomb’s law or employing the local (differential) form combined with suitable boundary conditions.

Note:

Of course, let us be very clear that the above critique is only about the non-local form (or integral formulation) of Gauss’ law. If we use the more general differential form (or together with the Maxwell’s laws of electromagnetism, the above limitations do not apply).

Some food for throught

Gauss’ law is agnostic to the number of dimensions in the problem. In this note, we mainly looked at cases in 3D. Now, think about living in a 2D space. Answer the following:

  1. How does the Coulomb’s law change in 2D?
  2. Adapt Gauss’s law to a 2D problem, where flux becomes a line integral around a closed loop. Consider a point charge qqq in a 2D plane. Choose a circle of radius around the charge as the “Gaussian” boundary. Compute the total radial component of along this circle and show that it is proportional to (with an appropriate constant reflecting 2D geometry).
  3. For a hypothetical “4D” space, the electric field of a point charge might scale differently with distance. Use dimensional analysis to argue how Gauss’s law might look there, and what the “closed surface” would mean in 4D. Hint: Highlight the dimension-agnostic idea that flux = enclosed charge/​ remains structurally the same, although radius-dependencies of and definitions of “surface” change with dimension.

Note: To submit answers to the questions above or in case you find a mistake in this note, please feel free to open a pull request at the repository: link to repository.

Derivation of Gauss law in differential form

Integral form:

In this post, we encountered Gauss law in integral form as,

where is the electric field, is the total charge enclosed by , and is the permittivity of free space.

Relate enclosed charge to charge density.

The enclosed charge can be expressed in terms of the volume charge density using a volume integral:

Here, is the volume bounded by the surface (S).

Apply the divergence theorem

Rewrite the left side of Gauss’s law using the divergence theorem (also known as Gauss’s divergence theorem):

Gauss' divergence therorem

This is yet another significant contribution from Gauss. It relates volume integrals to fluxes at the boundaries. This theorem is more generally used throughout the Physics literature. For example, simplifying integrals in RayleighBénard convection or in TaylorCulick retractions. Rate of change of a physical quantity (see Relationship-between-rate-of-change-of-a-physical-quantity-and-its-divergence) in a volume is tied directly to its net flux across the boundary of that volume. More generally, in fluid mechanics, this principle underpins conservation laws such as mass, momentum, or energy.

Thus,

Conclude the differential form

Because this equation must hold for any volume , the integrands themselves must be equal at every point in space:

This is Gauss’s law in differential form. It states that the divergence of the electric field at a point is proportional to the local charge density at that point.

Significance to Maxwell’s laws of electromagnetism

The Gauss’ law of electrostatics is one of the special cases of Maxwell’s laws of electromagnetism.

Maxwell’s Equations

Differential Form

Gauss’s Law (Electric):

Gauss’s Law (Magnetic):

Faraday’s Law of Induction:

Ampère–Maxwell Law:

Integral Form

Gauss’s Law (Electric):

Gauss’s Law (Magnetic):

Faraday’s Law of Induction:

Ampère–Maxwell Law:

Conclusion

That brings us to the end of this reflective overview of Gauss’ law and its place within Maxwell’s equations. Even though the symmetrical geometries often steal the spotlight, the underlying message is that Gauss’ law is deeply fundamental—tied intimately to how charges shape and define the electric field around them. I hope these notes, with their many examples, help you see both its elegance and its limitations.

Info

Thanks for reading, and feel free to dive deeper (or suggest improvements) via the GitHub repository!


Some side notes: