Equation of state for ideal gas
Derivation using statistical mechanics
Statistical mechanics starts from the behavior of individual particles and builds up to the bulk properties you can measure in a lab. For an ideal gas, the goal is to derive the familiar equation of state purely from microscopic reasoning.
The derivation follows these key steps:
- Apply the Boltzmann distribution to describe how particles distribute themselves across available energy states. The probability of a particle occupying a microstate with energy is proportional to .
- Construct the partition function , which sums the Boltzmann factors over all accessible microstates. This single quantity encodes everything about the system's thermodynamic behavior at equilibrium.
- Connect to macroscopic observables. Pressure, for instance, is obtained from the derivative of with respect to volume: . Evaluating this for the translational partition function of an ideal gas yields the equation of state directly.
Resulting equation and consistency with empirical law
The statistical mechanical derivation produces:
- = pressure
- = volume
- = number of particles
- = Boltzmann constant ()
- = absolute temperature
This is exactly the empirical ideal gas law (often written with ). The fact that a purely statistical argument reproduces a well-known empirical result is a strong validation of the statistical mechanical framework. No assumptions about pressure or collisions with container walls were needed; the result falls out of counting microstates.

Partition function for ideal gas
Definition and calculation
The partition function is the central object in statistical mechanics. It acts as a generating function: once you have , you can extract essentially any equilibrium thermodynamic property by taking appropriate derivatives.
For an ideal gas, the only relevant degrees of freedom at the simplest level are translational (the particles move freely through the container but don't interact). The translational partition function for a single particle in a box of volume is:
- = particle mass
- = Planck's constant
- = volume of the container
The exponent comes from the three independent spatial dimensions, each contributing a factor of .
For indistinguishable particles, the total partition function is:
The in the denominator corrects for overcounting. Without it, you'd treat swapping two identical particles as a distinct microstate, which leads to the Gibbs paradox (a non-extensive entropy that grows incorrectly with system size). Dividing by restores the correct extensive behavior.

Relation to thermodynamic properties
Once you have , thermodynamic quantities follow from standard relations. Working with is usually more convenient:
- Helmholtz free energy:
- Internal energy:
- Pressure:
- Entropy:
Notice that the entropy expression is just , which is consistent with the thermodynamic identity .
As a concrete check: substituting the translational partition function into the pressure relation gives , recovering the ideal gas law. Evaluating the internal energy gives , which yields the familiar monatomic ideal gas heat capacity . These results connect directly to the equipartition theorem, where each translational degree of freedom contributes per particle.
Limitations of ideal gas model
Assumptions and deviations from real gas behavior
The ideal gas model rests on two core assumptions:
- Particles are point-like (zero volume).
- Particles experience no intermolecular forces except perfectly elastic collisions.
Real molecules violate both assumptions. They have finite size, and they attract each other at moderate distances (van der Waals/dispersion forces) while repelling at very short distances. These effects become significant under two conditions:
- High pressures/densities, where particles are packed closely enough that their finite volume matters and repulsive interactions dominate.
- Low temperatures, where kinetic energy is small relative to attractive intermolecular potential energy, eventually leading to condensation into a liquid phase.
At standard conditions for gases like or , deviations from ideality are small (compressibility factor ). But near the critical point or at very high pressures, the ideal model fails qualitatively.
Advanced models and quantum effects
The van der Waals equation offers a first correction:
Here accounts for intermolecular attractions and for finite molecular volume ( is the molar volume). This captures phenomena like the liquid-gas phase transition that the ideal gas law cannot.
Beyond intermolecular forces, the ideal gas treatment also assumes a continuous (classical) distribution of energies. This breaks down when the thermal de Broglie wavelength becomes comparable to the average interparticle spacing. At that point, quantum statistics replace classical statistics:
- Bosons (integer spin) follow Bose-Einstein statistics. At sufficiently low temperatures, they can undergo Bose-Einstein condensation, where a macroscopic fraction of particles occupies the ground state.
- Fermions (half-integer spin) follow Fermi-Dirac statistics. The Pauli exclusion principle prevents multiple fermions from sharing a quantum state, which is why electrons in metals behave very differently from a classical ideal gas even at room temperature.
For most gases at everyday temperatures and pressures, quantum corrections are negligible and the classical ideal gas partition function works well. It remains the essential starting point: you need to understand the ideal case thoroughly before layering on the corrections that describe real systems.