The divergence of the curl of any vector is zero. The divergence of a magnetic field B is zero. (See Maxwell's equations). Thus,

B=curl A
can always be set. A is known as the vector potential.

From the Biot-Savart law an expression for A may be derived. For a current density distribution J within a volume V, the vector potential at distance r is given by-

A=(μO/4π) ∫v{J/r}
where ∫v denotes integration over the volume V and μO is the vacuum permeability.

The vector potential is not uniquely defined (i.e. for any magnetic field configuration there are an infinite number of valid vector potentials). It is analagous to the scalar potential involving the electric field.