# Vector potential from magnetic field

If a uniform magnetic field ${\bf{B}}=B_{z}{\bf{\hat{z}}}$ exists in a hollow cylinder (with the top and bottom open) with a radius $R$ and axis pointing in the $z$-direction, then the vector potential

$${\bf{A}}=\frac{BR^{2}}{2r}{\bf{\hat{\phi}}}?$$

using Stokes's theorem.

How can you prove this?

You are given a uniform magnetic field $\vec{B}=B_z\hat{z}$

We have the relation connecting the magnetic field vector $\vec{B}$ and the vector potential $\vec{A}$

$$\vec{B}=\nabla\times\vec{A}\tag 1$$

Now, according to Stoke's theorem, we have

$$\int_S\left(\nabla\times\vec{A}\right)\cdot d\vec{S}=\oint_C\vec{A}\cdot d\vec{r}\tag 2$$

The theorem can be stated as follows: The surface integral of the curl of a vector field is equal to the line integral of the vector field around the boundary of the surface. So, in the above equation, the surface integral is across the surface $S$ bounded by a boundary curve $C$, along which the line integral is taken.

Now, from $(1)$, we can write $(2)$ as

$$\oint_C\vec{A}\cdot d\vec{r}=\int_S\vec{B}\cdot d\vec{S}\tag 3$$

Since the magnetic field is uniform and points in a direction along the axis of the cylinder, the magnetic vector potential lies along the radial direction, which is clear from equation $(1)$. At the end, the magnetic field points in the same direction as the cross sectional area of the hollow cylinder. Hence the dot product simplifies as

$$\oint_C\vec{A}\cdot d\vec{r}=B_z\int_S d{S}\tag 4$$

If we choose our origin on an axis of symmetry, so that we can take $A$ as circumferential ($\hat{\phi}$ component only) and a function only of $r$, then

$$\oint_C\vec{A}\cdot d\vec{r}=A_{\phi}\left(2\pi r\right)\tag 5$$

That's all. Now, check $(4)$ and $(5)$; and using appropriate substitutions, you can reach your final answer.

• But if the surface is given by the cross-sectional area of the cylinder, then shouldn't the line integral be over the shell of the cylinder and therefore get a factor $2\pi R$ instead of $2\pi r$? Nov 6, 2016 at 2:26
• Yes. However, the potential is a function of $r$, the distance from the axis. Hence no need to apply the limits.
– UKH
Nov 6, 2016 at 2:28

Take the curl of ${\bf A}$. If the answer is ${\bf B}$, then you have a valid vector potential. Note, however, that the vector potential is not unique; two different expressions for ${\bf A}$ may have the same curl, and so they correspond to the same magnetic field.

• But in cylindrical coordinates, $\nabla = (\partial_{\rho},\frac{1}{\rho}\partial_{\phi},\partial_{z})$ and ${\bf{A}}=(0,\frac{BR^{2}}{2r},0)$ so that ${\bf{B}}=\nabla\times {\bf{A}}=(0,-\frac{BR^{2}}{2r^{2}},0)$. Where am I getting it wrong? Nov 6, 2016 at 1:17
• If you are directly substituting in $\nabla\times\vec{A}=\vec{B}$, then why Stoke's theorem?
– UKH
Nov 6, 2016 at 1:53
• I know. Can you give me the detailed steps so I can see where I am getting things wrong? Nov 6, 2016 at 1:56

$$\int \vec{A}\cdot\vec{dl} = \int\int (\nabla\times \vec{A}) \cdot \vec{dS} = \int\int\vec{B} \cdot \vec{dS}$$ $$=> A\times2\pi r = B \times \pi R^2$$ $$\vec{A} = \frac{BR^2}{2r}\hat\phi$$

• Further argument is required to take $\vec{A}$ out of the integral on the left hand side. And if $\int dS = \pi R^2$ on the right hand side then you would have $\int dl = 2\pi R$ for the loop on the left hand side. Jun 6, 2023 at 15:32

You can't because it isn't.

If $${\bf{A}}=\frac{BR^{2}}{2r}{\bf{\hat{\phi}}}$$ then $$\nabla \times {\bf A} = \frac{1}{r} \frac{\partial}{\partial r} rA_\phi = 0$$

This is indeed a valid solution for the A-field outside the cylinder, but not inside.

Inside the cylinder we can argue that the A-field must circulate around the B-field in the $$\hat{\phi}$$ direction and must be azimuthally symmetric, with no $$\hat{z}$$ component.

Stokes' theorem then gives $$\oint {\bf A}\cdot d{\bf l} = \int (\nabla \times {\bf A}) \cdot d{\bf S} = \int {\bf B}\cdot d {\bf S}$$ $$A_{\phi}\ 2\pi r = B_z\ \pi r^2$$ and hence $$A_\phi = \frac{Br}{2}$$ and thus $${\bf A} = \frac{Br}{2}\hat{\phi}$$ is valid for the A-field inside the cylinder, is continuous at $$r=R$$ with the A-field outside the cylinder (which is the expression in the OP and is easily obtained because the integral on the RHS of Stokes' theorem becomes $$\pi R^2 B_z$$) and has a curl equal to the B-field inside the cylinder. It is not unique however because you could add any curl-free field to it. Indeed you can see we neglected to consider $$A_r$$ in the above solution. This could not be a function of $$\phi$$ or $$z$$ because it would not be curl-free, but could be a function of $$r$$ or a constant. It is usual in magnetosstatics though to let $$\nabla \cdot {\bf A} = 0$$ which would eliminate any $$A_r = f(r)$$.

See Chapter 14 of the Feynman lectures.