According to Gauss' law (see Sect. 4.2), the electric flux through any closed surface is directly proportional to the net electric charge enclosed by that surface. Given the very direct analogy which exists between an electric charge and a magnetic monopole, we would expect to be able to formulate a second law which states that the magnetic flux through any closed surface is directly proportional to the number of magnetic monopoles enclosed by that surface. However, as we have already discussed, magnetic monopoles do not exist. It follows that the equivalent of Gauss' law for magnetic fields reduces to:
The magnetic flux though any closed surface is zero.This is just another way of saying that magnetic monopoles do not exist, and that all magnetic fields are actually generated by circulating currents.
An immediate corollary of the above law is that the number of magnetic field-lines which enter a closed surface is always equal to the number of field-lines which leave the surface. In other words:
Magnetic field-lines form closed loops which never begin or end.Thus, magnetic field-lines behave in a quite different manner to electric field-lines, which begin on positive charges, end on negative charges, and never form closed loops. Incidentally, the statement that electric field-lines never form closed loops follows from the result that the work done in taking an electric charge around a closed loop is always zero (see Sect. 5). This clearly cannot be true if it is possible to take a charge around the path of a closed electric field-line. Note, however, that this conclusion regarding electric field-lines only holds for the electric fields generated by stationary charges.