= Solution
Since $\nabla\cdot\mathbf B=0$, a <magnetic field> can locally be represented by a <magnetic vector potential>,
$$
\mathbf B=\nabla\times\mathbf A.
$$
It is not unique: $\mathbf A\to\mathbf A+\nabla\chi$ leaves its <curl> unchanged. In magnetostatics, choose the <Coulomb gauge> $\nabla\cdot\mathbf A=0$. Ampère's law then gives $\nabla^2\mathbf A=-\mu_0\mathbf J$ in <vacuum>. For a localized steady current distribution with the usual decay condition,
$$
\mathbf A(\mathbf r)=\frac{\mu_0}{4\pi}\int\frac{\mathbf J(\mathbf r')}{|\mathbf r-\mathbf r'|}\,d^3r'.
$$
Its <curl> gives the Biot–Savart field. For a uniform field, one convenient choice is $\mathbf A=\tfrac12\mathbf B\times\mathbf r$. Stokes's theorem relates $\oint_C\mathbf A\cdot d\mathbf l$ to <magnetic flux> through a spanning surface. In time-dependent electrodynamics, $\mathbf E=-\nabla\phi-\partial_t\mathbf A$; changing $\mathbf A$ by $\nabla\chi$ requires $\phi\to\phi-\partial_t\chi$ to preserve the <electric field>. Gauge freedom simplifies calculation without changing the electromagnetic observables.
Back to article page