The potential magnetic energy of a magnet or magnetic moment m in a magnetic field B is defined as the mechanical work of the magnetic force on the re-alignment of the vector of the magnetic dipole moment and is equal to: E p,m = − − m ⋅ ⋅ B while the energy stored in an inductor (of inductance L ) when a current I flows through it is given by: E p,m = 1 2 L I 2 . This second expression forms the basis for superconducting magnetic energy storage.