The Law: Net Magnetic Flux Through Any Closed Surface Is Zero
Take any closed surface S and divide it into small area elements. The magnetic flux through an element is . Summing over the whole closed surface:
Gauss's law for magnetism: The net magnetic flux through any closed surface is zero.
Look back at the field-line figure of Section 1. Draw any closed (Gaussian) surface around a bar magnet or solenoid — around one pole, around the middle, around the whole magnet, anywhere. Every field line that leaves the surface also enters it, because magnetic field lines are continuous closed loops. The books always balance.

Contrast this with electrostatics: a closed surface around the positive charge of an electric dipole has a net outward flux, because lines genuinely start there. Around a magnet's north pole, the outgoing external lines are exactly compensated by lines re-entering through the magnet's body.
Why Zero? Because There Are No Sources or Sinks
In electrostatics, Gauss's law reads
where is the enclosed charge. Charges are sources and sinks of — field lines are born on positive charges and die on negative ones.
The magnetic law has a zero on the right-hand side because isolated magnetic poles (monopoles) are not known to exist. There are no sources or sinks of . The simplest magnetic element is a dipole or a current loop; all magnetic phenomena can be explained in terms of arrangements of dipoles and/or current loops.
[JEE Tip] If monopoles existed, the law would change to , where is the enclosed 'magnetic charge' — perfectly analogous to electrostatics. This hypothetical is itself a favourite exam question!
Key Point: Gauss's law of magnetism holds for any closed surface — any shape, any size, enclosing a pole, a whole magnet, a wire, or nothing. The answer is always exactly zero.
Spotting Impossible Field Diagrams (A Prized Exam Skill)
A classic exam task: look at a field-line diagram and judge whether it can represent a magnetic field. The complete rule-book:
- Lines can never emanate from (or converge into) a point. That would give non-zero flux through a surface around the point — allowed for (a charged wire or point charge), impossible for .
- Lines never cross (true for both electric and magnetic fields) — direction must be unique.
- Magnetostatic field lines can never form closed loops around empty space. A closed loop of a static line must enclose a region carrying current. By contrast, electrostatic lines can never form closed loops at all — not even around charges.
- Field lines at the ends of a solenoid (or between magnet pole pieces) must fringe outward. Perfectly straight, abruptly-ending confined lines violate Ampere's law. Some fringing is inevitable.
- Inside a bar magnet, lines run from S to N — not all lines emanate from the N pole; around both poles the net flux is zero.
- A toroid's field confined entirely inside it is perfectly fine — each closed loop encloses the current-carrying windings.
- Lines all leaving one plate and landing on another (capacitor pattern) represent an electrostatic field; impossible for magnetism (net flux out of the plate is non-zero).
[NEET Important] When a diagram question appears, run this checklist in order: point sources? crossings? loops around empty space? abrupt confinement? Any single violation kills the 'magnetic field' option.
Solved Examples
Example 1: Lines radiating from a point
A diagram shows field lines radiating straight outward from a long straight conductor, like spokes. Can these be magnetic field lines?
Solution:
- Lines emanating from a point (or line) give a non-zero net flux through a surface enclosing it — forbidden for .
- Verdict: wrong as a magnetic field. These actually represent the electric field of a long positively charged wire.
- The correct magnetic lines around a straight current are concentric circles (Chapter 4).
Example 2: Crossing lines with loops in empty space
A diagram shows field lines that cross each other and form closed loops enclosing no current. What is wrong?
Solution:
- Crossing is forbidden for any field — direction would be ambiguous at the crossing point.
- Additionally, magnetostatic lines cannot close around empty space: a closed line must enclose a current-carrying region.
- (And electrostatic lines can never form closed loops at all.) Verdict: wrong on two counts.
Example 3: Field confined inside a toroid
A diagram shows closed field-line loops confined entirely within a toroid. Acceptable?
Solution:
- Each closed loop encloses the toroid's current windings — exactly what magnetostatics requires.
- Verdict: right. Magnetic lines are completely confined within a toroid; there is nothing wrong with closed loops here.
Example 4: Perfectly straight lines ending at a solenoid's mouth
A diagram shows a solenoid whose field lines are completely straight and confined, ending abruptly at the ends. Acceptable?
Solution:
- Such total confinement at the ends of a finite solenoid violates Ampere's law.
- The lines must curve out at both ends and eventually close into loops outside.
- Verdict: wrong — fringing at the ends is physically unavoidable.
Example 5: Lines inside a bar magnet
A diagram shows field lines outside a bar magnet plus lines inside it running from S to N. Acceptable?
Solution:
- This is exactly right: lines outside go N to S, and inside the magnet they continue S to N, forming closed loops.
- Note carefully: not all field lines emanate from the north pole — around both N and S poles, the net flux is zero.
- Verdict: right.
Example 6: All lines leaving a plate
A diagram shows all field lines emanating out of a shaded upper plate and landing on a lower plate. Can this be a magnetic field?
Solution:
- The net flux through a surface surrounding the upper plate is non-zero (everything leaves, nothing enters).
- Impossible for — that plate would be a monopole source.
- Verdict: wrong for magnetism; it correctly shows the electrostatic field of a positively charged upper plate and negatively charged lower plate.
Example 7: Straight lines between pole pieces
A diagram shows perfectly straight, sharply terminated field lines between the two pole pieces of a magnet. Acceptable?
Solution:
- Field lines between pole pieces cannot be precisely straight at the ends — some fringing is inevitable, else Ampere's law is violated.
- Verdict: wrong. (Interestingly, the same fringing requirement holds for electric field lines at capacitor edges.)
Example 8: If monopoles existed
How would Gauss's law of magnetism be modified if magnetic monopoles existed?
Solution:
- Currently because there are no magnetic charges.
- With monopoles of 'magnetic charge' enclosed: .
- Perfectly analogous to .
Example 9: Flux through a surface enclosing one pole
A closed surface encloses only the north-pole half of a bar magnet. What is the net magnetic flux through it?
Solution:
- Tempting to say 'positive — lines leave the N pole'. Wrong.
- External lines do leave through the surface, but an equal number of lines re-enter through the magnet's body (inside, lines run S to N, i.e. into the enclosed region through the cut cross-section).
- Answer: exactly zero — Gauss's law of magnetism holds for any closed surface, poles included.
Example 10: Flux through a cube in a uniform field
A cube of side 10 cm sits in a uniform field of 0.2 T parallel to one set of faces. Find (a) the flux through the face perpendicular to (entry face), (b) the net flux through the cube.
Solution:
- (a) Through one face perpendicular to the field: Wb (negative at entry, positive at exit, by the outward-normal convention).
- (b) Entry and exit fluxes cancel; the four parallel faces have zero flux.
- Net flux , as Gauss's law demands for any closed surface in any field.