Temperature and Thermal Equilibrium
Temperature, Entropy, and Statistical Mechanics
What temperature measures
Temperature can be introduced experimentally by observing how energy moves between substances. If two substances are placed in contact and energy naturally flows from substance A to substance B, A is at a higher temperature. If there is no net energy flow, the substances are in thermal equilibrium and have the same temperature.
This gives a way to compare temperatures, but it does not yet explain what a thermometer’s numerical reading represents. Temperature is related to the energy of a substance’s particles, which can move, rotate, vibrate, and interact. However, temperature is not simply internal energy: different substances require different amounts of energy to undergo the same temperature change.
For example, raising the temperature of one gram of mercury by 10 degrees Celsius requires about 1.4 joules, whereas raising one gram of water by the same amount requires about 42 joules. Their different heat capacities mean that the same energy change does not produce the same temperature change. Relationships between energy and temperature can also change during melting, boiling, or other phase changes.
In ordinary circumstances, temperature often varies approximately linearly with a substance’s internal energy. Its relation to volume or pressure can also be useful experimentally. These empirical relationships describe how temperature behaves, but a deeper definition explains how temperature can be calculated from the microscopic state of a system.
Macrostates, microstates, and entropy
A system’s macrostate is described by large-scale properties, such as its shape, volume V, particle number N, and total internal energy U. A microstate specifies the detailed arrangement of the system’s particles, including quantities such as their positions and momenta.
Many different microstates can correspond to the same macrostate. The number of compatible microstates is called the multiplicity, denoted by Ω. Boltzmann’s definition of entropy is
where k is Boltzmann’s constant, which supplies the appropriate units. Entropy is commonly measured in joules per kelvin.
Why the count of microstates is finite
In a classical description, positions and momenta can take continuously many values, which would make a direct count of microstates infinite. Statistical mechanics instead counts discrete quantum states. The broad idea is to divide position, momentum, and energy into sufficiently small state-space cells.
Quantum mechanics provides the natural scale for this counting. The position and momentum uncertainties along one coordinate obey
where h is Planck’s constant. This uncertainty relation indicates the scale at which position and momentum states can be distinguished. In standard state counting, a cell in phase space has volume h for each position–momentum coordinate pair, giving a cell volume of h3N for N particles in three dimensions.
The uncertainty inequality by itself does not specify every detail of state counting; the quantum-mechanical description of the available states supplies that structure. Although the number of states is fundamentally discrete, the spacing between them is so tiny for macroscopic systems that entropy can usually be treated as a continuous function.
Temperature and entropy are statistical properties: they become useful descriptions when a system contains very many particles, not as ordinary macroscopic quantities for a single particle.
Temperature from entropy
At fixed volume and fixed particle number, temperature is defined by the rate at which entropy changes as internal energy changes:
Equivalently,
The subscript indicates that volume and particle number are held fixed while the derivative is taken. The partial derivative has units of inverse kelvin, so its reciprocal has units of temperature.
Why energy flows until temperatures match
Consider two systems, A and B, that can exchange energy but are otherwise isolated from their surroundings. Their combined energy is fixed:
If A has ΩA microstates and B has ΩB, the number of joint microstates is the product ΩAΩB. Because logarithms turn products into sums, the total entropy is
When the systems exchange energy, the most probable combined macrostate is the one with the largest multiplicity, and therefore the largest total entropy. The systems tend toward that macrostate because there are more microscopic arrangements corresponding to it.
A small increase in A’s energy must be accompanied by an equal decrease in B’s energy. Thus the change in total entropy with respect to energy transferred to A is
At maximum entropy, this derivative is zero. Therefore,
Since each derivative is 1/T, the condition becomes
This establishes the central experimental property of temperature: two systems in thermal equilibrium have equal temperatures.
A small model of energy sharing
Suppose two identical systems each contain two particles, and four indivisible units of energy are shared between them. If all four units are assigned to A, the combined arrangement has multiplicity 5. If A receives three units and B receives one, the multiplicity is 8. If the energy is divided evenly, the multiplicity is 9.
The equal-energy macrostate is therefore the most likely among these examples. It is not the only possible outcome, but it corresponds to the largest number of microstates. As the number of particles and energy units increases, the distribution becomes increasingly concentrated around its most probable arrangement. For a glass of water, the particle number is on the order of 1024, so the most probable macroscopic behavior is overwhelmingly likely.
Why temperature is proportional to energy in a simple model
A simplified model helps show why temperature can be proportional to energy even when the microstate count is only approximate.
For two particles with integer-valued energy, a fixed total energy U corresponds to U+1 possible assignments: the first particle can have any energy from 0 to U, with the second receiving the remainder.
For three particles, the possible states at fixed energy form a two-dimensional set whose size grows approximately as U2. For four particles, the count grows approximately as U3. More generally, for N particles, a rough scaling is
where f(N) is a factor that depends on particle number. For a macroscopic system, replacing N−1 with N is a negligible approximation, so one can write
Taking the logarithm gives
At fixed N, the factor f(N) does not depend on U and disappears when the energy derivative is taken:
Consequently,
This simple model therefore gives temperature proportional to energy per particle. Its numerical details are crude, but the broad result is sensible: increasing the energy per particle increases the temperature. More accurate microstate counting is needed to predict properties such as heat capacity precisely.
Microstate counting for an ideal gas
An ideal gas is a model of point-like particles with negligible interactions, apart from collisions. For a monatomic ideal gas, each particle’s energy is kinetic:
where m is the particle mass and px, py, and pz are its momentum components.
Position states
For a single particle in a volume V, the number of allowed position states is obtained by dividing the volume into quantum-scale cells. For N particles, the position-space contribution is proportional to VN.
Momentum states
For one particle with a fixed kinetic energy U, the allowed momentum values lie on a sphere of radius
in three-dimensional momentum space.
For N particles, the constraint applies to the total energy of all particles. The corresponding momentum-space boundary is a hypersphere in 3N dimensions, with radius 2mU. Counting its states requires the volume enclosed by this hypersphere, or equivalently a sufficiently thin energy shell. The energy shell can be treated as having a small but finite thickness: it is wide compared with the spacing between quantum states and narrow compared with macroscopic energy changes.
The volume of an n-dimensional ball of radius R is
where Γ is the gamma function, which extends the factorial to non-integer arguments. Applying this to the 3N-dimensional momentum space gives the momentum-space volume
Combining position and momentum states and dividing by the phase-space cell size gives a count proportional to
Indistinguishable particles
For identical particles, exchanging two particle labels does not produce a physically distinct microstate. The expression above counts each arrangement N! times, once for each possible particle ordering. The count must therefore be divided by N!.
A convenient cumulative count of states up to energy U is
Counting states in a thin energy shell instead leads to the same thermodynamic entropy for a macroscopic system, apart from negligible terms.
The Sackur–Tetrode equation
Using S=klnΩ with the ideal-gas multiplicity gives an expression containing factorials. For large n, Stirling’s approximation states
Applying this approximation to the factorial and gamma-function terms, and neglecting corrections small compared with terms proportional to N, yields the Sackur–Tetrode equation for a monatomic ideal gas:
The argument of the logarithm is dimensionless. This equation gives the entropy in terms of the gas’s volume, particle number, total energy, particle mass, and Planck’s constant.
The formula’s detailed constant terms depend on correctly counting position and momentum states, treating particles as indistinguishable, and using the quantum phase-space scale. Many temperature results require less precision because constants independent of energy disappear when entropy is differentiated. The full equation is nevertheless needed to predict absolute entropy values.
Temperature of a monatomic ideal gas
At fixed V and N, only the lnU term in the Sackur–Tetrode equation depends on energy. Differentiating gives
Using the statistical definition of temperature,
or, equivalently,
This is the internal energy of a classical monatomic ideal gas.
Heat capacity and degrees of freedom
Heat capacity describes how much energy is required to produce a temperature change under specified conditions. For a monatomic ideal gas at fixed volume,
Per particle, this is 23k. Per mole, using the ideal gas constant R, it is
This prediction agrees with the measured constant-volume molar heat capacity of helium under conditions where it behaves approximately as a classical monatomic ideal gas.
Equipartition theorem
The result is an example of the equipartition theorem. In a classical system at thermal equilibrium, each independent quadratic degree of freedom contributes an average energy of 21kT per particle.
A monatomic gas has three translational momentum components, so its average energy per particle is
A diatomic molecule can also store energy in rotation. In the usual temperature range where two rotational degrees of freedom are active and vibrational modes are not, it has five relevant quadratic degrees of freedom: three translational and two rotational. Its heat capacity at constant volume is then approximately
The number of active degrees of freedom can depend on temperature because quantum effects can make some modes inaccessible over particular temperature ranges.
Absolute entropy and experimental checks
Temperature measurements and energy measurements can reveal changes in entropy through the relation between T and U. However, integrating an entropy change determines entropy only up to an additive constant. Absolute entropy measurements require a reference state whose entropy is known.
The natural reference is approached at absolute zero. In the simplest description, a system with no energy available for motion is frozen into its lowest-energy state and has zero entropy. More precisely, the third law of thermodynamics assigns zero entropy to a perfect crystal in its unique ground state; some systems can have residual entropy if multiple ground states remain possible.
An ideal-gas formula cannot be used unchanged all the way to absolute zero because real substances change phase. For example, mercury is solid at low temperatures, then liquid, and only becomes a gas at higher temperatures. To estimate its entropy experimentally, measurements of heat capacity can be integrated across temperature ranges, while the energy and entropy changes associated with phase transitions are included. Models of low-temperature solids are also needed. Such procedures enabled comparisons between experimental entropy and the Sackur–Tetrode equation, including tests of the quantum state-counting scale involving Planck’s constant.
Constant-volume and constant-pressure heating
Heat capacity depends on the constraint imposed during heating. The derivation above holds the volume fixed, producing the isochoric heat capacity CV. A different value applies when pressure is held fixed and the gas is allowed to expand.
For a monatomic ideal gas at constant pressure, the energy supplied must both increase the gas’s internal energy and provide the expansion work. The ideal gas law is
For a temperature increase ΔT at constant pressure, the internal-energy increase is
The expansion work is
as follows from the ideal gas law. Therefore, the energy supplied is
Thus the isobaric heat capacity is
Per mole,
The difference between the heat capacities is
For one mole, this becomes CP−CV=R. The larger value of CP reflects the extra energy required for expansion at constant pressure.
Thermodynamic variables and partial derivatives
Entropy depends on more than energy. For example, changing a system’s volume can change its number of accessible microstates and thus its entropy. A derivative must therefore specify which other variables are held fixed.
In the conventional definition of temperature, volume and particle number are held fixed:
Pressure is related to how energy changes with volume at fixed entropy and particle number. The fundamental thermodynamic relation is
where μ is the chemical potential, the quantity associated with changes in particle number. It follows that
and
At fixed U and N, the same relation gives
For an ideal gas, differentiating the Sackur–Tetrode equation with respect to volume yields
Equating this to P/T gives the ideal gas law:
This law is also often written as PV=nRT, where n is the amount of gas in moles.
Scope and significance of statistical mechanics
The central method applies widely: identify a macrostate, count the microstates compatible with it, take the logarithm to obtain entropy, and differentiate entropy to obtain temperature. The same broad ideas also appear in information theory, where the possible arrangements of information in a system are analyzed statistically.
The difficulty lies in the counting. The ideal gas is unusually tractable. Solids require detailed models of crystal structure and vibrations, while liquids are generally more difficult to describe. Nevertheless, statistical mechanics connects microscopic particle behavior to macroscopic quantities such as temperature, pressure, entropy, and heat capacity.
Entropy and heat capacity both have units of energy divided by temperature, such as joules per kelvin, but they are different quantities. Entropy measures the statistical multiplicity of a macrostate, whereas heat capacity measures the energy required for a temperature change under specified conditions.

Ask anything
We've read this whole study set, so questions about it get the best answers.