# Behavior of $r$-component of a $\mathbf{B}$-field inside cylindrical magnet

I have a cylindrical permanent magnet with uniform magnetization $$\mathbf{M}=\mathbf{a_z}M$$, length $$L$$ and Diameter $$D$$. The magnet has its center in the origin. So there is a length $$L/2$$ on each side of the $$xy$$-plane.

In an example in my book featuring this scenario, the author states:

"As a consequence of $$\displaystyle\oint \mathbf{B} \cdot d\mathbf{S}=0$$ we have the following case:

1. The $$\mathbf{B}$$-field has a negative $$r$$-component for $$z<0$$

2. The $$\mathbf{B}$$-field has no $$r$$-component for $$z=0$$

3. The $$\mathbf{B}$$-field has a positive $$r$$-component for $$z>0$$

Now, I understand that the magnetic field lines must always close upon themselves, that is, they form a closed loop. I also realize we have the following situation with regards to the magnetic field and the magnetization.

Clearly, from the pictures, the magnetic field has positive $$r$$-component for $$z>0$$, and negative for $$z<0$$, but I'm not sure why this is the case. What does $$\displaystyle\oint \mathbf{B} \cdot d\mathbf{S}=0$$ have to do with it?

I would really need some help with this.

• I'm just not sure why $r=0$ at $z=0$. I get that for the field lines to change direction, there must be a point where $r=0$, but why does this happen exactly at the center of the magnet?
• @Carl where else would it happen given the symmetry about the plane $z=0$? Nov 1, 2020 at 13:11