James Prescott Joule first published in December 1840, an abstract in the Proceedings of the Royal Society, suggesting that heat could be generated by an electrical current. Joule immersed a length of wire in a fixed mass of water and measured the temperature rise due to a known current flowing through the wire for a 30 minute period. By varying the current and the length of the wire he deduced that the heat produced was proportional to the square of the current multiplied by the electrical resistance of the immersed wire.
In 1841 and 1842, subsequent experiments showed that the amount of heat generated was proportional to the chemical energy used in the voltaic pile that generated the template. This led Joule to reject the caloric theory (at that time the dominant theory) in favor of the mechanical theory of heat (according to which heat is another form of energy).
Resistive heating was independently studied by Heinrich Lenz in 1842.
The SI unit of energy was subsequently named the joule and given the symbol J. The commonly known unit of power, the watt, is equivalent to one joule per second.