Academy
Formulas/physics/Moving Charges/Potential Energy of Magnetic Dipole in B

Potential Energy of Magnetic Dipole in B

Minimum energy (stable equilibrium) at θ = 0; maximum (unstable) at θ = π. Change in PE between orientations equals work done against the torque.
Class 12
Derivation

Derivation

Work done by external agent rotating the dipole from angle θ1\theta_1 to θ2\theta_2:

dW=τextdθ=mBsinθdθdW = \tau_{\text{ext}}\,d\theta = mB\sin\theta\,d\theta W=θ1θ2mBsinθdθ=mB[cosθ]θ1θ2W = \int_{\theta_1}^{\theta_2} mB\sin\theta\,d\theta = mB[-\cos\theta]_{\theta_1}^{\theta_2}

Taking the reference position as θ=90°\theta = 90° (zero PE):

U(θ)=mBcosθU(\theta) = -mB\cos\theta U=mB\boxed{U = -\vec{m} \cdot \vec{B}}

Equilibria

Orientationθ\thetaUUType
mB\vec{m} \parallel \vec{B}0°mB-mB (minimum)Stable
mB\vec{m} \perp \vec{B}90°90°00Reference
m\vec{m} antiparallel180°180°+mB+mB (maximum)Unstable

Work Done in Rotation

To rotate dipole from θ1\theta_1 to θ2\theta_2:

W=U(θ2)U(θ1)=mB(cosθ1cosθ2)W = U(\theta_2) - U(\theta_1) = mB(\cos\theta_1 - \cos\theta_2)