# Derivation Magnetic Dipole - Torque, Energy and Force

Level 3 (with higher mathematics)
Level 3 requires the basics of vector calculus, differential and integral calculus. Suitable for undergraduates and high school students.
Updated by Alexander Fufaev on

Consider a rectangular conducting loop with side lengths $$a$$ and $$b$$. Let the loop be rotatable around the axis parallel to the side $$a$$. Let us call this axis $$\text{C}$$. Let the loop be non-rotatable around the axis parallel to $$b$$. In addition, the loop is traversed by an electric current $$\class{red}{I}$$.

Let $$\boldsymbol{A}$$ be the orthogonal surface vector representing the area $$A$$ enclosed by the loop and orientation of this surface area (it is orthogonal to the surface area). With the right hand rule and the given current direction, the direction of $$\boldsymbol{A}$$ is uniquely determined. The magnetic dipole moment is thus given by definition by the following formula:

Formula anchor

If the loop is now placed in a homogeneous external magnetic field $$\class{violet}{\boldsymbol{B}}$$, then the loop will rotate until $$\boldsymbol{A}$$ and $$\class{violet}{\boldsymbol{B}}$$ point in the same direction. During the rotation around the axis $$\text{C}$$ the loop has a torque $$\boldsymbol{M}$$ along $$\text{C}$$. A formula for the torque is derived below.

## Torque

The torque $$\boldsymbol{M}$$ about an axis of rotation $$\text{C}$$ is defined as the cross product of the distance $$\boldsymbol{r}$$ of the conductor piece from the axis of rotation and the force $$\boldsymbol{F}$$ acting on the conductor piece:

Definition of the torque
Formula anchor

The first parallel piece of conductor of length $$a$$, which is in a homogeneous magnetic field $$\class{violet}{\boldsymbol{B}}$$, experiences the Lorentz force (magnetic force) acts:

Lorentz force on a conductor
Formula anchor

Here the vector $$\boldsymbol{a}$$ runs along the piece of conductor. Analogously, the force can also be written with the current vector: $$a \, \boldsymbol{I} ~\times~ \class{violet}{ \boldsymbol{B} }$$. Then the current is a vector indicating the direction of the current along the conductor and $$a$$ is a scalar.

A magnetic force also acts on the second conductor piece, in which the current points in the opposite direction. However, this force points in the opposite direction:

Lorentz force on the second conductor is opposite
Formula anchor

The vector $$\boldsymbol{r}$$ in Eq. 2 is the distance of the conductor piece of length $$a$$ from the axis $$\text{C}$$. That is $$\boldsymbol{r}$$ is parallel to $$\boldsymbol{b}$$. This distance is for the first conductor piece: $$\boldsymbol{r}_1 = \frac{\boldsymbol{b}}{2}$$. The opposite second conductor piece, on the other hand, is at the same distance but in the opposite direction: $$\boldsymbol{r}_2 = -\frac{\boldsymbol{b}}{2}$$. Both parts with the corresponding forces 3 and 4 contribute to the torque $$\boldsymbol{M}$$. Thus, Eq. 2 becomes:

Total torque on the two conductors
Formula anchor

Now insert the Lorentz force 3 into Eq. 5:

Torque expressed with the Lorentz force
Formula anchor

The double cross product can be simplified. The cross product $$\boldsymbol{b} \times \boldsymbol{a}$$ is orthogonal to $$\boldsymbol{a}$$ and $$\boldsymbol{b}$$ and corresponds exactly to the surface orthogonal vector $$\boldsymbol{A}$$. Thus, Eq. 6 becomes:

Torque expressed with the enclosed area
Formula anchor

If the magnetic dipole moment 1 is inserted into Eq. 7, the relationship between the torque, magnetic dipole moment and external magnetic field is obtained:

Formula anchor

The magnitude of the torque 8 is thus:

Magnitude of the torque on a magnetic dipole
Formula anchor

Here $$\varphi$$ is the angle between the vectors $$\boldsymbol{\mu}$$ and $$\class{violet}{ \boldsymbol{B} }$$.

## Potential energy

With the help of the derived torque the potential energy $$W_{\mu}$$ of the magnetic dipole can be derived.

The work $$W$$ done by the external magnetic field to rotate the dipole is given by:

Work equals force times infinitesimal distance
Formula anchor

The magnitude $$M$$ of the torque from Eq. 2 is given by:

Magnitude of the torque
Formula anchor

The angle $$\alpha$$ between the position vector $$\boldsymbol{r}$$ and the force $$\boldsymbol{F}$$ is 90 degrees here, because the force can be split into a part $$\boldsymbol{r}$$ parallel to $$\boldsymbol{F}_{|}$$ and into a part $$\boldsymbol{r}$$ orthogonal to $$\boldsymbol{F}_{\perp}$$. The parallel part does not contribute to the work done. Therefore, Eq. 11 can also be written as follows:

Torque equals radius times orthogonal component of force
Formula anchor

With the help of Eq. 12 the force in integral 10 can be expressed with the torque $$M$$ ($$F:=F_{\perp}$$):

Work is equal to integral of torque per radius
Formula anchor

The $$\text{d}s$$ element is expressed in polar coordinates as $$\text{d}s = -r \,\text{d}\varphi$$ (minus sign because $$\text{d}s$$ points opposite to $$\text{d}\varphi$$). When substituting into Eq. 11, $$r$$ cancels out. In this way, the work done by the magnetic field is expressed with the help of the given torque:

Work is equal to integral of torque over angle
Formula anchor

Now put the torque magnitude 10 into Eq. 14. Integrate over the angle from $$\pi/2$$ to a variable angle $$\varphi$$. (The lower limit $$\pi/2$$ was chosen so that the zero point of the potential energy is set to zero):

Work equals magnetic moment times torque times cosine of angle
Formula anchor

The potential energy $$W_{\mu}$$ of the magnetic dipole corresponds to the negative work $$W$$ done by the external magnetic field: $$W_{\mu} = - W$$. Thus the potential energy of the magnetic dipole is given by:

Energy of the magnetic dipole using angle
Formula anchor

Or expressed compactly with the help of the scalar product:

Formula anchor

## Force

A conservative force $$\boldsymbol{F}$$ can be written as a gradient of the potential energy $$W_{\text{pot}}$$:

Force is gradient of potential energy
Formula anchor

Here, $$\nabla$$ is the nabla operator. Substituting the potential energy 17 of the magnetic dipole into Eq. 18 yields:

Force is Nabla operator applied to the scalar product of the dipole moment with the magnetic field
Formula anchor

The minus signs cancel out and we get the formula for the force:

Formula anchor

If $$\boldsymbol{\mu}$$ is position-independent, Eq. 20 can alternatively be written as follows:

Magnetic force equals matrix applied to dipole moment vector
Formula anchor

Eq. 21 is to be understood in such a way: A matrix $$\nabla \class{violet}{\boldsymbol{B}}$$ (in the three-dimensional case a 3x3 matrix) is applied to the vector $$\boldsymbol{\mu}$$. The result is again a vector, namely the force $$\boldsymbol{F}$$.

Validity of the derived equations: Even if the torque (and thus also energy and force) was derived with the help of a rectangular loop, the derived equations are valid for arbitrarily shaped loops, because the equations do not contain any geometrical quantities.