The first law of thermodynamics is a formulation of the law of conservation of energy in the context of thermodynamic processes. For a thermodynamic process affecting a thermodynamic system without transfer of matter, the law distinguishes two principal forms of energy transfer, heat and thermodynamic work. The law also defines the internal energy of a system, an extensive property for taking account of the balance of heat transfer, thermodynamic work, and matter transfer, into and out of the system. Energy cannot be created or destroyed, but it can be transformed from one form to another. In an externally isolated system, with internal changes, the sum of all forms of energy is constant.