Skip to main content
The new Teacher Workspace is here. Your first 3 assignments are free. Try it →
A colleague sent you $30 off Fiveable. Get the annual plan for $99 →

1.2 Gauss's law for magnetic fields

Updated March 2026Fiveable Content Team
Fiveable

🔋Electromagnetism II Unit 1 Review

QR code for Electromagnetism II practice questions

1.2 Gauss's law for magnetic fields

Gauss's Law for Magnetic Fields

Gauss's law for magnetic fields captures a simple but profound fact: magnetic field lines always form closed loops. The total magnetic flux through any closed surface is exactly zero, which means there are no magnetic "charges" (monopoles) from which field lines begin or end. This is one of Maxwell's four equations and marks a key difference between how electric and magnetic fields behave.

Magnetic Flux

Magnetic Flux Through a Surface

Magnetic flux (ΦB\Phi_B) quantifies how much magnetic field passes through a given surface. You calculate it by integrating the magnetic field over the surface:

ΦB=∫SB⃗⋅dA⃗\Phi_B = \int_S \vec{B} \cdot d\vec{A}

The dot product matters here. Flux depends not just on the field strength but on the angle between B⃗\vec{B} and the surface normal dA⃗d\vec{A}. A surface parallel to the field lines has zero flux through it, while a surface perpendicular to the field captures maximum flux.

Units of Magnetic Flux

  • The SI unit is the weber (Wb), equivalent to T⋅m2\text{T} \cdot \text{m}^2
  • Can also be expressed as volt-seconds (V·s)
  • Magnetic flux density is just another name for the magnetic field B⃗\vec{B} itself, measured in teslas (T), representing flux per unit area

Integral Form of Gauss's Law

Closed Surface Integral

The integral form states that the net magnetic flux through any closed surface is zero:

∮SB⃗⋅dA⃗=0\oint_S \vec{B} \cdot d\vec{A} = 0

Here B⃗\vec{B} is the magnetic field and dA⃗d\vec{A} is the outward-pointing area element on the closed surface SS. "Closed surface" means a surface that fully encloses a volume with no holes, like a sphere or a cube.

The physical meaning: every magnetic field line that enters the closed surface must also exit it. There's no net source or sink of B⃗\vec{B} inside any volume you can draw.

Why the Net Flux Is Always Zero

Because magnetic monopoles don't exist, there's nothing inside any closed surface that can act as a net source of magnetic flux. Compare this to the electric case, where a charge inside the surface produces a nonzero net electric flux. For magnetic fields, the "enclosed magnetic charge" is always zero. That's the entire content of this law.

Differential Form of Gauss's Law

Magnetic flux through a surface, Explaining Gauss’s Law | CircuitBread

Divergence of the Magnetic Field

Applying the divergence theorem to the integral form gives the differential (local) version:

∇⋅B⃗=0\nabla \cdot \vec{B} = 0

The divergence ∇⋅B⃗\nabla \cdot \vec{B} measures the net outward flux of B⃗\vec{B} per unit volume at a point. Setting it to zero means magnetic field lines never start or stop at any point in space. They either form closed loops or extend to infinity in both directions.

This holds everywhere, at every point, not just on average over some surface. That's what makes the differential form more powerful for local analysis.

Absence of Magnetic Monopoles

In electrostatics, ∇⋅E⃗=ρ/ϵ0\nabla \cdot \vec{E} = \rho / \epsilon_0, so electric field lines can originate on positive charges and terminate on negative charges. The magnetic analog would be a magnetic monopole, an isolated north or south pole.

No experiment has ever confirmed the existence of magnetic monopoles. Every magnet ever observed has both a north and south pole. Cut a bar magnet in half and you get two smaller dipoles, not an isolated north and a south. Gauss's law for B⃗\vec{B} encodes this experimental fact directly.

Applications of Gauss's Law for Magnetic Fields

Checking Validity of Proposed Field Configurations

The most direct use of ∇⋅B⃗=0\nabla \cdot \vec{B} = 0 is as a consistency check. If someone proposes a magnetic field configuration, you can compute its divergence. If it's nonzero anywhere, that field is unphysical.

Constraining Field Components

In problems with symmetry, ∇⋅B⃗=0\nabla \cdot \vec{B} = 0 can eliminate certain components of B⃗\vec{B}. For example, if you're analyzing a solenoid using a cylindrical Gaussian surface, the law tells you that the radial component of B⃗\vec{B} must vanish (assuming translational symmetry along the axis). This simplifies the problem before you even apply Ampère's law.

A Note on Common Field Results

The well-known results for symmetric current distributions are actually derived using Ampère's law, not Gauss's law for B⃗\vec{B}:

  • Infinite straight wire: B=μ0I2πrB = \frac{\mu_0 I}{2\pi r}
  • Solenoid interior: B=μ0nIB = \mu_0 n I

Gauss's law for B⃗\vec{B} plays a supporting role in these derivations by constraining which components of the field can be nonzero, but the quantitative result comes from Ampère's law. Don't confuse the two on an exam.

Comparison to Gauss's Law for Electric Fields

Magnetic flux through a surface, Flux - Wikipedia

Similarities in Mathematical Form

Both laws are closed-surface integrals (or divergence equations):

Electric FieldsMagnetic Fields
Integral form∮SE⃗⋅dA⃗=Qencϵ0\oint_S \vec{E} \cdot d\vec{A} = \frac{Q_{\text{enc}}}{\epsilon_0}∮SB⃗⋅dA⃗=0\oint_S \vec{B} \cdot d\vec{A} = 0
Differential form∇⋅E⃗=ρϵ0\nabla \cdot \vec{E} = \frac{\rho}{\epsilon_0}∇⋅B⃗=0\nabla \cdot \vec{B} = 0

Key Differences in Physical Interpretation

  • Electric flux through a closed surface can be nonzero because electric charges (monopoles) exist. Magnetic flux is always zero because magnetic monopoles don't.
  • Electric field lines can begin and end on charges. Magnetic field lines must form closed loops.
  • Note: the claim that "electric fields are conservative while magnetic fields are not" is a separate issue from Gauss's law. Electrostatic fields are conservative (∇×E⃗=0\nabla \times \vec{E} = 0 in statics), but this property relates to Faraday's law, not to the divergence equations.

Validity and Scope

This Law Is Always Valid

Unlike some approximations in electromagnetism, ∇⋅B⃗=0\nabla \cdot \vec{B} = 0 holds universally in classical electromagnetism. It's valid for:

  • Static fields
  • Time-varying fields
  • Fields in vacuum or in matter
  • Any configuration whatsoever

This is worth emphasizing because it's sometimes mistakenly stated that Gauss's law for B⃗\vec{B} only applies to static fields. That's incorrect. Even when fields are changing rapidly and Faraday's law produces induced electric fields, the magnetic field still has zero divergence at every instant. Maxwell's equations include ∇⋅B⃗=0\nabla \cdot \vec{B} = 0 without any time-dependent modifications.

Role in Maxwell's Equations

One of Four Fundamental Laws

Gauss's law for magnetic fields is the second of Maxwell's four equations:

  1. Gauss's law for electric fields (∇⋅E⃗=ρ/ϵ0\nabla \cdot \vec{E} = \rho/\epsilon_0)
  2. Gauss's law for magnetic fields (∇⋅B⃗=0\nabla \cdot \vec{B} = 0)
  3. Faraday's law (∇×E⃗=−∂B⃗/∂t\nabla \times \vec{E} = -\partial \vec{B}/\partial t)
  4. Ampère-Maxwell law (∇×B⃗=μ0J⃗+μ0ϵ0 ∂E⃗/∂t\nabla \times \vec{B} = \mu_0 \vec{J} + \mu_0 \epsilon_0 \, \partial \vec{E}/\partial t)

Connection to the Other Equations

Gauss's law for B⃗\vec{B} is actually consistent with Faraday's law in an interesting way. Take the divergence of both sides of Faraday's law:

∇⋅(∇×E⃗)=−∂∂t(∇⋅B⃗)\nabla \cdot (\nabla \times \vec{E}) = -\frac{\partial}{\partial t}(\nabla \cdot \vec{B})

The left side is identically zero (divergence of any curl vanishes). So ∂(∇⋅B⃗)/∂t=0\partial(\nabla \cdot \vec{B})/\partial t = 0, meaning if ∇⋅B⃗=0\nabla \cdot \vec{B} = 0 at any one time, it stays zero forever. The structure of Maxwell's equations is self-consistent in preserving the absence of magnetic monopoles.

See Fiveable more often in Google

Mark Fiveable as a preferred source and Google is more likely to show you our guides in Top Stories, with a "preferred" badge in AI Mode and AI Overviews.

Prefer us on Google