(Previous post: Part 1: Magnetic field)

I will talk about the origin of the magnetic dipole construct here. Consider a loop of wire…

You may have noticed that I posted an entry entitled “NMR and Spin flipping (part 2)” which has since disappeared. It turns out that wordpress doesn’t synch so well between its mobile app and its main page: I had an incomplete version of the NMR post on a mobile phone which I accidentally pushed to publish and over-wrote the completed post that I had finished several days before. Thank you wordpress for not synching properly! The incomplete version had none of the intended content. As I don’t feel like reconstructing a 5,000 word post right now, I thought I would scale back a bit and bite off a tiny chunk of the big subject of how magnets work. In part, I figure I can use some of what is derived here in the next version of the NMR post, which I intend to rewrite.

So, this will be the continuation of my series about magnets.

Reading through the initial magnets post, you will see that I did a rather spectacular amount of math, some of it unquestionably uncalled for. But, hey, the basic point of a blog is excess. One of the windfalls of all that math can yield an important theoretic construct which turns out to be one of the most major contributors of the explanation of how magnets work.

What this has to do with a loop of wire, I’ll come back to…

When an exact answer is not available to a physics question, one of the go-to strategies used by physicists is series approximation. Often, the low orders of a series tend to contribute to solutions more strongly than the high orders, meaning that the first couple terms in an expansion can be good approximations. One such expansion is used in magnetism.

Recall the relation between the magnetic field and the magnetic vector potential:

BS to amp 2

This expression is useful because the crazy vector junk is moved outside the integral. The magnetic potential is easier to work with than the magnetic field as a result. The expansion of interest is usually directed at the vector potential and is called the “multipole expansion.” There are many ways to run the multipole expansion, but maybe the easiest (for me) is to come back to our old friends the spherical harmonics Ylm.


1 multipole expansion

In the vector potential of the magnetic field, that r-r’ factor in the denominator is really hard to work with. By itself, it is usually too complicated to integrate over. The multipole expansion lets us replace it with something that can be calculated. In this expansion, r is the location where we’re looking for the field while r’ is where the current which sources the field is located. The expansion is converting the difference in these (the propagator which pushes influence from the location of the current to the location of the field) into an infinite series of terms: in the sum, r< is whichever of the two distances is lesser, while r> is which of these two is greater. If you’re looking at a location inside the current distribution, r’ is bigger than r… but if you’re looking at a location outside of the current distribution, r is bigger than r’. The Ylms appear because space has a spherical polar geometry.

The substitution changes the form of the vector potential:

2 expanded vector potential


The vector potential is now a sum of an infinite number of terms inside the integral. You still can’t just compute that because this sequence converges to 1/r-r’, which you can’t calculate by itself anyway. What you can do is introduce a cut-off. This is literally where the multipole terms all come from: instead of calculating the entire series all at once, you only calculate one term (or one level of terms, as the case may be). If you take l=0, you get the monopole term, if you take l=1, you get the dipole term, and so on and so forth for higher orders of l.

Since I’m interested in magnetic dipoles right now, this is the crux: I’ve simply called the l=1 term “the dipole” by definition. Further, I care only about locations where I’m looking for the magnetic field well outside of the dipole, since I’m not going to look directly inside of the bar magnet to start with, so that r>r’. For the dipole, l=1 and I only care about m=-1,0 and 1 of the Ylms. This collapses the sum to just three terms.

3 dipole term of multipole

If you’ve spent any time messing around with either E&M or quantum, you may remember those three Ylms off the top of your head. They’re basically just sines and cosines (edit 8-25-18: fixed Ylm index to Y10).

4 ylms B

I will note, this whole expansion can be done in terms of Legendre polynomials too, but I remember the Ylms better. For some expedience, I will focus on the Ylm part of the integral in order to help bring it into a more manageable form before moving on.

5 compressing ylmsThere’s a lot of trig in here, but the final form is actually very much more manageable than where I started. I’ve highlighted the pattern in red and green. If you squint really really hard at this, you’ll realize that it’s a dot product of the cartesian form of the hatted unit vector r. So, it’s just a dot product of cartesian unit vectors…

6 simplification of spherical polar terms

This dials down to just a dot product of two unit vectors pointing in the directions toward either where the current is located or where the field is. I’ve installed it in the vector potential in the last line. I note explicitly that both of these are functions of the spherical polar angles since this will be important when I start working integrals.

If all things were equal, I could start doing calculus right now. Unfortunately, I don’t know the form of the current vector. That could be any distribution of currents imaginable and not all of them have pure dipole contributions. Working the problem as is, the set-up will respond to the dipole moment of whatever J-current I choose to install. You could imagine a case with a non-zero current where this particular integral goes to zero –if I did a line of current going in some constant direction, that would probably kill this integral. But, I do know of one current distribution in particular that has a very high dipole contribution… you might recognize this as post hoc reasoning, but I’m doing this to try to focus our attention on how one particular term in the multipole expansion behaves. The current distribution which is most interesting here is a loop of wire with a electric current circling it.

7 dipole current

I’ve sketched out the current vector here as well as a set of axes showing the relationship between the spherical polar and cartesian coordinates where the unit vectors are all labeled. This vector current is just a current ‘I’ constrained to the X-Y plane, maintaining a loop around the origin at a radius of R. The current runs in a direction phi, which is tangential to the loop in a counterclockwise sense, and presumably has a positive current definition. The delta functions do the constraining to the X-Y plane. The factor of sine and radius in the denominator is a correction for use of the delta function in a spherical polar measure. The factor 2 is included to avoid a double-counting problem with a loop which shows up more explicitly, for example, in Jackson E&M, where the definition of the magnetic dipole moment is directly written with respect to the current vector. You’ll be happy to know that pretty much none of my work here actually follows Jackson, though the set-up is based strongly on the methods used in Jackson (I hated how Jackson set up his delta functions because I found them opaque as hell! But, that’s Jackson for you…)

The measure of integration is the typical spherical polar measure. You may remember my defining this in my post on the radial solution of the hydrogen atom. I’ll just quote it here. If you’ve done any vector calculus, it should be familiar anyway.

8 integration measure

I can then put these all together in the vector potential, collect the terms and begin solving it.

9 beginning integration

In the third line, I pulled everything out front that I don’t need inside the integral. The radial portion of the integral collapses on the delta function. The angular portion is somewhat harder because it involves a couple unit vectors that vary with the angles; one of the unit vectors, the unprimed r, could actually be pulled outside the integral, but I left it in to help display a useful construct that will help me simplify the integral again. I will again focus on the vector portion inside this integral:

10 unit vector adjustment

This use of the BAC-CAB rule allows me to change the unit vectors around into a cross product and flip the direction slightly. In the next step, by converting the theta unit vector into a cartesian form, the integral becomes trivial.

11 solving integral

This solves the integral. Use of the delta function guts the theta coordinate and no remaining dependence exists for phi. After the hatted unit vectors are decoupled from the integration coordinates, the cross product gets pulled out front in an uncomplicated form. You can then collect and cancel in what remains:

12 vector potential of magnetic dipole moment

Here, I’ve collected a particular quantity dependent on electric current running around in a loop which I have called a “magnetic dipole moment.” I conspired pretty strongly to get all the variable terms to pop out in a form that people will find familiar. A magnetic dipole is simply a loop, which can be of arbitrary shape, it turns out. This current loop is always right-hand defined, as above, to be “current x area” pointed in a direction normal to the area. This object could simply be a wire loop. At this point, you should be having images of stereotypical electromagnets which are many wire loops wrapped around some solid core. This electrical current configuration is very special because of the magnetic field that it tends to produce.

As an aside, I’ve seen dipole moment derived in a much more simplistic fashion than presented here, but my purpose was to be a bit more complete without actually duplicating Jackson… which I’ve mostly avoided, believe it or not… and to produce the form which can generate the whole dipole magnetic field, which can’t be done in the E&M 102 variety derivation. The simple derivation tends to operate on the axis of the magnetic dipole only, and does not calculate the shape of the field elsewhere in space. To get the whole field, you need to be a bit more sophisticated.

Magnetic field is produced by taking the curl of the vector potential, as I wrote far above. The fastest way I’ve found to take this curl is using the spherical polar definition of the curl, found here. You can derive this form of the curl in a manner very similar to what I did in my hydrogen atom radial equation post, but I’m going to hold off deriving it here: I’m somewhat short on time and I had hoped that this post wouldn’t get too very long.

13 setting up curl

My starting point here is to figure out how much of the curl I actually need. If you massage the terms inside the vector potential, you rapidly discover that only one of the three vector components is present, thus simplifying the curl. And, of course, to get to the magnetic field from here, I just need to take a curl…

14 getting magnetic field

The last thing I end up with here is an accepted form for the dipolar magnetic field:

15 magnetic dipole field

This is an exact solution for the magnetic field from a current dipole. This particular solution is dependent on the assumption that the location where you’re examining the field is large compared to the size of the loop; for real physical dipoles of appreciable size, there can be other non-zero terms in the multipole expansion, meaning that the field will be predominantly what’s written here with some small deviations.

Admittedly, this mathematical equation doesn’t have a very intuitive form. Why in the world do I care about deriving this particular equation? To understand, we need some choice pictures…

edit 10-25-17: It seemed kind of ridiculous that I worked through all that math to find the dipole field and then stole other people’s diagrams of it. For completeness, here’s a vector plot of mine in Mathematica of the field equation written above:

magnetic dipole.jpg

Another magnetic dipole picture with the location of the dipole explicitly drawn in:


This image, where the dipole is rotated by 90 degrees from how I plotted it, is taken from wikipedia.

My interest in this field becomes more obvious when compared side-by-side with the magnetic field produced by a bar magnet…

This image is taken from how-things-work-science-projects.com. The field produced by a bar magnet is very similar in shape to the field produced by the loop of wire. Going further out, here is a diagram of the magnetic field produced by the Earth:


Notice some similarity? You’ll notice the Earth’s field lines are assigned to point oppositely from my diagram above, but that has to do with how compass needles orient rather than from any actual fundamental difference in the field!

Physical ferromagnets tend frequently to have dipolar magnetic fields. As such, the quantity of the magnetic dipole moment has huge physical importance. Granted, the field of the Earth isn’t perfectly dipolar, but it has an overwhelming dipole contribution. Other planets also have fields that are dipolar in shape.

Understanding how magnets work, compass needles, bar magnets and most sorts of permanent magnets, requires dipolar behavior as the underlying structure. Even the NMR post that got ruined was about a quantum mechanical phenomenon which revolves around magnetic dipoles.

This is a large step forward. I haven’t explained much, but I will write another post later showing why it is that magnets, particularly dipoles, respond to magnetic fields, as well as what the source of magnetism is in ferromagnets (no off-switch on the current for God’s sake!) Stay tuned for part 3!

edit 11-5-17

Playing around with matplotlib, I constructed a streamplot of the magnetic field produced by three dipoles, all flattened into the same plane and oriented facing different directions in that plane. This is all just superpositions using the field determined above. Kind of pretty…


Completing the series: Part 3: Magnetic Force, Part 4: Quantum Mechanical Spin, Part 5: Orienting Magnetization.

Published by foolish physicist

Low level academic enthralled with learning how things work.

Join the Conversation


Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: