Use (i) the Ampere’s law for H and (ii) continuity of lines of B, to conclude that inside a bar magnet, (a) lines of H run from the N pole to S pole, while (b) lines of B must run from the S pole to N pole.
Consider a magnetic field line going through the bar magnet. We know that it must be a closed-loop.
B and dl are at an acute angle to each other inside the magnet.
i.e., i.e. positive
Hence, the lines of B must run from south pole S to north pole N inside the bar magnet.
According to ampere's law
As negative
If angle between H and dl is more than , so that is negative
(meaning that the lines run from N pole to S pole inside the bar magnet)