Potential Energy of a Magnetic Dipole in the Uniform Magnetic Field #8211; When we rotate the dipole with the help of external torque, we have to do some external work. The work done in rotating the dipole is stored as potential energy (U) of the dipole. i.e. U = -mB cosθ = -m times; B