First law of Thermodynamics states that " Amount of heat changed in system is equal to sum of change in internal energy and workdone of a system". First law if Thermodynamics is also known as principle of conservation of energy.
When a certain quantity of heat is supplied to a system, a part of heat may be used in doing external work on expansion and the rest of heat is used in increasing the internal energy of the system.
Let the quantity of heat supplied to a system be dQ, the amount of external work done be dW, and the increase in internal energy of the molecules be dU. Then, from first law of Thermodynamics
If heat is given to the system, dQ is taken as positive and if heat is lost by the system, dQ is taken as negative. If work is done by the system, dW is positive and if work is done on the system, dW is negative.
Suppose our system is a gas contained in a cylinder fitted with movable piston. If the gas is heated at the constant volume, dV =0, then from first law of Thermodynamics
Therefore, all heat supplied to the system goes into increasing the internal energy of the gas and hence the temperature.
For cyclic process, the change in internal energy of the system is zero because the system is brought back to the initial condition. Therefore, dU=0 and from the first law of Thermodynamics,