# Magnetic scalar potential of a straight wire

If we have a finite straight wire carrying a current $$I$$, we can integrate the Biot-Savart Law for the magnetic field along the wire and find the field at every point of the space as: $$\mathbf{B} = [0,B_\phi,0]; \quad B_\phi = \frac{\mu_0 I}{4\pi a}(\cos\alpha_1-\cos\alpha_2);$$ where $$a$$ is the distance from the wire and $$\alpha_1, \alpha_2$$ are the angles between the evaluation point and the end-points of the wire.

Similarly, by integration of the Biot-Savart Law for the magnetic vector potential, we find: $$\mathbf{A} = [0,0,A_z]; \quad A_z = \frac{\mu_0 I}{4\pi}\ln\left(\frac{z_1+\sqrt{z_1^2+a^2}}{z_2+\sqrt{z_2^2+a^2}} \right);$$ where $$z_1, z_2$$ are the segments between the projection of the evaluation point on the straight wire and the end-points of the wire.

It can be verified that $$\nabla\times\mathbf{A}=\mathbf{B}$$.

I'm now struggling to find a formulation for the magnetic scalar potential in a region of the space that does not contain the straight filament, so that: $$\mathbf{B} = -\nabla\Psi.$$

Any idea on this? I was not able to find any reference online or on Electromagnetics books.

Many thanks in advance for any suggestion.

The short answer is that the curl of the vector field you found is not zero, even at points where there is no current; so there cannot be a scalar potential for it. This is straightforward enough (if tedious) to verify: assign coordinates to the ends of the wire (I recommend $$x = y= 0$$ & $$z = \pm d$$); write out $$\cos \alpha_1$$ and $$\cos \alpha_2$$ in terms of $$d$$ and $$\rho$$, the distance from the axis (which is the same as your $$a$$); and take the curl of the resulting expression for $$B_\phi$$ in cylindrical coordinates. The $$\rho$$- and $$z$$-components of the result will be non-vanishing in general because $$\partial (\rho B_\phi)/\partial \rho$$ and $$\partial B_\phi/\partial z$$ are not zero.

As to why this happens, this is due to an underappreciated subtlety of the Biot-Savart Law. For the Biot-Savart Law to yield a magnetic field satisfying Ampere's Law ($$\nabla \times \mathbf{B} = \mu_0 \mathbf{J}$$), it is necessary that $$\nabla \cdot \mathbf{J} = 0$$. Specifically, if you take the curl of $$\mathbf{B}_\mathrm{BS}$$ as defined by the Biot-Savart Law, then after heroic amounts of vector algebra (see, for example, §5.3.2 of Griffiths) you get to the statement that $$\left[ \mathbf{\nabla} \times \mathbf{B}_\mathrm{BS} \right]_\mathbf{r} = \mu_0 \mathbf{J}(\mathbf{r}) - \frac{\mu_0}{4 \pi} \iiint \left[\nabla_{\mathbf{r}'} \cdot \mathbf{J}(\mathbf{r'}) \right] \frac{\pmb{\mathscr{r}}}{\mathscr{r}^3} \, \mathrm{d}^3\mathbf{r'}$$ where $$\pmb{\mathscr{r}} \equiv \mathbf{r} - \mathbf{r}'$$ and $$\mathscr{r}$$ is its magnitude.

For a current configuration which is divergence-free, this last term will vanish and everything's jake. However, in the case of a finite segment of wire, this is not the case; there is a "source" of current at one end of the wire, and a "sink" of current at the other. This means that you cannot expect this term to vanish, which means you cannot expect $$\nabla \times \mathbf{B}_\mathrm{BS}$$ to be zero. And if $$\mathbf{B}_\mathrm{BS}$$ is not curl-free in some region, there cannot be a scalar potential for $$\mathbf{B}_\mathrm{BS}$$ in that region.

To actually show that the curl of of $$\mathbf{B}_\mathrm{BS}$$ fails to vanish in this case, we can model the "source" and "sink" of current in this configuration via Dirac delta-functions: $$\nabla \cdot \mathbf{J} = 4 \pi I \left[ \delta^3(\mathbf{r} - \mathbf{r}_A) - \delta^3(\mathbf{r} - \mathbf{r}_B) \right],$$ where $$\mathbf{r}_A$$ is the location of the "source" and $$\mathbf{r}_B$$ is the location of the "sink". If you plug these into the above integral, you find that $$\frac{\mu_0}{4 \pi} \iiint \left[\nabla_{\mathbf{r}'} \cdot \mathbf{J}(\mathbf{r'}) \right] \frac{\pmb{\mathscr{r}}}{\mathscr{r}^3} \, \mathrm{d}^3\mathbf{r'} = \mu_0 I \left( \frac{\mathbf{r} - \mathbf{r}_A}{|\mathbf{r} - \mathbf{r}_A|^3} - \frac{\mathbf{r} - \mathbf{r}_B}{|\mathbf{r} - \mathbf{r}_B|^3} \right)$$ It is evident that the curl of $$\mathbf{B}_\mathrm{BS}$$ does not vanish anywhere in space; and of course this will be the same result you would get if you did the rigamarole described in the first paragraph. So there cannot exist a scalar potential such that $$\mathbf{B}_\mathrm{BS} = - \nabla \Psi$$.

You might also notice that the curl of $$\mathbf{B}_\mathrm{BS}$$ looks like an electric dipole field, and you might wonder why this is so. Well, in reality, if we have $$\nabla \cdot \mathbf{J} \neq 0$$, we would then have $$\partial \rho /\partial t \neq 0$$ as well. In this case, we would expect two point charges $$\pm Q(t)$$ at either end of the wire, creating a dipole electric field whose magnitude is increasing linearly with time. And the full time-dependent version of Ampere's Law is $$\nabla \times \mathbf{B} = \mu_0 \mathbf{J} + \epsilon_0 \mu_0 \frac{\partial \mathbf{E}}{\partial t}$$ which means that at points not on the wire (where $$\mathbf{J} = 0$$), $$\nabla \times \mathbf{B}$$ will be proportional to a dipole electric field. Neat!

You may well wonder whether we could get around this by making the line segment into a closed loop (so that the "sources" and "sinks" cancel out), or making the finite segment into a infinite wire (so that the "source" and "sink" terms go to zero.) In this case, it is true that $$\nabla \times \mathbf{B}_\mathrm{BS} = 0$$ everywhere except at the points of the wire. However, the set of "all points in space minus the wire" will be topologically non-trivial in this case; specifically, it will not be simply connected. And the statement that "a curl-free vector field can always be written as the gradient of a scalar" is only true on simply connected spaces. So you will still be unable to find a scalar potential for $$\mathbf{B}$$.

• Thank you very much Michael for your complete answer. I've actually never realised before that the Biot-Savart doesn't hold in this case. But I'm still wondering if we have a closed-loop made of straight filaments, let's say a square to start with, and we consider a simply connected volume like a box outside the loop, in this domain we should be able to express the magnetic field by a scalar potential? And if so, is it possible to find the contribution of each straight wire by superposition? Sep 28, 2021 at 22:33
• @Marco: Yes, in principle you can find a scalar potential in a simply-connected domain. One way to do it is to pretend that the current loop is a "bound current" and find some $\mathbf{M}$ such that $\nabla \times \mathbf{M} = \mathbf{J}$ (guaranteed because $\nabla \cdot \mathbf{J} = 0$.) Then the auxiliary field $\mathbf{H} = \mathbf{B}/\mu_0 - \mathbf{M}$ satisfied $\nabla \times\mathbf{H} = 0$ and $\nabla \cdot \mathbf{H} = - \nabla \cdot \mathbf{M}$, which means there's a scalar potential $\Psi$ such that $\mathbf{H} = - \nabla\Psi$ and $\nabla^2 \Psi = \nabla \cdot \mathbf{M}$. ... Sep 30, 2021 at 15:04
• ... In regions where $\mathbf{M} = 0$, you would then have $\mathbf{B} = - \mu_0 \nabla \Psi$ as well. For a current loop, I think you could define $\mathbf{M}$ distributionally on some surface spanning the loop (think of it as a thin magnetized membrane) and then you'd have a scalar potential for $\mathbf{B}$ everywhere except on that membrane. But: the existence of $\mathbf{M}$ in the first place relies on the fact that $\nabla \cdot \mathbf{J} = 0$, and for a single straight wire this fails. So trying to view this as a superposition runs you into the same problem as in my answer. Sep 30, 2021 at 15:08
• I found the formulation for the magnetic scalar potential of a closed loop in (Vanderlinde 2004), it involves the surface integral of a magnetic dipole across the surface enclosed by the loop. We end up with $\Psi = -I \Omega/4\pi$, where $\Omega$ is the solid angle defined by the surface and the evaluation point. Thank you again for your help. Oct 1, 2021 at 17:35

The two crucial theorems surrounding vector and scalar potentials are

Irrotational Fields Have Scalar Potentials

A vector field $$\mathbf{V}$$ may be written as $$\mathbf{V} = \nabla \Psi$$ if and only if $$\nabla \times \mathbf{V} = 0$$.

Divergence-free Fields Have Vector Potential

A vector field $$\mathbf{V}$$ may be written as $$\mathbf{V} = \nabla \times \mathbf{A}$$ if and only if $$\nabla \cdot \mathbf{V} = 0$$.

There are no magnetic monopoles as far as we know, meaning that magnetic fields are always divergence free and therefore expresssible as the curl of a vector potential $$\mathbf{A}$$.

Maxwell's equations tell us that $$\nabla \times \mathbf{B} = \mu_0 \mathbf{J} + \mu_0\epsilon_0 \frac{\partial \mathbf{E}}{\partial t}$$, where $$\mathbf{J}$$ is the current density. If the RHS is zero, the magnetic field is zero. This means that if there is a nonvanishing magnetic field, $$\mathbf{B}$$ has nonzero curl and so cannot be expressed in terms of a scalar potential.

• I think there's more to it than this. One would expect that in a region where $\mathbf{J} = 0$ (and the fields are static), we would have $\nabla \times \mathbf{B} = 0$ and so we would be able to find a scalar potential for $\mathbf{B}$ in this region. The bigger issue is that $\nabla \times \mathbf{B} \neq \mu_0 \mathbf{J}$ for this field; the Biot-Savart Law doesn't hold exactly for finite segments of wire (even though we use it all the time that way in exercises.) Sep 28, 2021 at 14:39
• In the quasi-static approximation, Biot and Savart's law remains valid even if Maxwell Ampere's equation is no longer verified. So, even if its curl is not zero, the magnetic field can be calculated directly with Biot and Savart's law as you have done. Jul 12, 2022 at 14:51