Thermodynamics is a branch of physics concerned with heat and temperature and their relation to energy and work. It defines macroscopic variables, such as internal energy, entropy, and pressure, that partly describe a body of matter or radiation. It states that the behavior of those variables is subject to general constraints, that are common to all materials, beyond the peculiar properties of particular materials. These general constraints are expressed in the four laws of thermodynamics. Thermodynamics describes the bulk behavior of the body, not the microscopic behaviors of the very large numbers of its microscopic constituents, such as molecules. The basic results of thermodynamics rely on the existence of idealized states of thermodynamic equilibrium. Its laws are explained by statistical mechanics, in terms of the microscopic constituents.
Historically, the distinction between heat and temperature was studied in the 1750s by Joseph Black. Characteristically thermodynamic thinking began in the work of Carnot (1824) who believed that the efficiency of heat engines was the key that could help France win the Napoleonic Wars. The Irish-born British physicist Lord Kelvin was the first to formulate a concise definition of thermodynamics in 1854.