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=τext dθ=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=−m⃗⋅B⃗\boxed{U = -\vec{m} \cdot \vec{B}}

Equilibria

Orientationθ\thetaUUType
m⃗∥B⃗\vec{m} \parallel \vec{B}0°0°−mB-mB (minimum)Stable
m⃗⊥B⃗\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⁡θ1−cos⁡θ2)W = U(\theta_2) - U(\theta_1) = mB(\cos\theta_1 - \cos\theta_2)