The magnetic dipole moment can be calculated for a localized (does not extend to infinity) current distribution assuming that we know all of the currents involved. Conventionally, the derivation starts from a multipole expansion of the vector potential. This leads to the definition of the magnetic dipole moment as: m = 1 2 ∭ ∭ V r × × j ( r ) d V , where × is the vector cross product, r is the position vector, and j is the electric current density and the integral is a volume integral. When the current density in the integral is replaced by a loop of current I in a plane enclosing an area S then the volume integral becomes a line integral and the resulting dipole moment becomes m = I S , which is how the magnetic dipole moment for an Amperian loop is derived.