# Expression for the work done on a magnetic dipole

In a thermodynamics lecture, I'm required to write down expressions for the work done on a magnetic dipole by a magnetic field.

My lecturer explicitly told me that it is $Bdm$ rather $mdB$, where $B$ is the magnetic field and $m$ is the magnetic dipole moment.

May I ask what is the logic behind this?

• Can you provide some more context on this? From an EM perspective, neither of these expressions properly yield the work done on a magnetic dipole in a magnetic field (given by $\int \tau d\theta$, where $\tau$ is the torque on the dipole given by $\vec{\mu} \times \vec{B}$, where $\vec{\mu}$ is the dipole moment. – Billy Kalfus Dec 11 '17 at 9:54

The potential energy of a dipole $\textbf{m}$ in a field $\textbf{B}$ is $U=-\textbf{m} \cdot \textbf{B}$, therefore the work required to change is $\delta W = -dU= d(\textbf{m} \cdot \textbf{B})=\textbf{B} \cdot d\textbf{m} + \textbf{m} \cdot d\textbf{B}$.
For your question, whether the work done is $\textbf{B} \cdot d\textbf{m}$ or $\textbf{m} \cdot d\textbf{B}$ depends on what is changing in your context, specifically $\textbf{m}$ or $\textbf{B}$ while the other variable is kept constant. Of course, if both are changing simultaneously, then the answer to your question is that neither is right for then their sum is the work done.