Gauss' law for magnetism

In physics, Gauss' law for magnetism is one of the four Maxwell's equations which underlie classical electrodynamics. It states that the magnetic field B has divergence equal to zero, in other words, that it is a solenoidal vector field. It is equivalent to the statement that magnetic monopoles do not exist. Rather than "magnetic charges", the basic entity for magnetism is the magnetic dipole. (Of course, if monopoles were ever found, the law would have to be modified, as elaborated below.)

Gauss' law for magnetism can be written in two forms, a differential form and an integral form. These forms are equivalent due to the divergence theorem.

Note that the terminology "Gauss' law for magnetism" is widely used, but not universal. The law is also called "Absence of free magnetic poles". (or some variant); one reference even explicitly says the law has "no name".

Differential form
The differential form for Gauss' law for magnetism is the following:
 * $$\nabla\cdot\mathbf{B} = 0$$

where
 * $$\nabla \cdot$$ denotes divergence,
 * B is the magnetic field.

Integral form
The integral form of Gauss' law for magnetism states:
 * $$\oint_S \mathbf{B} \cdot \mathrm{d}\mathbf{A} = 0$$

where
 * S is any closed surface (a "closed surface" is the boundary of some three-dimensional volume; the surface of a sphere or cube is a "closed surface", but a disk is not),
 * dA is a vector, whose magnitude is the area of an infinitesimal piece of the surface S, and whose direction is the outward-pointing surface normal (see surface integral for more details),

The left-hand side of this equation is called the net flux of the magnetic field out of the surface, and Gauss' law for magnetism states that it is always zero.

The integral and differential forms of Gauss' law for magnetism are mathematically equivalent, due to the divergence theorem. That said, one or the other might be more convenient to use in a particular computation.

In terms of vector potential
Due to the Helmholtz decomposition theorem, Gauss' law for magnetism is equivalent to the following statement:


 * There exists a vector field A such that $$\mathbf{B} = \nabla\times\mathbf{A}$$

This vector field is called the magnetic vector potential. Note that there is more than one possible A which satisfies this equation for a given B field (in fact, there are infinitely many). That is, to A can be added any field of the form $$\nabla$$φ because the curl of any gradient field is zero. Thus, adding $$\nabla$$φ to A does not change the resulting B. This arbitrariness in A is called gauge freedom.

In terms of field lines
The magnetic field B, like any vector field, can be depicted via field lines (also called flux lines)-- that is, a set of curves whose direction corresponds to the direction of B, and whose areal density is proportional to the magnitude of B. Gauss' law for magnetism is equivalent to the statement that the field lines have neither a beginning nor an end: They either form a closed loop, or extend to infinity in both directions.

Modification if magnetic monopoles exist
If magnetic monopoles were ever discovered to exist, then Gauss' law for magnetism would be disproved. Instead, the divergence of B would be given by
 * $$\nabla\cdot\mathbf{B} = \rho_m$$

where $$\rho_m$$ is the "magnetic charge density".