32-1 Gauss’ Law for Magnetic Fields#
Prompts
Explain why the net magnetic flux through any closed Gaussian surface is zero, and how this differs from Gauss’s law for electric fields.
What is the simplest magnetic structure that can be enclosed? Why can’t we have isolated magnetic poles (monopoles)?
Walk me through calculating the magnetic flux \(\Phi_B\) through a surface when the magnetic field \(\vec{B}\) is uniform and perpendicular to the surface. Then show how to set up the integral when \(\vec{B}\) varies.
I’m given a cylindrical surface in a magnetic field. How do I use Gauss’s law for magnetism to find the net outward flux? Can you work through an example?
Lecture Notes#
Overview#
Electric vs magnetic Gauss’ law — same structure, different physics
Electric: \(\Phi_E = \oint \vec{E} \cdot d\vec{A} = q_{\text{enc}}/\varepsilon_0\) (flux \(\propto\) enclosed charge)
Magnetic: \(\Phi_B = \oint \vec{B} \cdot d\vec{A} = 0\) (flux always zero)
Physical meaning: No net magnetic flux through any closed surface \(\Rightarrow\) no magnetic monopoles
Why “no monopoles”?
Electric charges can be isolated (\(+\) or \(−\)). Magnetic poles cannot: every magnet has both N and S. Breaking a magnet only gives smaller dipoles, never a single pole. Gauss’ law for \(\vec{B}\) encodes this.
Magnetic dipoles: the simplest magnetic structure#
Bar magnet = magnetic dipole
North pole: field lines diverge (source)
South pole: field lines converge (sink)
Every magnet — from bar magnets to atoms — is a dipole (or superposition of dipoles)
Break a magnet → each piece is still a dipole (N and S on each fragment)
Conceptual barrier: “Where are the poles?”
A Gaussian surface can cut through a magnet and seem to enclose only one pole. But field lines that enter the surface must come from somewhere — there is always an associated opposite pole. The net flux is still zero.
Gauss’ law for magnetic fields#
Statement: Net magnetic flux through any closed Gaussian surface \(S\) is zero
Implication: No net “magnetic charge” anywhere in the space (otherwise, enclosing it by a closed surface would cause an violation)
Holds for: Any closed surface, any magnetic source (dipole, current loop, etc.)
Contrast with electric Gauss’ law#
Electric |
Magnetic |
|---|---|
Flux \(\propto\) enclosed charge |
Flux = 0 always |
Monopoles exist (electric charges) |
Monopoles do not exist |
\(\Phi_E \neq 0\) if \(q_{\text{enc}} \neq 0\) |
\(\Phi_B = 0\) always |
Physical intuition
Magnetic field lines form closed loops (no start or end). Electric field lines start on \(+\) and end on \(−\). That is why \(\Phi_B = 0\) for any closed surface: every line that enters also leaves.
Summary#
Simplest magnetic structure: dipole (N and S together)
Magnetic monopoles: do not exist
Gauss’ law for \(\vec{B}\): \(\Phi_B = 0\) for any closed surface
This law is the mathematical statement that there are no magnetic monopoles
Discussions#
Surface and line integrals#
We distinguish open vs closed manifolds (surfaces or curves): open ones have boundaries; closed ones do not. We use \(\int\) for open-manifold integrals and \(\oint\) for closed-manifold integrals.
Surface integral (flux): \(\Phi = \int_\Sigma \vec{F} \cdot d\vec{A}\)
Meaning: How much of the field “flows through” the surface. We sum \(\vec{F} \cdot \hat{n}\) over each small area \(dA\); \(\hat{n}\) is the outward normal vector.
Open surface \(\Sigma\): General case; the integral is called flux.
Closed surface \(S\): Denoted \(\oint_S \vec{F} \cdot d\vec{A}\) and called net flux (what enters minus what leaves).
Line integral: \(\int_\Gamma \vec{F} \cdot d\vec{s}\)
Meaning: How much the field contributes along the curve. We sum \(\vec{F} \cdot d\vec{s}\) along the path; \(d\vec{s}\) is tangent to the curve.
Open curve \(\Gamma\) (path from A to B): Line integral along the path. (Physical example: work done by a force along the path.)
Closed loop \(C\): Denoted \(\oint_C \vec{F} \cdot d\vec{s}\) and called circulation—how much the field “circulates around” an oriented loop.
Aspect |
Surface integral |
Line integral |
|---|---|---|
Open |
Flux \(\int_\Sigma \vec{F} \cdot d\vec{A}\) |
Line integral \(\int_\Gamma \vec{F} \cdot d\vec{s}\) |
Closed |
Net flux \(\oint_S \vec{F} \cdot d\vec{A}\) |
Circulation \(\oint_C \vec{F} \cdot d\vec{s}\) |
Element |
\(d\vec{A} = \hat{n}\,dA\) (\(\hat{n}\) = normal direction) |
\(d\vec{s} = \hat{\ell}\,ds\) (\(\hat{\ell}\) = tangent direction) |
Domain |
Surface (2D) |
Curve (1D) |
In Maxwell |
Gauss’s laws (closed \(S\)) |
Faraday, Ampère–Maxwell (closed \(C\)) |
Example 1: Flux — field at angle \(\theta\) from normal
Field: \(\vec{F} = F_0(\sin\theta\,\hat{x} + \cos\theta\,\hat{z})\) (constant magnitude \(F_0\), lies in \(xz\)-plane; \(\theta\) = angle from \(\hat{z}\)). Surface: rectangle in \(xy\)-plane, \(0 \le x \le a\), \(0 \le y \le b\). Outward normal \(\hat{n} = \hat{z}\).
Component form: \(d\vec{A} = \hat{z}\,dx\,dy\). Only the \(z\)-component of \(\vec{F}\) contributes:
Integral:
Result: \(\Phi = F_0 ab\cos\theta\). When \(\theta = 0\), \(\Phi = F_0 ab\); when \(\theta = 90°\), \(\Phi = 0\). Only the normal component \(F_0\cos\theta\) contributes.
Example 2: Flux — spatially varying field (sinusoidal)
Field: \(\vec{F} = F_0 \sin(kx)\,\hat{y}\) (varies with \(x\); \(k\) = wave number). Surface: rectangle in \(xz\)-plane (normal \(\hat{n} = \hat{y}\)), \(0 \le x \le a\), \(0 \le z \le c\).
Component form: \(d\vec{A} = \hat{y}\,dx\,dz\). So \(\vec{F} \cdot d\vec{A} = F_0\sin(kx)\,dx\,dz\).
Integral (integrate \(z\) first, then \(x\)):
Result: \(\Phi = \frac{F_0 c}{k}(1 - \cos(ka))\). The flux depends on how many “wavelengths” fit in \([0,a]\); if \(ka = 2\pi\), then \(\cos(ka)=1\) and \(\Phi=0\).
Example 3: Circulation — square in \(xy\)-plane, sinusoidal field
Field: \(\vec{F} = F_0 \sin(kx)\,\hat{y}\) (varies with \(x\)). Loop: square in \(xy\)-plane with corners \((0,0) \to (a,0) \to (a,b) \to (0,b) \to (0,0)\), traversed counterclockwise.
Side by side:
Side |
Path |
\(d\vec{s}\) |
\(\vec{F}\) |
\(\vec{F} \cdot d\vec{s}\) |
Integral |
|---|---|---|---|---|---|
Bottom |
\(y=0\), \(x: 0\to a\) |
\(\hat{x}\,dx\) |
\(F_0\sin(kx)\hat{y}\) |
\(0\) |
\(0\) |
Right |
\(x=a\), \(y: 0\to b\) |
\(\hat{y}\,dy\) |
\(F_0\sin(ka)\hat{y}\) |
\(F_0\sin(ka)\,dy\) |
\(F_0 b\sin(ka)\) |
Top |
\(y=b\), \(x: a\to 0\) |
\(-\hat{x}\,dx\) |
\(F_0\sin(kx)\hat{y}\) |
\(0\) |
\(0\) |
Left |
\(x=0\), \(y: b\to 0\) |
\(-\hat{y}\,dy\) |
\(0\) |
\(0\) |
\(0\) |
Result: \(\oint_C \vec{F} \cdot d\vec{s} = F_0 b\sin(ka)\). Only the right edge contributes, because there \(\vec{F}\) is parallel to \(d\vec{s}\) and nonzero. The circulation depends on \(a\) through \(\sin(ka)\).
Example 4: Circulation — square, uniform field at angle
Field: \(\vec{F} = F_0(\cos\alpha\,\hat{x} + \sin\alpha\,\hat{y})\) (uniform in \(xy\)-plane, angle \(\alpha\) from \(x\)-axis). Loop: same square as Example 3.
Side by side:
Side |
\(d\vec{s}\) |
\(\vec{F} \cdot d\vec{s}\) |
Integral |
|---|---|---|---|
Bottom |
\(\hat{x}\,dx\) |
\(F_0\cos\alpha\,dx\) |
\(F_0 a\cos\alpha\) |
Right |
\(\hat{y}\,dy\) |
\(F_0\sin\alpha\,dy\) |
\(F_0 b\sin\alpha\) |
Top |
\(-\hat{x}\,dx\) |
\(-F_0\cos\alpha\,dx\) |
\(-F_0 a\cos\alpha\) |
Left |
\(-\hat{y}\,dy\) |
\(-F_0\sin\alpha\,dy\) |
\(-F_0 b\sin\alpha\) |
Result: \(\oint_C \vec{F} \cdot d\vec{s} = 0\). For a uniform field, the contributions from opposite sides cancel. Contrast with Example 3, where the field varies along the path.
Example 5: Infinitesimal cube — divergence from net flux
Setup: Small cube with one corner at \((x,y,z)\) and sides \(dx\), \(dy\), \(dz\). Field \(\vec{F} = (F_x, F_y, F_z)\) varies with position.
Face-by-face flux (outward normal; to first order in \(dx, dy, dz\)):
Face |
\(\hat{n}\) |
\(\vec{F} \cdot \hat{n}\) (evaluated at face) |
Area |
Flux |
|---|---|---|---|---|
\(x+dx\) |
\(\hat{x}\) |
\(F_x(x+dx, y, z)\) |
\(dy\,dz\) |
\(F_x(x+dx,y,z)\,dy\,dz\) |
\(x\) |
\(-\hat{x}\) |
\(-F_x(x, y, z)\) |
\(dy\,dz\) |
\(-F_x(x,y,z)\,dy\,dz\) |
\(y+dy\) |
\(\hat{y}\) |
\(F_y(x, y+dy, z)\) |
\(dx\,dz\) |
\(F_y(x,y+dy,z)\,dx\,dz\) |
\(y\) |
\(-\hat{y}\) |
\(-F_y(x, y, z)\) |
\(dx\,dz\) |
\(-F_y(x,y,z)\,dx\,dz\) |
\(z+dz\) |
\(\hat{z}\) |
\(F_z(x, y, z+dz)\) |
\(dx\,dy\) |
\(F_z(x,y,z+dz)\,dx\,dy\) |
\(z\) |
\(-\hat{z}\) |
\(-F_z(x, y, z)\) |
\(dx\,dy\) |
\(-F_z(x,y,z)\,dx\,dy\) |
Taylor expansion (e.g. \(F_x(x+dx,y,z) - F_x(x,y,z) \approx \frac{\partial F_x}{\partial x}dx\)):
Result: \(\oint_S \vec{F} \cdot d\vec{A} = \mathsf{div} \vec{F} \,dx\,dy\,dz\), where
Example 6: Infinitesimal rectangle — curl from circulation
Setup: Small rectangle in \(xy\)-plane with corners \((x,y)\), \((x+dx,y)\), \((x+dx,y+dy)\), \((x,y+dy)\), traversed counterclockwise. Field \(\vec{F} = (F_x, F_y, F_z)\).
Side-by-side (only \(F_x\), \(F_y\) matter; \(d\vec{s}\) is in \(xy\)-plane):
Side |
Path |
\(d\vec{s}\) |
\(\vec{F} \cdot d\vec{s}\) |
Integral |
|---|---|---|---|---|
Bottom |
\(y\) fixed |
\(\hat{x}\,dx\) |
\(F_x(x,y)\,dx\) |
\(F_x(x,y)\,dx\) |
Right |
\(x+dx\) fixed |
\(\hat{y}\,dy\) |
\(F_y(x+dx,y)\,dy\) |
\(F_y(x+dx,y)\,dy\) |
Top |
\(y+dy\) fixed |
\(-\hat{x}\,dx\) |
\(-F_x(x,y+dy)\,dx\) |
\(-F_x(x,y+dy)\,dx\) |
Left |
\(x\) fixed |
\(-\hat{y}\,dy\) |
\(-F_y(x,y)\,dy\) |
\(-F_y(x,y)\,dy\) |
Net circulation:
Taylor expansion: \(F_y(x+dx,y) - F_y(x,y) \approx \frac{\partial F_y}{\partial x}dx\); \(F_x(x,y+dy) - F_x(x,y) \approx \frac{\partial F_x}{\partial y}dy\). So
Result: \(\oint_C \vec{F} \cdot d\vec{s} = (\mathsf{curl} \vec{F})_z\,dx\,dy\), where the \(z\)-component of the curl is