The sum of all energy present in the system, including kinetic and potential energy; equivalently, the energy needed to create a system, excluding the energy necessary to displace its surroundings.
James Joule showed that both heat and work can produce the same change in the internal energy of a substance, establishing the principle of the mechanical equivalence of heat. Heat is emphatically a quantity that solely describes energy being transferred. It makes no sense to speak of the total 'heat' an object or system contains. However, a system does contain a quantifiable amount of energy called the internal energy of a system. The internal energy of a system is the quantity that changes with the addition or subtraction of work or heat. It is closely related to temperature.
The internal energy is the energy required to create a system, excluding the energy necessary to displace its surroundings. Internal energy has two components: kinetic energy and potential energy. The kinetic energy consists of all the energy involving the motions of the particles constituting the system, including translation, vibration, and rotation. The potential energy is associated with the static constituents of matter, static electric energy of atoms within molecules or crystals, and the energy from chemical bonds. The equation describing the total internal energy of a system is then:
We can also think of the internal energy as the sum of all the energy states of each component in the system:
At any finite temperature, kinetic and potential energies are constantly converted into each other, but the total energy remains constant in an isolated system. The kinetic energy portion of internal energy gives rise to the temperature of the system. We can use statistical mechanics to relate the (somewhat) random motions of particles in a system to the mean kinetic energy of the ensemble of particles, and thus the empirically measurable quantity expressed as temperature.
We can see that internal energy is an extensive property: it depends on the size of the system or on the amount of substance it contains.
In most cases, we are not concerned with the total amount of internal energy in the system, as it is rarely convenient or necessary to consider all energies belonging to the system. Rather, we are far more interested in the change in internal energy, given some transfer of work or heat. This can be expressed as:
Q is heat added to a system and Wmech is the mechanical work performed by the surroundings due to pressure or volume changes in the system. All other perturbations and energies added by other processes, such as an electric current introduced into an electronic circuit, is summarized as the term Wextra.
We can calculate a small change in internal energy of the system by considering the infinitesimal amount of heat δQ added to the system minus the infinitesimal amount of work δW done by the system:
$dU=\delta Q-\delta W$.
This expression is the first law of thermodynamics.