text: The first law of thermodynamics states: In a process without transfer of matter, the change in internal energy, , of a thermodynamic system is equal to the energy gained as heat, , less the thermodynamic work, , done by the system on its surroundings.
  where  denotes the change in the internal energy of a closed system (for which heat or work through the system boundary are possible, but matter transfer is not possible),  denotes the quantity of energy supplied to the system as heat, and  denotes the amount of thermodynamic work done by the system on its surroundings. An equivalent statement is that perpetual motion machines of the first kind are impossible; work  done by a system on its surrounding requires that the system's internal energy  decrease or be consumed, so that the amount of internal energy lost by that work must be resupplied as heat  by an external energy source or as work by an external machine acting on the system (so that  is recovered) to make the system work continuously.
  For processes that include transfer of matter, a further statement is needed: With due account of the respective fiducial reference states of the systems, when two systems, which may be of different chemical compositions, initially separated only by an impermeable wall, and otherwise isolated, are combined into a new system by the thermodynamic operation of removal of the wall, then
  where  denotes the internal energy of the combined system, and  and  denote the internal energies of the respective separated systems.
  Adapted for thermodynamics, this law is an expression of the principle of conservation of energy, which states that energy can be transformed (changed from one form to another), but cannot be created or destroyed.
  Internal energy is a principal property of the thermodynamic state, while heat and work are modes of energy transfer by which a process may change this state. A change of internal energy of a system may be achieved by any combination of heat added or removed and work performed on or by the system. As a function of state, the internal energy does not depend on the manner, or on the path through intermediate steps, by which the system arrived at its state.