first law of thermodynamics, thermodynamic relation stating that, within an isolated system, the total energy of the system is constant, even if energy has been converted from one form to another. This law is another way of stating the law of conservation of energy. It is one of four relations underlying thermodynamics, the branch of physics concerning heat, work, temperature, and energy.
The first law of thermodynamics is put into action by considering the flow of energy across the boundary separating a system from its surroundings. Consider the classic example of a gas enclosed in a cylinder with a movable piston. The walls of the cylinder act as the boundary separating the gas inside from the world outside, and the movable piston provides a mechanism for the gas to do work by expanding against the force holding the piston (assumed frictionless) in place. If the gas does work W as it expands, and/or absorbs heat Q from its surroundings through the walls of the cylinder, then this corresponds to a net flow of energy W − Q across the boundary to the surroundings. In order to conserve the total energy U, there must be a counterbalancing change ΔU = Q − W in the internal energy of the gas. The first law provides a kind of strict energy accounting system in which the change in the energy account (ΔU) equals the difference between deposits (Q) and withdrawals (W).
There is an important distinction between the quantity ΔU and the related energy quantities Q and W. Since the internal energy U is characterized entirely by the quantities (or parameters) that uniquely determine the state of the system at equilibrium, it is said to be a state function such that any change in energy is determined entirely by the initial (i) and final (f) states of the system: ΔU = Uf − Ui. However, Q and W are not state functions. Just as in the example of a bursting balloon, the gas inside may do no work at all in reaching its final expanded state, or it could do maximum work by expanding inside a cylinder with a movable piston to reach the same final state. All that is required is that the change in energy (ΔU) remain the same. By analogy, the same change in one’s bank account could be achieved by many different combinations of deposits and withdrawals. Thus, Q and W are not state functions, because their values depend on the particular process (or path) connecting the same initial and final states. Just as it is more meaningful to speak of the balance in one’s bank account than its deposit or withdrawal content, it is only meaningful to speak of the internal energy of a system and not its heat or work content.
From a formal mathematical point of view, the incremental change dU in the internal energy is an exact differential, while the corresponding incremental changes d′Q and d′W in heat and work are not, because the definite integrals of these quantities are path dependent. These concepts can be used to great advantage in a precise mathematical formulation of thermodynamics.