Inphysics,Gauss's law for magnetism is one of the fourMaxwell's equations that underlieclassical electrodynamics. It states that themagnetic fieldB hasdivergence equal to zero,[1] in other words, that it is asolenoidal vector field. It is equivalent to the statement thatmagnetic monopoles do not exist.[2] Rather than "magnetic charges", the basic entity for magnetism is themagnetic dipole. (If monopoles were ever found, the law would have to be modified, as elaboratedbelow.)
Gauss's law for magnetism can be written in two forms, adifferential form and anintegral form. These forms are equivalent due to thedivergence theorem.
The name "Gauss's law for magnetism"[1] is not universally used. The law is also called "Absence offree magnetic poles".[2] It is also referred to as the "transversality requirement"[3] because forplane waves it requires that the polarization be transverse to the direction of propagation.
The differential form for Gauss's law for magnetism is:
where∇ · denotesdivergence, andB is themagnetic field.

The integral form of Gauss's law for magnetism states:
![]()
whereS is anyclosed surface (see image right), is the magnetic flux throughS, anddS is avector, whose magnitude is the area of aninfinitesimal piece of the surfaceS, and whose direction is the outward-pointingsurface normal (seesurface integral for more details).
Gauss's law for magnetism thus states that the netmagnetic flux through a closed surface equals zero.
The integral and differential forms of Gauss's law for magnetism are mathematically equivalent, due to thedivergence theorem. That said, one or the other might be more convenient to use in a particular computation.
The law in this form states that for each volume element in space, there are exactly the same number of "magnetic field lines" entering and exiting the volume. No total "magnetic charge" can build up in any point in space. For example, the south pole of the magnet is exactly as strong as the north pole, and free-floating south poles without accompanying north poles (magnetic monopoles) are not allowed. In contrast, this is not true for other fields such aselectric fields orgravitational fields, where totalelectric charge ormass can build up in a volume of space.
Due to theHelmholtz decomposition theorem, Gauss's law for magnetism is equivalent to the following statement:[4][5]
The vector fieldA is called themagnetic vector potential.
Note that there is more than one possibleA which satisfies this equation for a givenB field. In fact, there are infinitely many: any field of the form∇ϕ can be added ontoA to get an alternative choice forA, by the identity (seeVector calculus identities):since the curl of a gradient is thezerovector field:
This arbitrariness inA is calledgauge freedom.
The magnetic fieldB can be depicted viafield lines (also calledflux lines) – that is, a set of curves whose direction corresponds to the direction ofB, and whose areal density is proportional to the magnitude ofB. Gauss's law for magnetism is equivalent to the statement that the field lines have neither a beginning nor an end: Each one either forms a closed loop, winds around forever without ever quite joining back up to itself exactly, or extends to infinity.
Ifmagnetic monopoles were to be discovered, then Gauss's law for magnetism would state the divergence ofB would be proportional to themagnetic charge densityρm, analogous to Gauss's law for electric field. For zero net magnetic charge density (ρm = 0), the original form of Gauss's magnetism law is the result.
The modified formula for use with theSI is not standard and depends on the choice of defining equation for the magnetic charge and current; in one variation, magnetic charge has units ofwebers, in another it has units ofampere-meters.
| System | Equation |
|---|---|
| SI (weber convention)[6] | |
| SI (ampere-meter convention)[7] | |
| CGS-Gaussian[8] |
whereμ0 is thevacuum permeability.
So far, examples of magnetic monopoles are disputed in extensive search,[9] although certain papers report examples matching that behavior.[10]
This idea of the nonexistence of the magnetic monopoles originated in 1269 byPetrus Peregrinus de Maricourt. His work heavily influencedWilliam Gilbert, whose 1600 workDe Magnete spread the idea further. In the early 1800sMichael Faraday reintroduced this law, and it subsequently made its way intoJames Clerk Maxwell's electromagnetic field equations.
Innumerical computation, the numerical solution may not satisfy Gauss's law for magnetism due to the discretization errors of the numerical methods. However, in many cases, e.g., formagnetohydrodynamics, it is important to preserve Gauss's law for magnetism precisely (up to the machine precision). Violation of Gauss's law for magnetism on the discrete level will introduce a strong non-physical force. In view of energy conservation, violation of this condition leads to a non-conservative energy integral, and the error is proportional to the divergence of the magnetic field.[11]
There are various ways to preserve Gauss's law for magnetism in numerical methods, including the divergence-cleaning techniques,[12] the constrained transport method,[13] potential-based formulations[14] and de Rham complex based finite element methods[15][16] where stable and structure-preserving algorithms are constructed on unstructured meshes with finite element differential forms.