In short

Gauss's law states that the total electric flux through any closed surface equals the net charge enclosed by that surface, divided by the permittivity of free space:

\boxed{\;\oint_{S}\vec{E}\cdot d\vec{A} \;=\; \frac{Q_\text{enc}}{\varepsilon_0}\;}

The integral is taken over a closed surface S (called a Gaussian surface) — a mathematical surface of your choosing, not a physical object. d\vec{A} is the outward-pointing area element of the surface. Q_\text{enc} is the algebraic sum of all charges strictly inside the surface; charges outside contribute nothing to the total flux.

Gauss's law is a rewriting of Coulomb's law plus superposition — exactly equivalent for static charges. It is always true for the electrostatic field, but computationally useful only when symmetry (spherical, cylindrical, or planar) makes \vec{E} constant in magnitude and either perpendicular or parallel to the Gaussian surface. In such cases, \oint \vec{E}\cdot d\vec{A} reduces to |\vec{E}|A, and the law gives the field in one line. For less symmetric distributions, Gauss's law still holds, but you cannot pull |\vec{E}| out of the integral, and you fall back on Coulomb's law and direct integration.

One of Maxwell's four equations, Gauss's law is one of the deepest statements in all of physics: the geometry of field lines (how many emerge from a region) is controlled entirely by the charge sitting inside. No law of motion, no time-dependence, no details of how the charges got there — just charge in, flux out.

Imagine you are designing the lightning rod for a tall building in Pune during the monsoon. You need to know the electric field just above the rod's rounded tip, because that tells you when air will ionise and the lightning will strike your rod instead of the antenna next door. Model the rod's tip as a small charged sphere holding some induced charge Q — the charge drawn up by the thundercloud's field above. If you wanted to compute the field just above the tip from Coulomb's law, you would have to integrate the contributions of every little patch of charge on the sphere's surface, weighted by its position and its inverse-square distance, adding up vectors from millions of patches. For a sphere, this integral is tedious. For any real rod shape, it is impossible by hand.

Now try it Gauss's way. Draw an imaginary sphere of radius r around the rod's tip, concentric with it. By the symmetry of the charged sphere, the field on this imaginary sphere must point radially and have the same magnitude E everywhere on it. The flux through this imaginary sphere is therefore just E times the sphere's area: \Phi = E \cdot 4\pi r^2. The enclosed charge is Q. Gauss's law says \Phi = Q/\varepsilon_0. So:

E \cdot 4\pi r^2 \;=\; \frac{Q}{\varepsilon_0} \quad\Longrightarrow\quad E \;=\; \frac{Q}{4\pi\varepsilon_0 r^2}.

Two lines. Field of a charged sphere, done. And the answer is exactly the field of a point charge of the same total Q — which you could not have guessed without a lot more work.

This is the power of Gauss's law. It is a reformulation of Coulomb's law that replaces the "integrate over every source charge" view with a "count the total flux out of a closed surface" view. The two are mathematically equivalent for static charges; they are different ways of saying the same thing. But the two are not equally convenient: for problems with enough symmetry, Gauss's law collapses what would be a hard integral into a one-line calculation. And on a deeper level, Gauss's law is one of Maxwell's four equations — a foundational statement about how the electric field is sourced by charge, valid not just for electrostatics but for the full dynamic theory of electromagnetism.

This article builds Gauss's law from scratch. First, the statement and its components. Then the derivation from Coulomb's law — how the inverse-square law of a point charge makes the flux through any enclosing surface come out to exactly q/\varepsilon_0. Then the most important single skill in applying it: picking a Gaussian surface exploiting symmetry. Three worked examples drill the recipe. The going-deeper section handles the differential form, solid angle derivation, and why Gauss's law is the first of Maxwell's equations.

The statement, precisely

Let S be any closed surface in space — a sphere, a cube, a soda can, a lumpy balloon, anything with an inside and an outside, as long as it has no holes. The electric flux through S (from the electric flux article) is

\Phi_E \;=\; \oint_{S} \vec{E}\cdot d\vec{A},

where the circle on the integral sign means "closed surface," and d\vec{A} is the area element whose direction is the outward normal to S (outward from the enclosed volume, by convention).

Gauss's law says: regardless of how the charges are arranged inside or outside S, this flux equals the total charge enclosed by S, divided by \varepsilon_0:

\oint_{S}\vec{E}\cdot d\vec{A} \;=\; \frac{Q_\text{enc}}{\varepsilon_0}. \tag{1}

Here Q_\text{enc} is the algebraic sum of all charges strictly inside the surface:

Q_\text{enc} \;=\; \sum_{\text{charges inside } S} q_i \quad\text{(or }\int_V \rho\,dV\text{ for a continuous distribution)}.

Positive charges add; negative charges subtract. A +5 nC charge and a -3 nC charge inside S contribute a net Q_\text{enc} = +2 nC, and the flux out of S is 2\,\text{nC}/\varepsilon_0.

Three features of equation (1) need to be internalised before you use it.

1. Charges outside do contribute to \vec{E} on the surface, but not to the total flux. A charge sitting outside S produces field lines that enter S through one part of its surface and exit through another; the net flux through the closed surface is zero. The field at any individual point on S depends on all charges — inside and outside — but the integral of \vec{E}\cdot d\vec{A} over the closed surface captures only the inside charges. This is exactly what Gauss's law says.

2. The surface S is a mathematical construction, not a physical object. You draw it in space, wherever you want, with whatever shape is convenient. It does not need to be a metal shell or a wall or anything physical. It is just a set of points in space defining a closed region, and the flux is the integral of the field over that set.

3. Gauss's law holds for any closed surface, always. The law is exact. The only restriction is that S must be closed. Whether or not the law is useful for computing \vec{E} is a different question — that depends on whether you can choose S so that the flux integral simplifies, which in turn depends on the symmetry of the charge distribution.

Deriving Gauss's law from Coulomb's law

The most satisfying way to prove Gauss's law is to show it for one point charge, then invoke superposition for many charges. The key is the inverse-square law.

Step 1: Flux of a point charge through a concentric sphere

Put a point charge q at the origin. Draw a Gaussian sphere of radius r centred on the charge. At every point on the sphere, the field points radially outward (for q>0; radially inward for q<0), with magnitude

|\vec{E}| \;=\; \frac{q}{4\pi\varepsilon_0 r^2}.

Why: the field of a point charge, from the electric field article, equation (3).

At every point on the Gaussian sphere, \vec{E} is parallel to the outward normal \hat{n} (both radial). So \vec{E}\cdot d\vec{A} = |\vec{E}|\,dA at every point, and |\vec{E}| is the same everywhere on the sphere — it only depends on r, which is constant.

Pull |\vec{E}| out of the integral:

\Phi \;=\; \oint \vec{E}\cdot d\vec{A} \;=\; |\vec{E}|\oint dA \;=\; \frac{q}{4\pi\varepsilon_0 r^2} \cdot 4\pi r^2 \;=\; \frac{q}{\varepsilon_0}. \tag{2}

Why: \oint dA over a sphere of radius r is the total surface area 4\pi r^2. The r^2 from the field cancels the r^2 from the area, leaving an r-independent flux. This cancellation is the core of Gauss's law — it only works because the field falls exactly as 1/r^2.

So the flux through a sphere concentric with the charge is q/\varepsilon_0, independent of the sphere's radius.

Flux of a point charge through a concentric sphere A point charge at the centre of a sphere of radius r. Field lines emerge radially in all directions. The total flux through the sphere equals q/ε₀ regardless of r — the 1/r² falloff of the field exactly cancels the r² growth of the area. Gaussian sphere (radius r) +q dA
The flux of a point charge through an enclosing sphere is $q/\varepsilon_0$ regardless of the sphere's radius. The $1/r^2$ falloff of $|\vec{E}|$ exactly compensates the $r^2$ growth of the sphere's area, so the product is constant.

Step 2: Flux through an arbitrary closed surface enclosing the charge

The result from Step 1 is for a sphere concentric with the charge. What about an arbitrary closed surface S enclosing q — say a potato-shaped one?

Consider a small patch dA on the potato. The flux through this patch is

d\Phi \;=\; \vec{E}\cdot d\vec{A} \;=\; |\vec{E}|\,dA\cos\theta,

where \theta is the angle between \vec{E} (radial) and the patch's outward normal. Geometrically, dA\cos\theta is the projection of the patch onto a plane perpendicular to \vec{E} — and that projection is the solid angle subtended by the patch, times r^2:

dA\cos\theta \;=\; r^2\,d\Omega,

where d\Omega is the element of solid angle (units: steradians, sr). So:

d\Phi \;=\; |\vec{E}|\,r^2\,d\Omega \;=\; \frac{q}{4\pi\varepsilon_0 r^2}\cdot r^2\,d\Omega \;=\; \frac{q}{4\pi\varepsilon_0}\,d\Omega.

Why: the r^2 cancellation appears again. The key insight is that on any surface enclosing the charge, each solid-angle element d\Omega contributes the same amount of flux, independent of how far that piece of the surface happens to be from the charge.

Integrate over the full closed surface. The total solid angle subtended from an interior point by a closed surface is exactly 4\pi steradians (this is a geometric fact: a full sphere of directions has solid angle 4\pi). Therefore:

\Phi_\text{total} \;=\; \frac{q}{4\pi\varepsilon_0}\cdot 4\pi \;=\; \frac{q}{\varepsilon_0}.

Why: the integral \oint d\Omega = 4\pi over any closed surface enclosing the charge. It does not matter whether the surface is a sphere, a cube, or a bizarre lumpy shape — the directions from the charge still sweep through a full 4\pi steradians.

So equation (2) holds not only for concentric spheres, but for any closed surface enclosing the charge. The flux of a point charge through any enclosing surface is q/\varepsilon_0.

Flux is the same for any shape enclosing the charge Side-by-side comparison: a point charge inside a sphere (left) and the same charge inside an irregular blob-shaped surface (right). Field lines emerge radially and cross each surface. The total flux is the same in both cases because every direction from the charge intercepts the surface exactly once. sphere: Φ = q/ε₀ blob: Φ = q/ε₀ (same!)
The flux through any closed surface that encloses the point charge is the same — $q/\varepsilon_0$. The shape does not matter because every direction outward from the charge hits the surface exactly once, and the total solid angle from an enclosed point is always $4\pi$.

Step 3: Charges outside contribute zero flux

What if the charge q sits outside the closed surface S? Field lines from q still cross S, but now they both enter and exit — every line goes in through one part of S and comes out through another.

Consider the flux on the entering piece: \vec{E} points inward there, and d\vec{A} points outward, so \vec{E}\cdot d\vec{A} is negative. On the exit piece: both are outward, so \vec{E}\cdot d\vec{A} is positive. By the solid-angle argument, the positive and negative contributions cancel exactly — each radial direction from q crosses S an even number of times (in, out), so the net contribution from each solid-angle element is zero.

\Phi \;=\; 0 \quad\text{for charges outside }S. \tag{3}

Why: a charge outside the surface sends field lines that must go through the surface an even number of times (enter, exit), contributing equal positive and negative amounts that sum to zero. The solid angle subtended at the external charge by the closed surface is zero.

Step 4: Superposition — multiple charges

For several charges q_1, q_2, \ldots, q_n, each inside or outside S, the field is the vector sum \vec{E} = \sum_i \vec{E}_i, so the flux is the sum of flux contributions:

\Phi \;=\; \oint\vec{E}\cdot d\vec{A} \;=\; \sum_i \oint\vec{E}_i\cdot d\vec{A}.

From Steps 2 and 3, each individual \oint\vec{E}_i\cdot d\vec{A} is either q_i/\varepsilon_0 (if q_i is inside S) or 0 (if q_i is outside). Adding:

\Phi \;=\; \frac{1}{\varepsilon_0}\sum_{q_i \,\in\, S} q_i \;=\; \frac{Q_\text{enc}}{\varepsilon_0}. \tag{4}

This is Gauss's law. It is an immediate consequence of Coulomb's inverse-square law plus linear superposition.

Why Gauss's law is always true but only sometimes useful

The derivation above was general — no assumptions about the shape of S or the positions of the charges. Gauss's law holds for every closed surface in every electrostatic configuration, always. You can point to any lumpy closed surface in a room full of scattered charges, and equation (1) is true for that surface.

But using Gauss's law to find \vec{E} requires more: you need to be able to pull |\vec{E}| out of the integral. That means you need a closed surface on which:

  1. |\vec{E}| is constant everywhere (not varying over the surface), and
  2. \vec{E} is either everywhere parallel to the outward normal, or everywhere perpendicular to it.

Condition 2 handles the dot product: if \vec{E} is parallel to d\vec{A} on a piece of the surface, the dot product is |\vec{E}|\,dA; if perpendicular, it is zero (no flux through that piece).

The only way to simultaneously satisfy both conditions is if your Gaussian surface respects the symmetry of the charge distribution. Three types of symmetry allow this:

Symmetry Example Gaussian surface
Spherical point charge, uniformly charged sphere, spherical shell sphere centred on the distribution
Cylindrical infinite line charge, infinitely long charged cylinder, coaxial cable cylinder coaxial with the distribution
Planar infinite sheet of charge, infinite slab pillbox (cylinder with flat ends) piercing the plane

For any other charge distribution — two unequal point charges, a finite line, a ring, an oddly shaped conductor — no Gaussian surface has the two properties. Gauss's law is still true for such distributions, but useless for computing \vec{E}: you cannot simplify the flux integral, and you must fall back on direct integration of Coulomb's law.

This is the second most important thing to remember after the statement of the law: symmetry first, then choose the Gaussian surface. You do not choose a surface and hope it works. You ask "what symmetry does my charge distribution have?" and choose the surface that respects that symmetry.

The recipe for using Gauss's law

Given a charge distribution with suitable symmetry, follow these five steps:

  1. Identify the symmetry. Is it spherical (point or sphere), cylindrical (line or cylinder), or planar (plane)? This determines the shape of the Gaussian surface.
  2. Choose a Gaussian surface that passes through the point where you want to find \vec{E}, respecting the symmetry. For spherical, a concentric sphere. For cylindrical, a coaxial cylinder. For planar, a pillbox with one flat face on each side of the plane.
  3. Argue by symmetry that on each part of the surface, \vec{E} is either parallel or perpendicular to the outward normal, and that |\vec{E}| is constant on the parallel parts. Write down the argument explicitly — do not just assume; the symmetry argument is half the physics.
  4. Compute the flux: \oint\vec{E}\cdot d\vec{A} = |\vec{E}|\cdot A_\parallel + 0\cdot A_\perp = |\vec{E}|\cdot A_\parallel, where A_\parallel is the area of the surface where \vec{E}\parallel d\vec{A}.
  5. Find the enclosed charge Q_\text{enc} (using the geometry of the distribution) and apply Gauss's law: |\vec{E}|\cdot A_\parallel = Q_\text{enc}/\varepsilon_0. Solve for |\vec{E}|.

The companion chapters applications of Gauss's law — spheres and planes and applications of Gauss's law — cylinders and cavities walk through this recipe for every standard symmetric distribution. Here, let us work three quick cases to cement the method.

Worked examples

Example 1: Flux through a cube with a charge off-centre

A point charge q = +4.0\,\mu\text{C} is placed at some location inside a cubical Gaussian surface (but not at the cube's centre). What is the total electric flux through the entire cube?

Cube with a point charge anywhere inside A cube drawn in 3D perspective with a +q point charge positioned off-centre inside it. Field lines exit the cube through various faces — the total flux is q/ε₀ regardless of where the charge sits inside, or how many unequal charges are there, as long as the net enclosed charge is q. +q Φ = q/ε₀ (same as any closed S)
The flux through the cube equals $q/\varepsilon_0$, regardless of where inside the cube the charge sits. Gauss's law cares only about *how much* charge is enclosed, not *where* it is.

Step 1. Identify the enclosed charge.

Q_\text{enc} = q = +4.0\,\mu\text{C} = 4.0\times 10^{-6} C.

Why: the charge is inside the cube; its position within the cube is irrelevant for the total enclosed charge — all that matters is whether it is in or out.

Step 2. Apply Gauss's law directly.

\Phi \;=\; \frac{Q_\text{enc}}{\varepsilon_0} \;=\; \frac{4.0\times 10^{-6}}{8.854\times 10^{-12}} \;\approx\; 4.52\times 10^{5} \;\text{N·m}^2/\text{C}.

Why: the law in its most immediate form. No integration, no symmetry needed — we are finding the total flux, not the field. The shape of the cube and the position of the charge inside are simply irrelevant.

Result: \boxed{\Phi \approx 4.52 \times 10^5\;\text{N·m}^2/\text{C}}.

What this shows: Gauss's law is useful not just for finding \vec{E} but also for computing total fluxes. The cube's shape, the charge's position, even additional charges outside the cube — none of these affect the answer. Only the net enclosed charge does. This is the cleanest illustration of the law's content: flux out = charge in, period.

Example 2: Field of a point charge, via Gauss's law

Rederive the field of a point charge q at the origin, at distance r, using Gauss's law. (We already know the answer from Coulomb's law; the point is to see the Gauss's law machinery at work in a trivially symmetric case.)

Gaussian sphere around a point charge A point charge at the centre with a concentric Gaussian sphere of radius r. The field E is radial, of constant magnitude E on the sphere, and parallel to every outward normal. The flux through the sphere is E times the sphere's area 4πr². Gaussian sphere, radius r +q E dA
The Gaussian sphere concentric with the charge makes $\vec{E}$ parallel to $d\vec{A}$ everywhere on it, with $|\vec{E}|$ constant — the two conditions that let Gauss's law yield $|\vec{E}|$ in one line.

Step 1. Identify the symmetry.

A point charge is spherically symmetric about its own position. Any rotation about the charge leaves the distribution unchanged. So the field at any point must depend only on the distance r from the charge and must point radially (the only direction that respects rotational symmetry).

Why: if \vec{E} at a point \vec{r} had any non-radial component, rotating the system about the charge would give a different field direction — but the distribution has not changed, so the field cannot have changed either. Hence \vec{E} is purely radial.

Step 2. Choose a Gaussian surface.

A sphere of radius r centred on the charge. By symmetry, |\vec{E}| is the same at every point on this sphere and the direction is radial — parallel to the outward normal \hat{n} everywhere.

Why: spherical symmetry demands that any surface that "looks the same from every direction from the charge" makes |\vec{E}| constant on the surface. A concentric sphere does exactly that.

Step 3. Compute the flux.

\oint \vec{E}\cdot d\vec{A} \;=\; \oint |\vec{E}|\,dA \;=\; |\vec{E}| \oint dA \;=\; |\vec{E}| \cdot 4\pi r^2.

Why: parallel dot products give |\vec{E}|\,dA; |\vec{E}| is constant so it factors out; the remaining integral is the area of a sphere of radius r, which is 4\pi r^2.

Step 4. Find the enclosed charge.

Q_\text{enc} = q.

Why: the single point charge is at the centre, which is inside the Gaussian sphere.

Step 5. Apply Gauss's law and solve.

|\vec{E}| \cdot 4\pi r^2 \;=\; \frac{q}{\varepsilon_0} \quad\Longrightarrow\quad \boxed{|\vec{E}| \;=\; \frac{q}{4\pi\varepsilon_0 r^2}}.

Why: divide both sides by 4\pi r^2. The 4\pi in the denominator is the geometric factor for the sphere — it is the same 4\pi that lives in Coulomb's law, and it traces to the total solid angle of a sphere.

Result: |\vec{E}| = q/(4\pi\varepsilon_0 r^2), pointing radially outward for q>0.

What this shows: We have reproduced Coulomb's law from Gauss's law — exactly as expected, since the two are equivalent statements. What looks cosmetic here (one-line answer) becomes decisive in the next example, where the charge distribution has volume rather than being a point.

Example 3: Field inside and outside a uniformly charged ball

A solid sphere of radius R carries a uniform volume charge density \rho (total charge Q = \tfrac{4}{3}\pi R^3 \rho). Find the electric field at all points, both inside and outside the sphere. This is the model for a uniformly charged ball bearing, a charged Van de Graaff sphere at IIT Bombay, or — to good approximation — a small charged hailstone in a Pune thundercloud.

Gaussian spheres inside and outside a uniformly charged ball A uniformly charged solid sphere of radius R shown in light shading. Two concentric Gaussian spheres: one inside at radius r less than R enclosing only part of the total charge, and one outside at radius r greater than R enclosing all of the charge. ρ (uniform) R inside r < R outside r > R
Two Gaussian spheres do all the work — one with $r<R$ inside the ball, one with $r>R$ outside. Each encloses a different amount of charge; Gauss's law delivers the field in each region in one line.

Outside the ball: r \ge R

Step 1. Symmetry. Spherical — the distribution looks the same from every direction about the centre.

Step 2. Gaussian surface: a concentric sphere of radius r.

Step 3. Symmetry argument. \vec{E} radial, |\vec{E}| constant on the surface.

Step 4. Flux: \oint \vec{E}\cdot d\vec{A} = |\vec{E}|\cdot 4\pi r^2.

Step 5. Enclosed charge: the entire ball is inside the Gaussian sphere, so Q_\text{enc} = Q = \tfrac{4}{3}\pi R^3 \rho. Gauss's law:

|\vec{E}|\cdot 4\pi r^2 \;=\; \frac{Q}{\varepsilon_0} \quad\Longrightarrow\quad |\vec{E}| \;=\; \frac{Q}{4\pi\varepsilon_0 r^2}.

Why: outside the ball, Gauss's law treats the uniform ball as if all its charge Q were concentrated at the centre — the external field is identical to that of a point charge of the same total charge. This is a result, not an assumption: a surprising gift of the inverse-square law.

Inside the ball: r < R

Step 1. Same spherical symmetry (the ball, extended to interior points, still looks the same from every direction about its centre).

Step 2. Gaussian surface: a concentric sphere of radius r < R, entirely inside the ball.

Step 3. Same symmetry argument: \vec{E} radial, |\vec{E}| constant.

Step 4. Same flux: |\vec{E}|\cdot 4\pi r^2.

Step 5. Enclosed charge: only the charge in the inner sphere of radius r is enclosed, not the whole ball. The enclosed volume is \tfrac{4}{3}\pi r^3, and the enclosed charge is

Q_\text{enc} \;=\; \rho \cdot \tfrac{4}{3}\pi r^3.

Why: charge density \rho times the enclosed volume. The volume here is just a sphere of radius r — the part of the full ball that lies inside the Gaussian surface. The rest of the ball, at radii between r and R, contributes zero flux to the inner Gaussian sphere (by the "outside charges give zero" argument).

Gauss's law gives:

|\vec{E}|\cdot 4\pi r^2 \;=\; \frac{\rho \cdot \tfrac{4}{3}\pi r^3}{\varepsilon_0} \quad\Longrightarrow\quad |\vec{E}| \;=\; \frac{\rho r}{3\varepsilon_0}.

Using \rho = Q/(\tfrac{4}{3}\pi R^3):

|\vec{E}| \;=\; \frac{Q r}{4\pi\varepsilon_0 R^3}.

Why: the field inside grows linearly with r — starting from zero at the centre (r=0) and rising to Q/(4\pi\varepsilon_0 R^2) at the surface (r=R), where it joins continuously with the outside formula. Linear growth inside, inverse-square falloff outside, smooth join at r=R.

Result:

\boxed{|\vec{E}|(r) \;=\; \begin{cases} \dfrac{Qr}{4\pi\varepsilon_0 R^3} & r\le R \\[4pt] \dfrac{Q}{4\pi\varepsilon_0 r^2} & r\ge R \end{cases}}

What this shows: Gauss's law solved a three-dimensional volume-charge problem in a few lines. Direct integration using Coulomb's law (the approach of superposition of electrostatic forces extended to a continuous ball) would have taken a page of spherical-polar integration and a trigonometric substitution. The Gaussian-surface move replaces the integral by an algebraic equation. This is the payoff of symmetry.

Common confusions

If you came here to understand Gauss's law, derive it from Coulomb, and use it for symmetric problems, you have what you need. What follows is for readers interested in the differential form, the solid angle proof in more detail, and Gauss's law as one of Maxwell's equations.

The differential form of Gauss's law

The integral form (1) connects a surface integral to a volume quantity (the enclosed charge). There is an equivalent differential form that connects the field at a point to the charge density at the same point.

Write Q_\text{enc} = \int_V \rho\,dV, where \rho is the volume charge density (C/m³) and V is the volume enclosed by S. Gauss's law becomes:

\oint_{S}\vec{E}\cdot d\vec{A} \;=\; \frac{1}{\varepsilon_0}\int_V \rho\,dV.

The divergence theorem (a result from vector calculus) converts the left-hand side:

\oint_{S}\vec{E}\cdot d\vec{A} \;=\; \int_V (\nabla\cdot\vec{E})\,dV.

So:

\int_V (\nabla\cdot\vec{E})\,dV \;=\; \int_V \frac{\rho}{\varepsilon_0}\,dV.

This must hold for every choice of volume V. The only way two integrals over arbitrary volumes can be equal is if the integrands are equal at every point:

\boxed{\;\nabla\cdot\vec{E} \;=\; \frac{\rho}{\varepsilon_0}\;} \tag{5}

This is Gauss's law in differential form. It says the divergence of \vec{E} at any point equals the charge density at that point, divided by \varepsilon_0. A positive divergence is a "source" (positive charge); a negative divergence is a "sink" (negative charge); zero divergence is charge-free space.

The two forms — (1) and (5) — say the same physics. The integral form is useful for finite regions and symmetric problems; the differential form is useful for local statements and for plugging into the other three Maxwell equations.

Why the solid-angle argument works: more carefully

We claimed that the flux through a tiny surface patch is |\vec{E}|\,r^2\,d\Omega — where d\Omega is the solid angle. Let us check.

Imagine a patch of surface at distance r from a point charge, with outward normal \hat{n} making angle \theta with the radial direction \hat{r}. The patch area is dA. The field magnitude is |\vec{E}| = kq/r^2.

  • Flux: \vec{E}\cdot d\vec{A} = |\vec{E}|\,dA\,\cos\theta = \dfrac{kq}{r^2}\,dA\cos\theta.
  • Solid angle: d\Omega = \dfrac{dA\cos\theta}{r^2} — this is the definition of solid angle (area of the patch projected onto a unit sphere, per unit of r^2).

Combining: \vec{E}\cdot d\vec{A} = kq\,d\Omega = \dfrac{q}{4\pi\varepsilon_0}\,d\Omega.

Integrating over any closed surface that encloses the charge, the solid angle integrates to 4\pi (a full sphere of directions). So the flux integrates to q/\varepsilon_0. That is Gauss's law for a single enclosed charge.

For a charge outside the surface, each radial direction from the charge intercepts the surface an even number of times — entering and exiting in pairs. The entering patches contribute -d\Omega (the normal points opposite the radial direction); the exit patches contribute +d\Omega. Each pair cancels; the total is zero.

Gauss's law as a Maxwell equation

Maxwell's equations are the complete theory of classical electromagnetism, four equations that together describe how electric and magnetic fields are produced and how they evolve. In SI units, and in differential form, they are:

  1. \nabla\cdot\vec{E} = \rho/\varepsilon_0 (Gauss's law for electricity — this article)
  2. \nabla\cdot\vec{B} = 0 (Gauss's law for magnetism — no magnetic monopoles)
  3. \nabla\times\vec{E} = -\partial\vec{B}/\partial t (Faraday's law of induction)
  4. \nabla\times\vec{B} = \mu_0\vec{J} + \mu_0\varepsilon_0\,\partial\vec{E}/\partial t (Ampère-Maxwell law)

Gauss's law for electricity is the first. It is a statement about sources of the electric field — charges produce diverging field lines. The second (Gauss's law for magnetism) says the magnetic field has no sources of its own (no monopoles). The third and fourth describe how time-varying fields produce each other — the mechanism by which light, radio, and radar waves propagate.

Gauss's law in the form we have stated — for static charges — is exact. The form (1) also holds in the full dynamic theory, as long as \rho is the instantaneous charge density. This is one of the deep symmetries of electromagnetism: the divergence of \vec{E} is determined by charge, period, at every instant.

When Gauss's law looks useful but isn't: a warning

A beginner's temptation is to use Gauss's law on problems that are not sufficiently symmetric. For instance: "Find the field at the centre of a square with four unequal charges at the corners." Can you use Gauss's law?

Answer: Gauss's law is true — the flux through a sphere around the centre equals the sum of enclosed charges, which for a symmetric choice might be zero. But you cannot extract \vec{E} from this. The distribution lacks the symmetry that would make |\vec{E}| constant on the Gaussian surface. The four unequal charges break spherical symmetry, so |\vec{E}| varies over the Gaussian sphere, and you cannot pull it out of the integral.

In such cases, go back to direct Coulomb's-law integration (or, for discrete charges, superposition as vector addition). The test is: does the distribution have a continuous symmetry group (rotations, translations, reflections) large enough to fix the direction and magnitude of \vec{E} everywhere on a surface? If yes, Gauss's law works. If not, it does not.

The three standard symmetric cases — spherical, cylindrical, planar — are the three continuous symmetry groups that admit this treatment. Those cases are exhaustively covered in applications of Gauss's law — spheres and planes and applications of Gauss's law — cylinders and cavities.

The physical picture: Gauss's law, lightning rods, and Faraday cages

Gauss's law is not just mathematics — it explains why practical electrical hardware behaves the way it does.

Lightning rods. A sharp metal tip concentrates the surface charge density (because on a conductor, \sigma is larger where the curvature is larger — a direct consequence of Gauss's law applied at the surface). Higher \sigma means higher field just above the tip, which ionises the air above the rod sooner than above a flat surface, making the lightning preferentially strike the rod. A well-designed lightning rod for a building in Cherrapunji or Mumbai relies on exactly this Gauss's-law geometry.

Faraday cages. The metal body of a Maruti Suzuki car, or the metal mesh around a sensitive cryostat at TIFR, is a closed conducting shell. By Gauss's law applied to a surface just inside the metal, plus the fact that \vec{E}=0 inside a conductor in equilibrium, it follows that the charge on the cage's inner surface must be zero whenever there is no charge inside the cage. Moreover, any external field induces a surface charge on the outside of the cage that exactly cancels the external field within — so the interior is shielded from external static fields entirely. The Faraday cage works because of Gauss's law.

The principle of the TIFR test chamber. High-precision experiments on charged particles are conducted inside grounded metallic enclosures that serve as Faraday cages. Gauss's law guarantees that stray electrostatic fields from outside — a student walking past with a wool sweater, a nearby thunderstorm — do not leak into the chamber. The experimentalist sees only the fields produced inside.

Coaxial cables. The field outside a charged cylinder with equal and opposite outer-shield charge is identically zero (the two cylinders' fluxes cancel at any external Gaussian surface). This is why coaxial cables carrying TV signals from the DTH dish to your Mumbai flat do not radiate: the sum of the inner and outer currents enclosed by any Gaussian surface outside the cable is zero, so the external field is zero, and the signal stays in the cable. You meet this calculation in applications — cylinders and cavities.

Where this leads next