Introduction

Gauss’s Law is a law that relates the flux of the electric field on a surface to the charge enclosed within that surface. What does that even mean? In this article, I want to walk you through the basics of electromagnetism and make it seem like even you could have derived this law if you knew what Gauss knew.

A special thank you to Professor Ramamurti Shankar for describing this intuitive way of explaining Gauss’s Law.

Coulomb’s Law

Some particles have an intrinsic property called charge. Because charges come from particles, charge must be “quantized”, or come in discrete amounts. We know charge is always in multiples of 1.610191.6 * 10^{-19} coulombs. This number is called ee, or the elementary charge. This is the charge of a proton, and an electron has charge e-e.

To understand how charges interact with other charges, it might be helpful to recall how gravity works. We use Newton’s Law of Universal Gravitation to describe the gravitational force:

Fg=GMmr2r^\vec{F}_g = G\cdot\frac{Mm}{|\vec{r}|^2} \hat{r}

where GG is the gravitational constant, MM and mm represent the mass of two different objects, r\vec{r} is the vector that represents the distance between the two bodies, and r^\hat{r} is a unit vector that points in the same direction as the distance between the two bodies.

However, what happens when we only examine one body? We get what is known as a field. The gravitational field of a body is a property that all bodies with mass have. We write it as:

g=Fgm=GMr2r^g = \frac{\vec{F}_g}{m} = \frac{GM}{|\vec{r}|^2}\hat{r}

This law is very similar to Coulomb’s Law, which describes the force between two charges.

Let’s say we have two charges, q1q_1 and q2q_2. We know that they have to exert some force on each other. This is described by Coulomb’s Law:

Fe=14πε0q1q2r2r^\vec{F}_e = \frac{1}{4\pi\varepsilon_0}\cdot\frac{q_1q_2}{|\vec{r}|^2}\hat{r}

The first term is Coulomb’s constant (also written as kk). The next term relates the product of the charges divided by the distance between them, and the third term creates a unit vector pointing in the direction of the distance between the charges. This allows us to create a force that points in the direction of the distance. Most introductory physics student have seen a form of this law.

However, what happens when we have only one charge? We can use the same method that we used to create the gravitational field, and get the electric field:

E(r)=Feq2=14πε0qr2r^\vec{E}(\vec{r}) = \frac{\vec{F}_e}{q_2}=\frac{1}{4\pi\varepsilon_0}\cdot\frac{q}{|\vec{r}|^2}\hat{r}

Similar to the gravitational field, whenever there is a charge present, there will be an electric field.

Electric Field of a Loop

Let’s get some practice with integrals and the electric field. If this doesn’t make sense, you can totally skip it. This is mainly just meant to show the work involved in calculating the electric field without Gauss’s Law.

Suppose we have a loop of radius rr and linear charge density λ\lambda. We want to find the electric field at a point pp near it. We can use the definition of the electric field and some integral calculus to do this.

Let’s draw our situation out:

image

So, let’s define a few things. The total charge is the linear charge density multiplied by the circumference of the loop We can solve this problem by dividing this ring into tiny sections of length dldl. We can denote the position of dldl with a vector r\vec{r’}. We can denote the position of pp with a vector. Let’s write these out:

Q=2πrλQ=2\pi r \lambda

r=<rcosθ,rsinθ,0>\vec{r}’=<r\cos \theta , r\sin \theta, 0>

p=<0,0,z>\vec{p} = <0, 0, z>

The distance between the point pp and dl can be written as the magnitude of a vector R\vec{R}: R=r2+z2|\vec{R}|=\sqrt{r^2+z^2}

And the charge of dldl is:

dq=λdldq = \lambda dl

Now, we can write the electric field formula for dldl:

dE(r)=14πε0dqR2R^d\vec{E}(\vec{r}) = \frac{1}{4\pi\varepsilon_0} \cdot \frac{dq}{|R|^2} \hat{R}

To find R^\hat{R} we use:

R^=prR=<0,0,z><rcosθ,rsinθ,0>r2+z2\hat{R} = \frac{\vec{p}-\vec{r}’}{|\vec{R}|} = \frac{<0, 0, z> - <r \cos \theta, r \sin \theta, 0>}{\sqrt{r^2+z^2}}

R^=<rcosθ, rsinθ, z>r2+z2\hat{R} = \frac{<-r\cos \theta ,\ -r\sin \theta ,\ z>}{\sqrt{r^2+z^2}}

Now, we can write:

dE(r)=14πε0λdlr2+z2<rcosθ, rsinθ, z>r2+z2d\vec{E}(\vec{r}) = \frac{1}{4\pi\varepsilon_0} \cdot \frac{\lambda dl}{r^2+z^2} \cdot \frac{<-r\cos \theta ,\ -r\sin \theta ,\ z>}{\sqrt{r^2+z^2}}

Now, by the symmetry of the loop, we know that the net electric field in the x and y direction will cancel, leaving only a net field in the z direction. Therefore, we can drop the x and y components of R^\hat{R} and get:

dEz(r)=14πε0λdlr2+z2zr2+z2d\vec{E}_z(\vec{r}) = \frac{1}{4\pi\varepsilon_0} \cdot \frac{\lambda dl}{r^2+z^2} \cdot \frac{z}{\sqrt{r^2+z^2}}

We have one last modification to make before we integrate. Recall that

s=rθ s = r\theta

By this logic,

dl=rdθdl = r d\theta

We can finally write

dEz(r)=14πε0λrdθr2+z2zr2+z2d\vec{E}_z(\vec{r}) = \frac{1}{4\pi\varepsilon_0} \cdot \frac{\lambda r d\theta}{r^2+z^2} \cdot \frac{z}{\sqrt{r^2+z^2}}

Which collapses into dEz(r)=λrdθz4πε0(r2+z2)3/2d\vec{E}_z(\vec{r}) = \frac{\lambda r d\theta z}{4\pi\varepsilon_0 (r^2+z^2)^{3/2}}

Now, we can integrate. Writing this out, we get:

Ez(r)=02πλrdθz4πε0(r2+z2)3/2=λrz4πε0(r2+z2)3/202πdθ\vec{E}_z(\vec{r}) = \int_0^{2\pi}\frac{\lambda r d\theta z}{4\pi\varepsilon_0 (r^2+z^2)^{3/2}} = \frac{\lambda r z}{4\pi\varepsilon_0 (r^2+z^2)^{3/2}} \cdot \int_0^{2\pi}d\theta

Solving this (very easy) integral, we get

Ez(r)=λrz4πε0(r2+z2)3/22π=Ez(r)=λrz2ε0(r2+z2)3/2\vec{E}_z(\vec{r}) = \frac{\lambda r z}{4\pi\varepsilon_0 (r^2+z^2)^{3/2}} \cdot 2\pi= \vec{E}_z(\vec{r}) = \frac{\lambda r z}{2\varepsilon_0 (r^2+z^2)^{3/2}}

That’s our answer! We can write this alternatively, using λ=Q2πr\lambda = \frac{Q}{2\pi r}, to get another answer as

Ez(r)=Qz4πε0(r2+z2)3/2\vec{E}_z(\vec{r}) = \frac{Qz}{4\pi\varepsilon_0 (r^2+z^2)^{3/2}}

This result will be important.

Electric Field Around an Infinite Sheet

Suppose we have an infinite sheet extending in the xy plane, and we want to know the electric field at a point p. The sheet has a surface charge density σ\sigma. We can divide the surface into small rings of radius rr and width drdr and then integrate them to find the net E-field at the point.

We rewrite our result from last time:

dEz(r)=dqz4πε0(r2+z2)3/2d\vec{E}_z(\vec{r}) = \frac{dq\cdot z}{4\pi\varepsilon_0 (r^2+z^2)^{3/2}}

To find the charge for each small ring dqdq, we can use the properties of surface charge density to find:

dq=2πrdrσdq=2\pi r\cdot dr\cdot \sigma

Substituting this into our answer, we get:

dEz=2πrdrσz4πε0(r2+z2)3/2dE_z=\frac{2\pi r\cdot dr\cdot \sigma \cdot z}{4\pi \varepsilon _0\left(r^2+z^2\right)^{\text{3/2}}}

Cancelling out like terms, we can get our final form:

dEz=rdrσz2ε0(r2+z2)3/2dE_z=\frac{r\cdot dr\cdot \sigma \cdot z}{2\varepsilon _0\left(r^2+z^2\right)^{\text{3/2}}}

Now, it’s time to integrate.

Ez=σz2ε00rdr(r2+z2)3/2E_z=\frac{\sigma z}{2\varepsilon _0}\cdot \int _0^{\infty }\frac{r\cdot dr}{\left(r^2+z^2\right)^{\text{3/2}}}

This integral is not as easy as last time. We can use the properties of u-substitution to solve this integral.

u=r2+z2u=r^2+z^2

du=2rdrdu=2rdr

And when r=0r=0, u=z2u = z^2. Therefore, we can use u-subsitution to write

Ez=σz2ε0z2du2u3/2E_z=\frac{\sigma z}{2\varepsilon _0}\cdot \int _{z^2}^{\infty }\frac{du}{2u^{\text{3/2}}}

I would explain how to solve this integral, but I was too lazy and used Mathway to solve this. Regardless, integrating and using the properties of indefinite integrals, we can expand this as:

Ez=σz2ε0limt(1t+1z2)E_z=\frac{\sigma z}{2\varepsilon _0}\cdot \lim _{t\to \infty }\left(-\frac{1}{\sqrt{t}}+\frac{1}{\sqrt{z^2}}\right)

Taking the limit, we get:

Ez=σz2ε01zE_z=\frac{\sigma z}{2\varepsilon _0}\cdot \frac{1}{z}

Which just simplifies as

E(r)=σ2ϵ0\vec{E}(\vec{r})=\frac{\sigma }{2\epsilon _0}

This shows that the field is constant for an infinite sheet. However, this was a real pain in the butt to solve for. What if there was an easier way? This is where Gauss’s Law comes in.

Area Vectors

First, let’s define what an area vector is. To locate a plane in space, we can draw a vector normal to the plane whose magnitude is the area of the plane. This allows us to find the flux on a surface, which is how much of a quantity flows through a plane. We write flux as:

Φ=AV\Phi = \vec{A} \cdot \vec{V}

Where V is any vector flowing into the surface.

Deriving Gauss’s Law

In the image above, we have a charge with radiating E-field lines. We have two surfaces enclosing it, a sphere ss and an irregular shape ss’. We know from the drawing that the number of lines crossing ss is the same number of lines crossing ss’.

We can define line density as:

line density=lines area\text{line density}=\frac{\text{lines}}{\perp \ \text{area}}

Now, the farther the lines go out, the less dense they become. Therefore, line density follows the inverse square law. We can write that

line densityqr2\text{line density}\propto \frac{q}{r^2}

This equation states that line density is proportional to charge over radius squared (inverse square law).

We also know from Coulomb’s law that

E(r)qr2E\left(\vec{r}\right)\propto \frac{q}{r^2}

Therefore, we can draw the conclusion that the electric field and line density are proportional to each other. So we know that they have to be equal when multiplied by some constant of proportionality.

line density=cE(r)\text{line density}=c\cdot E\left(r\right)

where c is some constant of proportionality. Now, remember that the number of lines on the sphere ss and the surface ss’ are the same. We can define the number of lines as the flux of the electric field.

Φs=line densityarea of sphere=cE(r)4πr2\Phi _s=\text{line density}\cdot \text{area of sphere}=cE\left(r\right)\cdot 4\pi r^2

Now, for the complicated surface, we need to do something called a surface integral. The surface integral allows us to slice a complex surface into tiny rectangles and add them up again. Finding the flux for ss’, we write:

Φs=line densityarea of surface=cSE(r)dA\Phi _{s’}=\text{line density}\cdot \text{area of surface}=c \oint_S E\left(\vec{r}\right)\cdot d\vec{A}

Now, we can equate both statements to write:

cE(r)4πr2=cE(r)dAcE\left(r\right)\cdot 4\pi r^2=c\cdot \oint E\left(\vec{r}\right)\cdot d\vec{A}

Cancelling like terms, we get

cqε0=cSEdAc\cdot \frac{q}{\varepsilon _0}=c\oint_S \vec{E}\cdot d\vec{A}

Cancelling our constant, we get:

SEdA=qε0\oint_S \vec{E}\cdot d\vec{A}=\frac{q}{\varepsilon _0}

This is Gauss’s Law! We can keep going however. What happens when we have two charges enclosed in a surface? Using the superposition principle, we can write

SE1dA+SE2dA=q1ε0+q2ε0\oint_S \vec{E}_1\cdot d\vec{A}+\oint_S \vec{E}_2\cdot d\vec{A}=\frac{q_1}{\varepsilon _0}+\frac{q_2}{\varepsilon _0}

Suppose we have a continuous blob of charge with charge density ρ. We can rewrite the above equation as

s EdA=Vρ(x,y,z)dxdydz\oint _s\ \vec{E}\cdot d\vec{A}=\iiint_V \rho(x, y, z)dxdydz

Where the triple integral is a volume integral. This may look strange, but think about it logically. The charge density multiplied by the volume of a shape should logically be the charge enclosed by the shape.

Simply put, Gauss’s law relates the electric flux of a surface to how much charge is enclosed by that surface. Now that we have Gauss’s Law, we can use it to solve a few things quicker.

Infinite Sheet: Gauss-Style

Redfine our infinite sheet, and instead of integrating rings, we’re going to use something called a “gaussian surface” to solve this problem. A suitable choice is a cylindrical pillbox (a short cylinder) that straddles the sheet, with its flat faces parallel to the sheet.

This image shows a pillbox extending from both ends of the surface. Due to the symmetry of the infinite sheet, the electric field must be perpendicular to the surface of the sheet and have the same magnitude at any point from the sheet on both sides.

For the pillbox, the charge enclosed (qencq_{enc}) is:

qenc=σAq_{enc} = \sigma A

Where AA represents the area of the flat side of the the pillbox.

To solve for the flux, the angle between the area vector of the flat side of the sheet is 0. The angle between the curved surface and the electric field is 90 degrees. Therefore, our flux (the cosine of the angle times the magnitude of the two vectors) is:

S EdA=EA=EA\oint _S\ \vec{E}\cdot d\vec{A} = E\cdot A = EA

However, it extends on both sides, so we rewrite as:

S EdA=EA+EA=2EA\oint _S\ \vec{E}\cdot d\vec{A} = E\cdot A + E\cdot A = 2EA

Now, after solving both sides, we can use Gauss’s Law:

SEdA=qε0\oint_S \vec{E}\cdot d\vec{A}=\frac{q}{\varepsilon _0}

2EA=σAε02EA = \frac{\sigma A}{\varepsilon_0}

Rearranging, we get:

E(r)=σ2ϵ0\vec{E}(\vec{r})=\frac{\sigma }{2\epsilon _0}

Which is the same result as before. But see how much easier that was? That’s the power of Gauss’s law.

Electric Field of a Sphere

Let’s find the electric field of a uniformly charged sphere. We can pick a sphere of radius RR., and surround it with a Gaussian sphere of rr (r>Rr > R). Writing Gauss’s Law, we find:

SEdA=qencε0\oint_S \vec{E}\cdot d\vec{A}=\frac{q_{enc}}{\varepsilon _0}

We can write the electric field as:

E(r)=r^E(r)=erE(r)\vec{E}\left(r\right)=\hat{r}E\left(r\right)=\vec{e}_rE\left(r\right)

So we know that the electric field is constant in a uniformly charged sphere. This means we can pull out the electric field from the integral, and get:

E(r)dA=qencε0\vec{E}\left(r\right)\cdot \oint d\vec{A}=\frac{q_{enc}}{\varepsilon _0}

The surface area of a sphere is 4πr24\pi r^2, so the surface integral of dAd\vec{A} is 4πr24\pi r^2.

E(r)=Q4πε0r2er\vec{E}\left(r\right)=\frac{Q}{4\pi \varepsilon _0r^2}\vec{e}_r

But what happens when we look inside a sphere? We can draw the scenario that r<Rr < R. This means that the charge enclosed by the Gaussian surface is less than the total charge held by the sphere. The charge scales by the cubes of the radii.

E(r)=Q4πε0r2r3R3er\vec{E}\left(r\right)=\frac{Q}{4\pi \varepsilon _0r^2} \cdot \frac{r^3}{R^3}\vec{e}_r This simplifies down to:

E(r)=q4πε0rR3er\vec{E}\left(r\right)=\frac{q}{4\pi \varepsilon _0}\cdot \frac{r}{R^3}\vec{e}_r

Conclusions

Gauss’s law is a clean way of relating the amount of electric field flowing through a surface (electric flux) to the charge enclosed by that surface. We can use “Gaussian surfaces”, which are ideal surfaces, to solve problems involving surfaces with irregular shapes as well. Gauss’s law, although buried under complicated mathematical symbols, can be used very easily with these ideal surfaces. Surface integrals simply become surface areas of shapes, and volume integrals becomes the volume of surfaces multiplied by charge density. I hope this article provided some light and intuition into the way that you view Gauss’s Law and electromagnetism.