# Vector field of a magnet

Given a standard reference system with axes x y z representing a 3 dimensional space and given a magnet whose north and south pole are at points $P_N=(x_N,y_N,z_N)$ and $P_S=(x_S,y_S,z_S)$ what is the law that describes the vector field of the magnet at any other point of the space? I'm interested in the law that associates to each point $P=(x,y,z)$ the direction and modulus of the vector of the magnetic field.

The ideal dipole magnet has a $1/R^2$ field directed toward the S pole, plus a $1/R^2$ field away from the N pole. The vector sum of those two field elements is the field of the dipole. The Earth's North pole is attractive to the N pole of a magnet, and (confusingly) is thus a S pole.
$${\mathrm { \vec {B} = {(\vec P_S - \vec P) \over {|(\vec P_S -\vec P)| ^3} } - {(\vec P_N -\vec P) \over {|\vec P_N - \vec P|}^3} } }$$
• What is $R$ ? Could you give some reference please? – Alberto Apr 25 '17 at 6:47
• Sampling the values of $\vec{B}$ for a set of points along a path how would you guess the positions of the poles? – Alberto Apr 28 '17 at 21:28