The first law of thermodynamics is a version of the law of conservation of energy that is adapted for thermodynamic systems. The internal energy of an isolated system is constant and energy can be transformed from one form to another but cannot be created or destroyed. The first law is often formulated by stating that the change in the internal energy of a closed system is equal to the amount of heat supplied to the system, minus the amount of work done by the system on its surroundings.
The first law of thermodynamics states
ΔU = Q – W
Where ΔU is the change in internal energy, Q is the heat added to the system and W is the work done by the system.