(a) Gauss’s law in magnetism. It states that for a closed surface
\(\oint \overrightarrow{\mathrm{B}} \cdot d \overrightarrow{\mathrm{S}}\)= 0
Proof
Consider a magnetic field produced by a bar magnet as shown in the figure. Let us consider a closed Gaussian surface enclosing the N-pole of this magnet is shown by dotted circle. We find that number of magnetic lines entering the Gaussian surface is equal to number of magnetic lines leaving it i.e. total normal flux for whole Gaussian surface is zero.

i.e. Φm = \(\oint_{\mathrm{S}} \overrightarrow{\mathrm{B}} \cdot d \overrightarrow{\mathrm{S}}\) = 0
This theorem implies that isolated magnetic poles do not exist.
or
Magnetic poles always exist in pairs.
(b) From electrostatics we have the Gauss’s theorem for any closed surface S enclosing a volume V in space, the surface integral of the electric field over S is proportional to the total electric charge inside V.
\(\oint_{\mathrm{S}} \overrightarrow{\mathrm{E}} \cdot d \overrightarrow{\mathrm{S}}=\frac{q}{\varepsilon_0}\)
The dipole consists of two equal and opposite charges near one another, so their total charge is zero. This is evidently also true if S does not enclose the origin, since we know directly that then there is no charge within S; so in all we can say that for any closed surface S,
\(\oint_{\mathrm{S}} \overrightarrow{\mathrm{E}}_{\text {dipole }} \cdot d \overrightarrow{\mathrm{S}} \) = 0
For any magnetic field \(\overrightarrow{\mathrm{B}}\) obtained by super position, Gauss’s theorem for magnetism
\(\oint_{\mathrm{S}} \overrightarrow{\mathrm{B}} \cdot d \overrightarrow{\mathrm{S}}\)= 0
for all closed surface S ..........(1)
This is the precise expression of the absence of individual magnetic charges.
In the statement (1), we used a closed surface S. If S were an open surface, then the integral of a magnetic field B over it would generally be non-zero; It is called the flux of B through S.

\(\oint_s\overrightarrow{\mathrm{B}} \cdot d \overrightarrow{\mathrm{S}}\) ≠ 0 ....(2)
The main conclusion for equation (1) and (2) is that the absence of individual magnetic charges. The magnetic flux through any closed surface is always zero.
Unit of magnetic flux: The SI unit of magnetic flux is Weber (Wb), defined as follows:
The magnetic flux linked with a surface is said to be 1 weber, if a magnetic field of 1 tesla is associated with an area of 1 m2.
∴ 1 Wb = 1 Tm2