Figure 1  Square Dipole:

For a related topic, see Permanent Magnet Motors.On
this page we give a simple derivation of the force and torque on a
small magnetic dipole which is in a nonuniform magnetic field.
On this page, we will take a dipole of magnitude μ=
IA to be a loop of current of magnitude
I, with area of the loop equal to
A.
The dipole moment, μ, is a vector which points perpendicular to
the plane of the loop, and which points "up" when the dipole is
oriented so that the current runs counterclockwise, looking down on the
loop.
For simplicity in the derivation, we're going to cheat and use a
square loop (
figure 1).
This will save us a lot of niggling little sines and cosines in
the integrals, and in fact will let us entirely avoid explicitly
taking integrals. We'll just assume without proof that our
result is the same as what we would get with a circular loop.
Throughout most of this page we'll also assume that the loop lies in the
xy plane, with the sides of the square lying parallel to the
x and
y axes. The dipole vector points along the
z
axis. The magnetic ("B") field, on the other hand, has arbitrary
orientation. (We can rotate the axes so that the position of the
dipole is easy to describe, or so the B field lies along one axis ...
but we can't do both at once.) The angle between the direction of
the magnetic field and the dipole vector, which we're assuming lies on
the
z axis, is θ.
Torque on the Loop
 Figure 2  Torque on a dipole:

With a circular loop, the
z component of the torque, τ
_{z}, would be identically zero. With our square loop the
z
component is zero to second order in the gradient of the B field, and
vanishes as the loop size shrinks; we will assume that it actually is
exactly zero with no further comment.
The
x and
y components of the torque, on the other hand, depend directly on the magnitudes of the
y and
x components of the B field. In
figure 2, we've shown the forces on the left and right sides of the loop as they would point if the
y component of the B field were positive. Noting that the
x axis points out of the page, we see that forces in the directions of the arrows would produce a negative torque along the
x axis. The
x component of the torque must then be
(1)
Recalling that the current,
I, runs counterclockwise, we can insert the expressions for the forces on the loop, obtaining
(2)
or, replacing
with
A,
(
3)
Similar reasoning leads to the
y component of the torque, which we find to be
(
4)
Since τ
_{z} is zero, the magnitude of the torque is therefore
(5)
Recalling that the angle between
B and the dipole vector is θ, we can see that this is
(6)
So the magnitude of the torque matches the magnitude of the cross product of the dipole and the
B field. The torque lies in the
xy plane and so must be perpendicular to the dipole vector. From (
3) and (
4) we can compute the dot product of the torque with the
B field; that's zero, so the torque is also perpendicular to the
B field. So, the torque is +/ the cross product of μ and
B. Some fiddling with the right hand rule while looking at
figure 2 to determine the sign on the torque vector convinces us that the torque must be
(7)

This expression is independent of rotations of the coordinates.
Force on the Loop
The net force on the loop is zero if the
B field is uniform, as we can see by looking at
figure 2: the current on opposite sides of the square is going in opposite directions, so the forces on each side due to the
B field are also opposite, and they cancel pairwise. There is, however, a net force which is first order in the
gradient of
B.
Z component of the force
If the gradient of
B in the
y
direction is nonzero, then the forces shown in figure 2 will not
cancel; rather, we can see that, to first order in the gradient of
B,
(
8)
Similarly, the net force on the two sides of the loop which are parallel to the
y axis will be
(
9)
and, replacing
IA with μ and summing (
8) and (
9), we see that the net force in the
z direction is
(
10)
Since we know that
, we must have
(11)
so we can rewrite (
10) as
(
12)
X and Y components of the force
 Figure 3  Y component of force:

In a uniform field the two segments of the loop parallel to the
x axis feel equal and opposite forces (
figure 3). But if the field is nonuniform, then we can see that, to first order in the gradient, the
y component of the net force will be
(
13)
Similarly, just by rotating the diagram we can see that
(
14)
Putting together (
12), (
13), and (
14) we see that the total force must be
(15)
or, since θ is the angle between the
B field and the dipole vector, which we've assumed is aligned with the
z axis, we have
(
16)
Since the magnitude of the
dipole
is not a function of position, we can move μ under the gradient sign;
we then recognize the formula for dot product, and rewrite (
16) as:
(17)

Is the Force Conservative?
In
the case of an actual current loop, asking whether the force on the
dipole is "conservative" is somewhat meaningless. In that case, the
B field's action on the current in the loop is via the Lorentz force law for charged particles,
, and, since the force due to the
B
field on each charge is always perpendicular to the charge's line of
motion, all the energy gained by the loop must actually be provided by
the current in the loop. However, in the case of a
permanent
dipole, such as that of an electron, or a permanent magnet which gains
its field from large numbers of electrons with aligned spins, there is
no apparent "internal" source of energy when the dipole is accelerated
by the magnetic field. We could also say that, for permanent
dipoles, nothing is "consumed" as the dipole moves through the field.
In such a case, it makes sense to ask if the action of the
magnetic field on the dipole is "conservative".
A conservative
force can be described in terms of a potential function. If we
can find a potential function for the force (
and torque) on a dipole, then we'll have shown that it's conservative. And we can.
First,
we need to choose coordinates to describe the position of a dipole in a
magnetic field. For the location in space, we'll use ordinary
Cartesian spacial coordinates, (
x,y,z). For the orientation of the dipole, we'll use angle between the dipole and the
B field,
θ, along with the azimuth of the dipole around the
B field's direction, which we'll call
σ. In all, then, we have five dimensions: (
x,y,z,θ,σ). Note that these coordinates are not the same as those used earlier in this page; neither the
B field nor the dipole is assumed to be aligned with the
z axis. Furthermore, the angle
θ=0 is not connected with the direction of any of the Cartesian coordinates  it's pinned to the
B field.
We already know the forces acting on the dipole in these coordinates; they're given by equations (
7) and (
17). Since there's no force acting in the
σ direction,
σ
is a "cyclic" coordinate and won't enter into the potential energy in
any meaningful way; we'll ignore it on the rest of this page.
We'll guess the potential, then prove that the guess is correct. From (
17), a good candidate seems to be:
(18)

The negative of its gradient is certainly (
17), the force on the dipole. However, we also need to confirm that the negative of its partial derivative with respect to
θ is given by (
7), the torque on the dipole. The potential can also be written as:
(19)
And the negative of its partial is then:
(
20)
That's certainly the correct magnitude. Is the direction correct? Certainly, looking at (
7), the torque must lie along the line which is perpendicular to both μ and
B, as this necessarily does. But what of the sign? If the angle between the dipole and
B is small, we can see from (
7) that the torque will twist the dipole toward
B, which is the direction of decreasing θ. Looking at (
20),
we can see that for small θ, the direction of the "twist" will also be
toward decreasing θ. So, the signs agree, and we conclude that
the potential function correctly describes the torque as well as the
force on the dipole.
Finally, we should say a few words about
the coordinates. Deriving the potential was trivial in the
coordinates I've given, but the kinetic energy of a physical dipole in
these coordinates would be pretty messy: linear motion through space
with fixed (θ,σ) coordinates would actually involve rotations of the
dipole. In consequence, the Lagrangian for the dipole in these
coordinates would be awkward. To solve a real problem one would
more typically use Cartesian coordinates for the position along with
polar coordinates which were referenced to the Cartesian
z axis for the dipole orientation. Since (
18) is independent of the coordinates, such a change in coordinates would not affect the potential function.
Page
created on 12/20/06