I get how they can plot the field lines outside the magnet, but how do they know how it runs inside the magnet to form a closed loop? Isn't the direction fo the field lines the direction of the force acting on a north pole placed at that point in the field? Then what would be the direction of the force acting on a hypothetical North Pole at the center of the magnet. Thanks!:(Image Attached)
2 Answers
There are two (2) kinds of field inside a magnetic material $\mathbf B$ and $\mathbf H$. The one that has continuous loops is $\mathbf B$ field and it is "surface thing" by which is meant that if you cut a thin disk, a crevasse as Thomson called it, out of the material whose normal is parallel with the direction of $\mathbf B$ then this field across the slit is continuous. On the contrary, if you cut a thin cylinder, a needle out of the material that is parallel with $\mathbf H$ field then $\mathbf H$ is continuous across the needle. Here $\mathbf B = \mu_0(\mathbf H + \mathbf M)$, where $\mathbf M$ is the local magnetization density of the material. Inside a long permanent magnet the fields $\mathbf B$ and $\mathbf H$ are in opposite direction, the field lines of $\mathbf B$ are closed continuous loops but that of $\mathbf H$ are not closed originate but start at one pole and end at the other.
Within the crevasses, disks or needles, one can measure the local fields. If you place a wire loop in the disk you can measure the induced voltage when changing the $\mathbf B$ and its flux rate $\Phi$ in time, and thus both field magnitude and direction can be ascertained.
If you place a magnetic needle inside the thin cylinder carved out of the magnetic material then $\mathbf H$ will exert a torque and force that can be measured from which the field magnitude and its direction can be deduced.
Permanent magnets have their magnetic field from the self-sustaining alignment of the magnetic dipoles of the electrons involved in the magnetic body.
You can therefore imagine - in a very simplified way - the permanent magnet as a multitude of small bar magnets. Together, these produce the magnetic field that is represented by the field lines in your sketch.
The direction of the arrow on the outside is therefore the continuation of the inner orientation.