# Magnetostatics: the vector potential

This and the next posts are supposed to wrap up a few loose ends on magnetism. One of these loose ends is the (magnetic) vector potential, which we introduced in our post on gauge transformations, but then we didn’t do much with it. Another topic I neglected so far is that of the magnetic dipole moment (as opposed to the electric dipole moment), which is an extremely important concept both in classical as well as in quantum mechanics. So let’s do the vector potential here, and the magnetic dipole moment in the next. š

Let’s go for it. Let me recall the basics which, as usual, are just Maxwell’s equations.Ā You’ll remember that the electrostatic field was curl-free: āĆEĀ = 0, everywhere. Therefore, we can apply the following mathematical theorem: if the curl of a vector field is zero (everywhere), then the vector field can be represented as the gradient of some scalar function:

if āĆCĀ = 0, then there is some ĪØĀ for which C =Ā āĪØ

Substituting C forĀ E, and taking into account our conventions on charge and the direction of flow, we wrote:

E = āāĪ¦

Ī¦ (phi) is referred to as the electric potential. Combining E = āāĪ¦ with Gauss’ Law ā āā¢E = Ļ/Īµ0Ā ā we got Poisson’s equation:

ā2Ī¦ =Ā āĻ/Īµ0

So that equation sums up all of electrostatics. Really: that’s it! š

Now, the two equations for magnetostatics are:Ā āā¢B = 0 and c2āĆB = j/Īµ0. Let me say something more about them:

1. The āā¢BĀ = 0 equation is true, always, unlike theĀ āĆEĀ = 0 expression, which is true for electrostatics only (no moving charges).
2. The āā¢BĀ = 0 equation says the divergenceĀ of B is zero,Ā always. Now, you can verify for yourself that the divergence of the curl of a vector field is always zero, so divĀ (curlĀ A) = āā¢(āĆA) = 0, always. Therefore, there’s another theorem that we can apply. It says the following: if the divergence of a vector field, say D, is zero ā so if āā¢D = 0, thenĀ D will be theĀ the curl of some other vector fieldĀ C, so we can write:Ā D =Ā āĆC. Ā Applying this to āā¢BĀ = 0, we can write:Ā

If āā¢BĀ = 0, then there is anĀ A such that B =Ā āĆA

We can also write this as follows: āĀ·B = āĀ·(āĆA) = 0 and, hence, B =Ā āĆA.Ā Now, it’s this vector field AĀ that is referred to as the (magnetic)Ā vectorĀ potential, and so that’s what we want to talk about here. As a start, it may be good to write all of the components of ourĀ B =Ā āĆA vector:

Note that we have no ‘time component’ because we assume the fields are static, so they do notĀ change with time. Now, because that’s a relatively simple situation, you may wonder whether we really simplified anything with this vector potential. B is a vector with three components, and so is A. The answer to that question is somewhat subtle, and similar to what we did for electrostatics: it’sĀ mathematically convenient to use A, and then calculate the derivatives above to find B. So the number of components doesn’t matter really: it’s just more convenientĀ to first get A using our data on the currents j, and then we get B from A.

That’s it really. Let me show you how it works. The whole argument is somewhat lengthy, but it’s not difficult, and once it’s done, it’s done. So just carry on and please bear with me š

First, we need to put some constraints on A, because the B =Ā āĆA equation does not fully define A. It’s like the scalar potential Ī¦: any Ī¦’ = Ī¦ + C was as good a choice as Ī¦ (withĀ CĀ any constant), so we needed a reference point Ī¦ = 0, which we usually took at infinity. With the vector potentialĀ A, we have even more latitude: we can not only add a constant but any field which is the gradient of some scalar field, so any A’ = A + āĪØ will do. Why? Just write it all out: āĆ(A + āĪØ) = āĆA + āĆ(āĪØ). But the curl of the gradient of a scalar field (or a scalar function) is always zero (you can check my post on vector calculus on this), so āĆ(āĪØ) = 0 and soĀ āĆ(A + āĪØ) = āĆA + āĆ(āĪØ) = āĆA + 0 = āĆA = B.

So what constraints should we put on our choice of A? The choice is, once again, based onĀ mathematical convenience: in magnetostatics,Ā we’ll choose A such that āā¢AĀ = 0. Can we do that? Yes. The A’ = A + āĪØ flexibility allows us to make āā¢A’Ā anything we wish, and so A and A’ will have the same curl, but theyĀ don’t need to have the same divergence. So we can choose an A’ soĀ āā¢A’Ā = 0, and then we denote A’ by A. š So our ‘definition’ of the vector potentialĀ A is now:

B =Ā āĆA andĀ āā¢AĀ = 0

I have to make two points here:

1. First, you should note that, in my post on gauges, I mentioned that the choice is different when the time derivatives of E and B are notĀ equal to zero, so when we’re talking changingĀ currents and charge distributions, so that’sĀ dynamics. However,Ā that’s not a concern here.
2. To be fully complete, I should note that the ‘definition’ above does still notĀ uniquelyĀ determine A. For a unique specification, we also need some reference point, or say how the field behaves on some boundary, or at large distances. It is usually convenient to choose a field which goes to zero at large distances, just like our electricĀ potential.

Phew! We’ve said so many things about AĀ now, but nothingĀ that has any relevance to how we’d calculateĀ A. š¦ So we are we heading here?

Fortunately, we can go a bit faster now. TheĀ c2āĆB = j/Īµ0Ā equation and our B =Ā āĆA give us:

c2āĆ(āĆA)Ā = j/Īµ0

Now, there’s this other vector identity, which you surely won’t remember eitherābut trust me: I am not lying: āĆ(āĆA) = ā(āā¢A) āĀ ā2A. So, now you see why we choose A such that āā¢A = 0 ! It allows us to write:

c2āĆ(āĆA)Ā = ā c2ā2A =Ā j/Īµ0Ā āĀ ā2A = āj/Īµ0c2

Now, the three components ofĀ ā2A = āj/Īµ0c2Ā are, of course:

As you can see, each of these three equations is mathematically identical to that Poisson equation:Ā ā2Ī¦ =Ā āĀ Ļ/Īµ0. So all that we learned about solving for potentials whenĀ Ļ is known can now be used to solve for each component of A when j is known. Now, to calculate Ī¦, we used the following integral:

Simply substituting symbols then gives us the solution forĀ Ax:

We have a similar integral for AyĀ and Az, of course, and we can combine the three equations in vector form:

Finally, and just in case you wonder what is what, there’s the illustration below (taken from Feynman’s Lecture on this topic here) that, hopefully, will help you to make sense of it all.

At this point, you’re probably tired of these formulas (or asleep) or (if you’re not asleep) wondering what they mean really, so let’s do two examples. Of course, you won’t be surprised that we’ll be talking a straight wire and a solenoid respectively once again. š

The magnetic field of a straight wire

We already calculated the magnetic field of a straight wire, using AmpĆØreās Law and the symmetry of the situation, in our previous post on magnetostatics. We got the following formula:

Do we get the same using those formulas for A and then doing our derivations to get B? We should, and we do, but I’ll be lazy here and just refer you to the relevant section in Feynman’s LectureĀ on it, because the solenoid stuff is much more interesting. š

The magnetic field of a solenoid

In the mentioned post on magnetostatics, we also derived a formula for the magnetic field insideĀ a solenoid. We got:

with nĀ the number of turns per unit length of the solenoid, and I the current going through it. However, in the mentioned post, we assumed that the magnetic field outside of the solenoid was zero, for all practical purposes, but it is not. It is very weak but not zero,Ā as shown below. In fact, it’s fairly strong at very short distances from the solenoid! Calculating the vector potential allows us to calculate its exact value, everywhere. So let’s go for it.

The relevant quantities are shown in the illustration below. So we’ve got a very long solenoid here once again, with n turns of wire per unit length and, therefore, a circumferential current on the surface of nĀ·I per unit lengthĀ (the slight pitch of the winding is being neglected).

Now, just like that surface charge densityĀ Ļ in electrostatics, we have a ‘surface current density’ J here, which we define as J =Ā nĀ·I. So we’re going from a scalar to a vector quantity, and the components of J are:

JxĀ =Ā āJĀ·sinĻ, JyĀ =Ā āJĀ·cosĻ, JzĀ = 0

So how do we do this? As should be clear from the whole development above, the principle is that the x-component of the vector potential arising from a current density j is the same as the electric potential Ī¦Ā that would be produced by a charge densityĀ Ļ equal to jxĀ divided by c2, and similarly for the y- and z-components.Ā Huh?Ā Yes. Just read it a couple of times and think about it: we should imagine some cylinder with a surface chargeĀ Ļ = ā(J/c2)Ā·sinĻ to calculate Ax. And then we equateĀ Ļ with ā(J/c2)Ā·cosĻ and zero respectively to find AyĀ and Az. Ā

Now, that sounds pretty easy but Feynman’s argument is quite convoluted here, so I’ll just skip it (click the link here if you’d want to see it) and give you the final result, i.e. the magnitude of A:

Of course, you need to interpret the result above with the illustration, which shows that A is always perpendicular to r’. [In case you wonder why we write r’Ā (so r with a prime) and not r, that’s to make clear we’re talking the distance from the z-axis, so it’sĀ not the distanceĀ from the origin.]

Now, you may think that c2Ā in the denominator explains the very weak field, but it doesn’t: it’s the inverse proportionality to r’ that makes the difference!Ā Indeed, you should compare the formula above with the result we get for the vector potential insideĀ of the solenoid, which is equal to:

The illustration below shows the quantities involved. Note that we’re talking aĀ uniformĀ magnetic field here, along the z-axis, which has the same direction as B0Ā and, hence, is pointing towards you as you look at the illustration, which is why you don’t see the B0Ā field lines and/or the z-axis: they’re perpendicular to your computer screen, so to speak.

As for the direction of A, it’s shown on the illustration, of course, but let me remind you of the right-hand rule for the vector cross product aĆb once again, so you can make sense of the direction of AĀ = (1/2)B0Ćr’ indeed:

Also note the magnitude this formula implies:Ā aĆb = |a|Ā·|b|Ā·sinĪøĀ·n, withĀ Īø the angle between a and b,Ā andĀ nĀ the normal unit vector in the direction given by that right-hand rule above. Now, unlike a vectorĀ dotĀ product, the magnitude of the vector cross product isĀ notĀ zero for perpendicular vectors. In fact, whenĀ Īø =Ā Ļ/2, which is the case for B0Ā andĀ r’, then sinĪø = 1, and, hence, we can write:

|A| = A =Ā (1/2)|B0||r’| = (1/2)Ā·B0Ā·r’

Now, just substitute B0Ā for B0Ā = nĀ·I/Īµ0c2, which is the field inside the solenoid, then you get:

A = (1/2)Ā·nĀ·IĀ·r’/Īµ0c2

You should compare this formula with the formula for A outsideĀ the solenoid, so you can draw the right conclusions. Note that both formulas incorporate the same (1/2)Ā·nĀ·I/Īµ0c2Ā factor. The difference, really, is that insideĀ the solenoid, A is proportional to r’ (as shown in the illustration: if r’ doubles, triples etcetera, then A will double, triple etcetera too) while, outside of the solenoid, A is inverselyĀ proportional to r’. In addition, outsideĀ the solenoid, we have the a2Ā factor, which doesn’t matter inside. Indeed, the radius of the solenoid (i.e. a) changes the flux, which is the product of B and the cross-section areaĀ ĻĀ·a2, but not B itself.

Let’s do a quick check to see if the formula makes sense. We do not want A to be larger outside of the solenoid than inside, obviously, so the a2/r’ factor should be smallerĀ than r’ for r’ > a. Now,Ā a2/r’ <Ā r’ if a2 < r’2, and because a an r’ are both positive real numbers, that’s the case if r’ >Ā a indeed. So we’ve got something that resembles the electric field inside and outside of a uniformly charged sphere, except that A decreases as 1/r’ rather than as 1/r’2, as shown below.

Hmm… That’s all stuff to think about…Ā The thing you should take home from all of this is the following:

1. A (uniform) magnetic field B in the z-direction corresponds to a vector potential A that rotates about the z-axis with magnitudeĀ A =Ā B0Ā·r’/2 (with r’ the displacement from the z-axis,Ā notĀ from the origināobviously!). So that gives you the A insideĀ of a solenoid. The magnitude isĀ A = (1/2)Ā·nĀ·IĀ·r’/Īµ0c2, so A is proportional with r’.
2. Outside of the solenoid, A‘s magnitude (i.e. A) is inverselyĀ proportional to the distance r’, and it’s given by the formula: A = (1/2)Ā·nĀ·IĀ·a2/Īµ0c2Ā·r’. That’s, of course, consistent with the magnetic field diminishing with distance there. But remember: contrary to what you’ve been taught or what you often read, it isĀ notĀ zero. It’s onlyĀ nearĀ zero if r’ >> a.

Alright. Done. Next post. So that’s on the magnetic dipole moment š