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 () quantifies how much magnetic field passes through a given surface. You calculate it by integrating the magnetic field over the surface:
The dot product matters here. Flux depends not just on the field strength but on the angle between and the surface normal . 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
- Can also be expressed as volt-seconds (Vยทs)
- Magnetic flux density is just another name for the magnetic field 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:
Here is the magnetic field and is the outward-pointing area element on the closed surface . "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 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

Divergence of the Magnetic Field
Applying the divergence theorem to the integral form gives the differential (local) version:
The divergence measures the net outward flux of 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, , 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 encodes this experimental fact directly.
Applications of Gauss's Law for Magnetic Fields
Checking Validity of Proposed Field Configurations
The most direct use of 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, can eliminate certain components of . For example, if you're analyzing a solenoid using a cylindrical Gaussian surface, the law tells you that the radial component of 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 :
- Infinite straight wire:
- Solenoid interior:
Gauss's law for 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

Similarities in Mathematical Form
Both laws are closed-surface integrals (or divergence equations):
| Electric Fields | Magnetic Fields | |
|---|---|---|
| Integral form | ||
| Differential form |
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 ( 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, 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 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 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:
- Gauss's law for electric fields ()
- Gauss's law for magnetic fields ()
- Faraday's law ()
- Ampรจre-Maxwell law ()
Connection to the Other Equations
Gauss's law for is actually consistent with Faraday's law in an interesting way. Take the divergence of both sides of Faraday's law:
The left side is identically zero (divergence of any curl vanishes). So , meaning if at any one time, it stays zero forever. The structure of Maxwell's equations is self-consistent in preserving the absence of magnetic monopoles.