# Why does Gauss's law for magnetism imply existence of a magnetic vector potential?

Gauss's law for magnetism is $$\vec{\nabla} \cdot \vec{B} = 0$$, and I read that this implies we can write $$\vec{B} = \vec{\nabla} \times \vec{A}$$, for some vector potential $$\vec{A}$$.

I understand that having $$\vec{B} = \vec{\nabla} \times \vec{A}$$ implies the statement of Gauss's law. But I am having trouble proving the converse; that $$\vec{\nabla} \cdot \vec{B} = 0$$ implies the magnetic field must take the form $$\vec{B} = \vec{\nabla} \times \vec{A}$$.

My attempt: By the Helmholtz decomposition theorem (https://en.wikipedia.org/wiki/Helmholtz_decomposition), we can write any vector field $$\vec{B} = -\nabla \phi + \vec{\nabla} \times \vec{A}.$$ Then $$\vec{\nabla} \cdot \vec{B} = 0 \Rightarrow -\nabla^2 \phi = 0.$$ However, this does not imply that $$\phi \equiv 0$$. So why can't magnetic fields be described in terms of some vector potential $$\vec{A}$$ but also some scalar potential $$\phi$$ that has $$0$$ Laplacian?

I don't think this has anything to do with the existence of a magnetic monopole or not, since I'm taking $$\vec{\nabla} \cdot \vec{B} = 0$$, but I may also be wrong.

• Actually pseudoscalar potential $\phi$ is widely used to solve magnetostatics problems. Nov 17, 2020 at 22:24
• look at the webpage carefully again, you will see that when $\nabla \cdot \mathbf{F}=0$ then $\Phi=0$, for EM $\mathbf{B} = \mathbf{F}$ and there follows $\phi =0$ Nov 17, 2020 at 22:52
• Where does it say that on the page? Mar 21, 2022 at 16:52

1. Use Hodge duality to rewrite the magnetic vector field $$\vec{B}$$ as a 2-form $$B=\frac{1}{2}\epsilon_{ijk}B^i\mathrm{d}x^j\wedge\mathrm{d}x^k$$.

2. Gauss's law for magnetism then becomes the fact that the 2-form is closed $$\mathrm{d}B=0$$.

3. It then follows from Poincare Lemma that the 2-form $$B=\mathrm{d}A$$ is exact, where $$A=A_i\mathrm{d}x^i$$ is a 1-form.

4. This translates back into the sought-for formula $$\vec{B}=\vec{\nabla}\times \vec{A}$$.

5. (Poincare Lemma fails for a magnetic monopole because the punctured 3-space $$\mathbb{R}^3\backslash\{0\}$$ is not contractible.)

• Thanks, I see that $dB = 0$ implies the existence of some $A$ s.t. $B = dA$, but I guess my question is, how do we know we can't add some extra term (not of the form $dA$) to $B$ such that $dB = 0$ still holds? I am not too familiar with Hodge duality; it might help me to see what the Hodge dual for the expression $\vec{\nabla} \phi$ would be? Nov 20, 2020 at 18:49
• Is there any other proof of this without hodge duality, using standard vector calculus, as I'm struggling to understand why $\phi$ with a laplacian of 0 couldn't be added? Is it due to the fact that we aren't taking into account the curl? Or the fact that we assume the field vanishes at infinity? Mar 22, 2022 at 15:27
• Hi jensen paull. Thanks for the feedback. The issue is not Hodge duality -- it can in principle be formulated in either language. The point is that it is possible to choose an $A$ (as a function of $B$) so that $\phi$ is not needed. Note however that $A$ does generically not satisfy any particular BCs. Mar 22, 2022 at 18:20

This is essentially (a special case of) the statement of Poincaré's lemma. The relevant statement here goes as follows:

Let $$U\subseteq \mathbb R^3$$ be star-shaped, and let $$\vec B$$ be a smooth vector field on $$U$$ such that $$\nabla \cdot \vec B = 0$$. Then there exists a smooth vector field $$\vec A$$ on $$U$$ such that $$\nabla \times \vec A = \vec B$$.

Proof: The proof works by explicit construction. For the moment, let $$U$$ be star-shaped with respect to the origin. We then define $$\vec A(\vec r) := \int_0^1 t \left( \vec B(t\vec r) \times \vec r\right) \mathrm dt$$ Crucially, note that we are assuming that for each $$\vec r\in U$$, we have that $$t\vec r\in U$$ for each $$t\in[0,1]$$. This is where the requirement that $$U$$ is star-shaped with respect to the origin comes in. Computing the curl yields

$$\nabla \times \vec A = \int_0^1 t \left(3 \vec B(t\vec r) - \underbrace{t\vec r \big(\nabla \cdot \vec B\big)(t\vec r)}_{=0} + t\big([\vec r \cdot \nabla]\vec B\big)(t\vec r) - \underbrace{\big(\vec B(t\vec r)\cdot\nabla \big)\vec r}_{=\vec B(t\vec r)}\right) \mathrm dt$$ $$=\int_0^1\left( 2t \vec B(t\vec r) + t^2 \big([\vec r\cdot \nabla]\vec B\big)(tr) \right) \mathrm dt = \int_0^1 \frac{d}{dt} \left(t^2 \vec B(t\vec r)\right) \mathrm dt = \vec B(\vec r)$$ as promised. If $$\vec B$$ is star-shaped with respect to some point $$\vec R$$ instead of the origin, the construction is straightforwardly modified:

$$\vec A(\vec r) := \int_0^1 t \left(\vec B\big(t\vec r+ (1-t)\vec R\big) \times \vec r\right)\mathrm dt$$ This produces the same result, with slightly messier algebra.

It's worth noting that Poincaré's lemma can be extended to all contractible domains. This proof is somewhat more annoying so I will omit it, but it follows essentially the same spirit; the salient difference is that where we consider the straight line segments $$t\vec r$$ and $$t\vec r + (1-t)\vec R$$ for $$t\in[0,1]$$, the more general proof allows for more general smooth curves.

Lastly, the implication $$\nabla \times \vec F = 0 \implies \vec F = \nabla \chi$$ is another specific case of Poincaré's lemma, and it is proved by construction in the same way. It's an excellent exercise in elementary vector calculus to figure out how to modify our prior construction for this case; the answer is given below.

$$\chi(\vec r) := \int_0^t \big[\vec F(t\vec r) \cdot \vec r \big] \mathrm dt$$

It should also be noted that a stronger statement is possible in this case - the implication holds even if $$U$$ is merely simply-connected. This can be proven from Stokes's theorem fairly straightforwardly, but this answer is already long enough.

For some additional intuition, consider the following counterexamples to Poincaré's lemma.

Let $$\vec B = \frac{\alpha}{r^2}\hat r$$ in spherical coordinates, on the domain $$U=\mathbb R^3-\{\vec 0\}$$, which would be the magnetic field of a magnetic monopole. Note that $$\nabla \cdot \vec B = 0$$ on $$U$$, but there is no $$\vec A$$ such that $$\vec B = \nabla \times \vec A$$. Poincaré's lemma does not apply here because $$U$$ is not contractible. However, one could cover $$U$$ with two overlapping but individually contractible domains $$U_1$$ and $$U_2$$, and on each we could find a vector potential $$\vec A_1$$ and $$\vec A_2$$ which are related by a gauge transformation.

Next, let $$\vec B = \frac{\alpha}{r} \hat \varphi$$ in cylindrical coordinates on the domain $$\mathbb R^3$$ minus the $$\hat z$$-axis. You may recognize as the magnetic field outside of a straight, infinitely long wire which lies along the $$\hat z$$-axis. Despite the fact that $$\nabla \times \vec B = 0$$ on $$U$$, this field cannot be written as the gradient of a scalar potential (feel free to try) on $$U$$, which is made obvious by the fact that its line integral along a closed loop containing the $$\hat z$$-axis is nonzero.

We can get close by letting $$\psi = \alpha \varphi$$, but $$\varphi$$ has a branch cut somewhere and therefore this does not constitute a valid vector potential on all of $$U$$.

Once again, the reason is that the expression written above applies only to the region outside of the wire, which is not contractible. If the wire has a finite diameter, then $$\vec B$$ will fail to be differentiable at the wire's surface which invalidates our assumptions. If the wire is infinitely thin, then $$\vec B$$ will fail to even exist at the origin, once again invalidating our assumptions.

Then $$\vec{\nabla} \cdot \vec{B} = 0 \Rightarrow -\nabla^2 \phi = 0.$$ However, this does not imply that $$\phi \equiv 0$$. So why can't magnetic fields be described in terms of some vector potential $$\vec{A}$$ but also some scalar potential $$\phi$$ that has $$0$$ Laplacian?

It doesn't, but that's not what you asked. $$\nabla \cdot \vec B$$ implies that there exists some $$\vec A$$ such that $$\nabla \times \vec A= \vec B$$ when the domain in question is star-shaped (or more generally, contractible). It does not imply that it is impossible to express $$\vec B$$ in any other way.

Indeed, as described above if additionally $$\nabla \times \vec B = 0$$ then we may locally write $$\vec B = \nabla \psi$$ for some scalar function $$\psi$$. This magnetic scalar potential is a frequently-used tool in magnetostatics.

• "If the wire is infinitely thin, then Bwill fail to even exist at the origin, once again invalidating our assumptions." Is this you saying that if it is infinitely thin, then it is possible to construct a magnetic vector potential? Nov 17, 2022 at 9:43
• How does this follow from your answer here: physics.stackexchange.com/questions/684001/… where you write the magnetic vector potential of an infinite wire , by solving in the non problematic domain Nov 17, 2022 at 15:29
• @jensenpaull Indeed, you're right - I got my counterexamples mixed up. The long straight wire is a counterexample to the statement that $\nabla \times \vec F = 0 \implies F = \nabla \psi$. I've fixed that section. Nov 17, 2022 at 16:02
• Not sure what type of question to even ask if I were to make a new one, but could you explain to me why it is possible to introduce the magnetic scalar potential. A quote I got from Wikipedia " The potential is valid in any region with zero current density, thus if currents are confined to wires or surfaces, piecemeal solutions can be stitched together to provide a description of the magnetic field at all points in space." What is is about the magnetic scalar potential that allows you to pick regions where there is no current density, and then assert it can be written as the gradient of f Nov 28, 2022 at 20:23
• Since your arguement above seems to imply to me it is not possible to write this field with a restricted domain as the gradient of some scalar function, even though the curl is infact zero in this region. Nov 28, 2022 at 20:24

Although less compact, The same arguement written in a different form is as follows:

We want to show that

$$\nabla \times \vec{A} = \nabla \times \vec{C} + \nabla f$$

When

$$\{\nabla^2 f = 0\} \Rightarrow \partial^{2}_{x}f + \partial^{2}_{y}f + \partial^{2}_{z}f = 0$$

Starting with then definitions:

$$\nabla \times \vec{C} = \begin{vmatrix} \hat i & \partial_{x} & C_{x} \\ \hat j & \partial_{y} & C_{y} \\ \hat k & \partial_{z} & C_{z} \end{vmatrix} = \begin{bmatrix} \partial_{y} C_{z} - \partial_{z}C_{y} \\ \partial_{z} C_{x} - \partial_{x}C_{z} \\\partial_{x} C_{y} - \partial_{y}C_{x} \end{bmatrix}$$

$$\nabla f = \begin{bmatrix} \partial_{x}f \\ \partial_{y}f \\ \partial_{z} f \end{bmatrix}$$ differentiate and integrate [ Constant set to zero] $$\nabla f = \begin{bmatrix} \int[\partial^2_{x}f ]dx \\ \int[\partial^2_{y}f] dy \\ \int[\partial^2_{z} f]dz \end{bmatrix}$$ Substitute the laplacian condition in: $$\nabla f = \begin{bmatrix} \int[-\partial^{2}_{y}f - \partial^{2}_{z}f ]dx \\ \int[-\partial^{2}_{x}f - \partial^{2}_{z}f] dy \\ \int[-\partial^{2}_{x}f - \partial^{2}_{y}f]dz \end{bmatrix}$$ Seperate the integrals: $$\nabla f = \begin{bmatrix} \int[-\partial^{2}_{y}f]dx - \int[\partial^{2}_{z}f]dx \\ \int[-\partial^{2}_{x}f]dy - \int[\partial^{2}_{z}f] dy \\ \int[-\partial^{2}_{x}fdz - \int[\partial^{2}_{y}f]dz \end{bmatrix}$$

Seperate the derivative:

$$\nabla f = \begin{bmatrix} \partial_y\int[-\partial_{y}f]dx - \partial_z \int[\partial_{z}f]dx \\ \partial_x\int[-\partial_{x}f]dy - \partial_z\int[\partial_{z}f] dy \\ \partial_{x}\int[-\partial_{x}f]dz - \partial_{y}\int[\partial^{2}_{y}f]dz \end{bmatrix}$$

$$\nabla \times \vec{C} + \nabla f = \begin{bmatrix} \partial_{y} C_{z} - \partial_{z}C_{y} \\ \partial_{z} C_{x} - \partial_{x}C_{z} \\\partial_{x} C_{y} - \partial_{y}C_{x} \end{bmatrix} + \begin{bmatrix} \partial_y\int[-\partial_{y}f]dx - \partial_z \int[\partial_{z}f]dx \\ \partial_x\int[-\partial_{x}f]dy - \partial_z\int[\partial_{z}f] dy \\ \partial_{x}\int[-\partial_{x}f]dz - \partial_{y}\int[\partial^{2}_{y}f]dz \end{bmatrix}$$

Combining Like derivatives:

$$\nabla \times \vec{C} + \nabla f = \begin{bmatrix} \partial_y[C_{z} -\int\partial_y f dx] - \partial_{z} [C_{y} + \int\partial_{z} f dx] \\ \partial_{z}[C_{x} - \int\partial_{z}f dy] - \partial_{x}[C_{z} + \int \partial_{x}fdy] \\ \partial_{x}[C_{y} - \int\partial_{x}f dz] - \partial_{y}[C_{x} + \int \partial_{y}fdz] \end{bmatrix}$$

Notice how the expression sort of looks like the same form as the curl of some function.

We see that

$$\nabla \times \vec{A} = \begin{bmatrix} \partial_{y} A_{z} - \partial_{z}A_{y} \\ \partial_{z} A_{x} - \partial_{x}A_{z} \\\partial_{x} A_{y} - \partial_{y}A_{x} \end{bmatrix}$$

Matching the coefficients of the curl of my vector field A, with the derived expression for the curl of c plus the gradient of f, we see that

$$A_{x} =C_{x} + \int \partial_{y}fdz = C_{x} - \int\partial_{z}f dy$$
$$A_{y} = C_{y} + \int\partial_{z} f dx = C_{y} - \int\partial_{x}f dz$$

$$A_{z} = C_{z} + \int \partial_{x}fdy = C_{z} -\int\partial_y f dx$$

Notice that in identifying the different components, depending on "where it shows up" in our derived expression, it is different. If we want to write this expression as the curl of some vector field A, then these components should infact be equal

Assuming this is true, What are the conditions necccessary to make this inequality hold?

Differenting with respect to each variable in the corresponding equation yields that these are equal if:

$$\partial^2_{y}f + \partial^2_{z}f = 0$$ $$\partial^2_{x}f + \partial^2_{z}f = 0$$ $$\partial^2_{y}f + \partial^2_{x}f = 0$$

Adding them to form a single condition yields that the components of A are equal given $$\partial^2_{x}f + \partial^2_{y}f + \partial^2_{z}f = 0$$

$$\nabla^2 f = 0$$

Which we know is true, Thus the equality holds, This means the components are equal and this means we can write this expression as the curl of a single vector field:

$$\vec{A} = \begin{bmatrix}C_{x} + \int \partial_{y}fdz\\C_{y} + \int\partial_{z} f dx\\C_{z} + \int \partial_{x}fdy\end{bmatrix}$$

This is why we dont need to add $$\nabla f$$, as when $$\nabla^2 f =0$$, This expression can be expressed as the curl of some other vector field.

• If I have made any mistakes in this derivation please let me know Nov 16, 2022 at 14:55
• Poincaré's lemma fails when the space in question is not contractible - e.g. in $\mathbb R^3$ minus the $\hat z$-axis. I suspect that if indeed your manipulations can be made correct, somewhere in your differentiating and integrating you utilized the assumption of contractibility. If you want to find that omission, I would suggest writing out your integral bounds explicitly rather than relying on the sloppier idea of indefinite integrals. Nov 17, 2022 at 5:31