When an electric charge Q moves against a. p.d. V, the amount of work done is given by
w = Q x V ............(1)
we know, current, I = Q/t
Q = I x t ........(2)
By Ohm's law, V/I = R
V = I x R ............(3)
Putting eqs.(2) and (3) in eq, (1),
W = I x t x I x R
W = I2Rt
Assuming that all the electrical work done is converted into heat energy, we get
Heat produced, H = I2Rt Joules
This relation is knows as Joule's law of heating.