# Can magnetic force do work? [duplicate]

I have been told numerous times that magnetic force do no work at all but I have some trouble digesting this fact. Now suppose we have two straight wire with some current, they certainly can feel force which may be repulsive or attractive depending upon current direction, can magnetic force do work? We also have magnetic potential energy defined to $U = -\vec{\mu} \cdot \vec{B}$ which suggests magnetic field can store energy and hence do some kind of work.

Magnetic forces do no work on moving charges. If a charge $q$ moves with a velocity $\vec{v}$ in a magnetic field $\vec{B}$ then it experiences a force $\vec{F} = q\vec{v}\times\vec{B}$. Since the work done is $dW = \vec{F}\cdot d\vec{x}$ and since $d\vec{x} = \vec{v}dt$, we have $dW = q(\vec{v} \times \vec{B})\cdot\vec{v}dt$, which is always zero.

However, magnetic forces do work on magnetic dipoles, with the energy of interaction mentioned in your question.

Obviously magnetic force can do work.The phenomenon is used in magnetic motors etc. You can search this on google. I am explaining here little bit of it. In motors we have a coil surrounded by magnets(magnetic field). Now the current id being passed by the coil.When the magnetic field of coil interact with the magnetic field of electromagnets the coil will rotate and do work.