The Carnot cycle consists of four reversible processes involving a working substance: (1) an isothermal expansion during which heat is absorbed from a hot reservoir, (2) an adiabatic expansion during which the temperature decreases, (3) an isothermal compression during which heat is rejected to a cold reservoir, and (4) an adiabatic compression during which the temperature increases, returning the system to the initial state. Nicolas Léonard Sadi Carnot published the first generalized theory of heat engines in 1824 based on this ideal Carnot cycle. The Carnot cycle establishes the maximum possible efficiency for a heat engine operating between two temperature reservoirs.