It can be derived from Maxwell's equation for magetostatics. If you look at the divergence of the magnetic field, it is a divergenceless field, meaning there exists a vector potential such that the curl of the vector potential is that of the magnetic field. This can then be inserted into the...