# How electrical energy is converted into mechanical energy

When a current $I$ runs through a wire all the electrical energy is used up as given by the relation, $H=I^2Rt$, but when we move the current through a magnetic field we get torque.

So if all electrical energy is used up in heat how mechanical work is done ?

If the wire is moving through a magnetic field than some of the energy will be turned to heat and another part of the energy will do mechanical work. The back-emf produced by the magnetic effect will reduce the current in the wire so that less energy goes into heating than in the non-moving case.

The supply voltage $\mathcal E_{\rm supply}$ is opposed by the back emf $\mathcal E_{\rm back}$ and the difference drives a current $I$ through a resitor $R$.

$\mathcal E_{\rm supply} -\mathcal E_{\rm back} =IR$

Multiply both sides by the current $I$ and rearrange.

$\mathcal E_{\rm supply} I = \mathcal E_{\rm back} I +I^2R$

Now one can interpret each of the terms in terms of power in terms of power as follows

$\text{power input supply} = \text {mechanical power output} + \text {power dissipated as heat}$

This answer explains the workings of a dc electric motor which is nothing more than a current carrying wire in the form of a loop finding itself in a magnetic field.

You can have a condition where the back emf is larger that the supply voltage and you then have a dynamo where the mechanical power input converted into electrical power output (and heat).