Fiveable

🎲Statistical Mechanics Unit 5 Review

QR code for Statistical Mechanics practice questions

5.3 Ideal gas law

5.3 Ideal gas law

Written by the Fiveable Content Team • Last updated August 2025
Written by the Fiveable Content Team • Last updated August 2025
🎲Statistical Mechanics
Unit & Topic Study Guides

The ideal gas law connects the microscopic motion of particles to the macroscopic properties of a gas. It's one of the most important results in statistical mechanics because it shows how pressure, volume, and temperature emerge from simple assumptions about non-interacting particles. This topic covers the derivation from statistical mechanics, the microscopic interpretation, and where the model breaks down.

Definition of ideal gas

An ideal gas is a theoretical model where particles don't interact with each other and take up no volume themselves. It's deliberately simplified, but that simplicity is what makes it so powerful: you can derive exact results and then use them as a baseline for understanding real gases.

Assumptions and limitations

The model rests on a few key assumptions:

  • Gas particles are point masses with negligible volume compared to the container.
  • There are no intermolecular forces between particles (no attraction or repulsion).
  • All collisions (particle-particle and particle-wall) are perfectly elastic, meaning kinetic energy is conserved.
  • The gas obeys classical mechanics, so quantum effects are neglected.

These assumptions hold well at high temperatures and low pressures, where particles are far apart and moving fast. The model breaks down when particles are squeezed close together (high pressure) or moving slowly enough for intermolecular attractions to matter (low temperature). It also fails when quantum effects become relevant, such as for light gases like helium near absolute zero.

Equation of state

The ideal gas equation of state relates the macroscopic variables of a gas:

PV=nRTPV = nRT

  • PP = pressure
  • VV = volume
  • nn = number of moles
  • TT = absolute temperature (in Kelvin)
  • RR = universal gas constant, 8.314 J/(mol\cdotpK)8.314 \text{ J/(mol·K)}

An equivalent form using particle number NN and Boltzmann's constant kBk_B is:

PV=NkBTPV = Nk_BT

This single equation encodes several classical gas laws. At constant temperature, pressure and volume are inversely proportional (Boyle's Law). At constant pressure, volume is directly proportional to temperature (Charles's Law). At constant volume, pressure is directly proportional to temperature (Gay-Lussac's Law).

Microscopic interpretation

Statistical mechanics explains why the ideal gas law works by connecting bulk properties to the behavior of individual particles.

Kinetic theory of gases

In the kinetic theory picture, gas particles are in constant, random motion. Pressure arises because particles slam into the container walls and transfer momentum. Temperature is a measure of how fast the particles are moving on average.

The central result connecting temperature to particle motion is:

12mv2=32kBT\frac{1}{2}m\overline{v^2} = \frac{3}{2}k_BT

Here mm is the particle mass and v2\overline{v^2} is the mean-square velocity. This tells you that temperature is directly proportional to the average translational kinetic energy per particle. A gas at 600 K has particles with twice the average kinetic energy of a gas at 300 K.

The mean free path is the average distance a particle travels between collisions. It depends on particle density and the effective cross-sectional area of the particles.

Molecular collisions

Collisions in an ideal gas are perfectly elastic: total kinetic energy and momentum are conserved. No energy is lost to internal degrees of freedom or intermolecular potentials.

The collision frequency (how often a given particle collides) increases with temperature (particles move faster), particle size (bigger targets), and gas density (more neighbors). Through many collisions, particles exchange energy and the system reaches thermal equilibrium.

This process produces the Maxwell-Boltzmann speed distribution, which describes the probability of finding a particle at a given speed. The distribution has a characteristic shape: few particles are very slow or very fast, with most clustered around a peak that shifts to higher speeds as temperature increases.

Macroscopic variables

Pressure and volume

Pressure is force per unit area on the container walls, arising from the cumulative effect of particle impacts. If you decrease the volume while keeping temperature fixed, particles hit the walls more frequently, so pressure increases. This is the microscopic explanation of Boyle's Law.

For gas mixtures, Dalton's Law states that the total pressure is the sum of the partial pressures of each component:

Ptotal=P1+P2+P3+P_{\text{total}} = P_1 + P_2 + P_3 + \cdots

Each partial pressure is the pressure that gas would exert if it alone occupied the container.

Pressure and volume also connect to thermodynamic work. The work done by a gas expanding against external pressure is W=PdVW = \int P \, dV.

Temperature and energy

Temperature in statistical mechanics is defined through average kinetic energy, not just a thermometer reading. For an ideal gas, the total internal energy depends only on temperature:

U=f2NkBTU = \frac{f}{2}Nk_BT

where ff is the number of degrees of freedom per particle. For a monatomic ideal gas, f=3f = 3 (three translational directions), giving U=32NkBTU = \frac{3}{2}Nk_BT. This is the equipartition theorem at work: each quadratic degree of freedom contributes 12kBT\frac{1}{2}k_BT of energy per particle on average.

Temperature changes directly affect the velocity distribution. Raising the temperature broadens the Maxwell-Boltzmann distribution and shifts its peak to higher speeds.

Derivation from statistical mechanics

The ideal gas law isn't just an empirical observation. You can derive it rigorously from the partition function, which counts the statistical weight of all accessible microstates.

Assumptions and limitations, Ideal Gas Law | Boundless Physics

Partition function approach

For NN indistinguishable, non-interacting particles in a volume VV, the canonical partition function is:

Z=1N!(Vλ3)NZ = \frac{1}{N!}\left(\frac{V}{\lambda^3}\right)^N

Here λ\lambda is the thermal de Broglie wavelength:

λ=2π2mkBT\lambda = \sqrt{\frac{2\pi\hbar^2}{mk_BT}}

The N!N! in the denominator accounts for the indistinguishability of identical particles (this resolves the Gibbs paradox).

To get thermodynamic quantities, you work through the Helmholtz free energy:

  1. Compute F=kBTlnZF = -k_BT \ln Z.
  2. Obtain pressure from P=(FV)T,NP = -\left(\frac{\partial F}{\partial V}\right)_{T,N}.
  3. This derivative gives P=NkBTVP = \frac{Nk_BT}{V}, which is exactly the ideal gas law.
  4. Internal energy follows from U=lnZβU = -\frac{\partial \ln Z}{\partial \beta} (where β=1/kBT\beta = 1/k_BT), yielding U=32NkBTU = \frac{3}{2}Nk_BT.

The partition function approach is powerful because it systematically generates all thermodynamic properties from a single function.

Canonical ensemble

The canonical ensemble describes a system at fixed NN, VV, and TT, in thermal contact with a heat bath. The probability of the system being in a microstate with energy EiE_i is given by the Boltzmann distribution:

Pi=eβEiZP_i = \frac{e^{-\beta E_i}}{Z}

For an ideal gas, the energy of each particle is purely kinetic (E=p2/2mE = p^2/2m), so the Boltzmann distribution over momenta directly produces the Maxwell-Boltzmann velocity distribution. Ensemble averages of pressure and energy reproduce the ideal gas law and the equipartition result. The canonical ensemble is the most natural framework for deriving ideal gas properties at constant temperature.

Applications of ideal gas law

Thermodynamic processes

The ideal gas law simplifies the analysis of standard thermodynamic processes:

  • Isothermal (constant TT): PV=constPV = \text{const}. Work done is W=nRTln(Vf/Vi)W = nRT\ln(V_f/V_i).
  • Isobaric (constant PP): VTV \propto T. Work done is W=PΔVW = P\Delta V.
  • Isochoric (constant VV): PTP \propto T. No work is done since the volume doesn't change.
  • Adiabatic (no heat exchange): PVγ=constPV^\gamma = \text{const}, where γ=CP/CV\gamma = C_P/C_V is the heat capacity ratio.

These processes are the building blocks of thermodynamic cycles. The Carnot cycle, which sets the theoretical maximum efficiency for a heat engine, consists of two isothermal and two adiabatic steps, all analyzable with the ideal gas law.

Gas mixtures

The ideal gas law extends naturally to mixtures. Each species ii contributes a partial pressure Pi=niRT/VP_i = n_i RT/V, and the total pressure is their sum (Dalton's Law).

The mole fraction of species ii is xi=ni/ntotalx_i = n_i / n_{\text{total}}, and the partial pressure is simply Pi=xiPtotalP_i = x_i P_{\text{total}}. The average molecular weight of a mixture is the mole-fraction-weighted average of the component molecular weights. These relationships are used extensively in atmospheric science, chemical engineering, and combustion analysis.

Deviations from ideality

Van der Waals equation

The Van der Waals equation is the simplest correction to the ideal gas law, accounting for two effects the ideal model ignores:

(P+an2V2)(Vnb)=nRT(P + \frac{an^2}{V^2})(V - nb) = nRT

  • The aa term corrects for intermolecular attractive forces, which effectively reduce the pressure exerted on the walls.
  • The bb term corrects for the finite volume of the molecules themselves, reducing the available space.

The constants aa and bb are specific to each gas (e.g., aa is much larger for polar molecules with stronger attractions). At low density (large VV, small n/Vn/V), both corrections become negligible and the equation reduces to PV=nRTPV = nRT.

The Van der Waals equation also predicts the existence of a critical point (critical temperature, pressure, and volume) above which the distinction between liquid and gas phases disappears.

Real gases vs ideal gases

The compressibility factor Z=PV/(nRT)Z = PV/(nRT) quantifies how much a real gas deviates from ideal behavior. For an ideal gas, Z=1Z = 1 exactly. At moderate pressures, attractive forces dominate and Z<1Z < 1. At very high pressures, the finite molecular volume dominates and Z>1Z > 1.

For more accurate modeling beyond Van der Waals, the virial equation of state expands ZZ as a power series in density:

Z=1+B(T)Vm+C(T)Vm2+Z = 1 + \frac{B(T)}{V_m} + \frac{C(T)}{V_m^2} + \cdots

where VmV_m is the molar volume and B(T)B(T), C(T)C(T) are temperature-dependent virial coefficients that encode the effects of pairwise and three-body interactions. More sophisticated equations of state (Redlich-Kwong, Peng-Robinson) are used in engineering applications where high accuracy is needed.

Ideal gas in different ensembles

A key consistency check in statistical mechanics is that the ideal gas law emerges regardless of which ensemble you use. The physics doesn't depend on your choice of bookkeeping.

Assumptions and limitations, General Chemistry for Science Majors, Unit 3, Gas Laws | OERTX

Microcanonical ensemble

The microcanonical ensemble describes an isolated system with fixed energy EE, volume VV, and particle number NN. You count the number of microstates Ω(E,V,N)\Omega(E, V, N) accessible to the system and define entropy via Boltzmann's formula:

S=kBlnΩS = k_B \ln \Omega

For an ideal gas, Ω\Omega can be computed by finding the volume of the momentum-space hypersphere consistent with total energy EE. The result is the Sackur-Tetrode equation for the entropy. Taking the appropriate derivatives of SS with respect to EE and VV yields temperature and pressure:

1T=(SE)V,N,PT=(SV)E,N\frac{1}{T} = \left(\frac{\partial S}{\partial E}\right)_{V,N}, \quad \frac{P}{T} = \left(\frac{\partial S}{\partial V}\right)_{E,N}

These reproduce U=32NkBTU = \frac{3}{2}Nk_BT and PV=NkBTPV = Nk_BT.

Grand canonical ensemble

The grand canonical ensemble describes a system that can exchange both energy and particles with a reservoir. The control variables are temperature TT, volume VV, and chemical potential μ\mu.

The grand partition function is:

Z=N=0zNZN\mathcal{Z} = \sum_{N=0}^{\infty} z^N Z_N

where z=eβμz = e^{\beta\mu} is the fugacity and ZNZ_N is the canonical partition function for NN particles. For an ideal gas, this sum can be evaluated exactly. The average particle number and pressure are obtained from:

N=zlnZz,PV=kBTlnZ\langle N \rangle = z\frac{\partial \ln \mathcal{Z}}{\partial z}, \quad PV = k_BT \ln \mathcal{Z}

The grand canonical ensemble is particularly useful for studying fluctuations in particle number. For an ideal gas, the variance in NN is (ΔN)2=N\langle (\Delta N)^2 \rangle = \langle N \rangle, and the relative fluctuations scale as 1/N1/\sqrt{\langle N \rangle}, becoming negligible for macroscopic systems.

Experimental verification

Historical experiments

The ideal gas law was assembled from several independent experimental discoveries:

  • Boyle (1662) showed that pressure and volume are inversely proportional at constant temperature, using a J-shaped tube with trapped air.
  • Charles (1787) and Gay-Lussac (1802) independently established that gas volume is proportional to temperature at constant pressure.
  • Avogadro (1811) proposed that equal volumes of gases at the same temperature and pressure contain equal numbers of particles, linking moles to volume.

These empirical laws were unified into PV=nRTPV = nRT. Gas thermometry, which defines temperature through the pressure or volume of a dilute gas, provided one of the most precise early methods for establishing the absolute temperature scale. Experiments on gas liquefaction (by Andrews, van der Waals, and others) revealed the critical point and motivated corrections to the ideal gas law.

Modern measurement techniques

Modern experiments can test the ideal gas law with extraordinary precision:

  • High-precision manometers and pressure transducers measure pressure to parts-per-million accuracy.
  • Laser interferometry allows precise volume measurements.
  • Spectroscopic methods (infrared, Raman) determine gas temperature and composition without physical contact.
  • Speed-of-sound measurements using ultrasonic techniques provide an independent route to the heat capacity ratio γ\gamma and thus test the equipartition prediction.
  • Gas chromatography and mass spectrometry analyze the composition of gas mixtures with high sensitivity.

These techniques confirm that the ideal gas law is an excellent approximation for dilute gases and precisely quantify the deviations that appear under non-ideal conditions.

Ideal gas in astrophysics

Interstellar medium

The interstellar medium (ISM) consists of extremely dilute gas (typically 11 to 10610^6 particles per cm3\text{cm}^3, compared to 1019\sim 10^{19} for air at sea level). At such low densities, the ideal gas law is an excellent approximation.

The ideal gas equation helps model temperature and density variations across different ISM phases (hot ionized gas at 106 K\sim 10^6 \text{ K}, cold molecular clouds at 10 K\sim 10 \text{ K}). In star formation, gravitational collapse of a gas cloud is resisted by thermal pressure, which the ideal gas law quantifies. Deviations from ideal behavior become relevant in the densest molecular cloud cores, where dust grains and molecular interactions play a role.

Stellar atmospheres

Stellar atmospheres are modeled using the ideal gas law to relate pressure, temperature, and density as functions of depth. This is central to calculating hydrostatic equilibrium (the balance between gravity pulling inward and pressure pushing outward) and radiative transfer (how light propagates through the atmosphere).

The ideal gas approximation works well for main-sequence stars like the Sun. It breaks down in extreme environments: in white dwarfs, electrons are packed so densely that quantum degeneracy pressure (described by Fermi-Dirac statistics, not the ideal gas law) supports the star. Similarly, neutron stars require a fully quantum-mechanical treatment.

Limitations and extensions

High pressure conditions

At high pressures, the assumptions of the ideal gas model fail in two ways: intermolecular forces become significant, and the finite size of molecules reduces the available volume. The compressibility factor ZZ deviates measurably from 1.

For practical calculations, engineers use more accurate equations of state such as Redlich-Kwong and Peng-Robinson, which add temperature-dependent corrections to the Van der Waals framework. The concept of fugacity replaces pressure in thermodynamic equations for real gases, defined so that the ideal-gas formulas retain their mathematical form. At very high pressures, the ideal gas law also fails to describe phase transitions between gas and liquid states.

Low temperature behavior

At sufficiently low temperatures, the thermal de Broglie wavelength λ\lambda becomes comparable to the average inter-particle spacing, and quantum statistics must replace classical statistics. The relevant criterion is:

nλ31n\lambda^3 \sim 1

where n=N/Vn = N/V is the number density. When this quantity is much less than 1, classical (ideal gas) behavior holds. When it approaches or exceeds 1, you must use:

  • Bose-Einstein statistics for integer-spin particles (bosons), which predicts Bose-Einstein condensation below a critical temperature, where a macroscopic fraction of particles occupies the ground state.
  • Fermi-Dirac statistics for half-integer-spin particles (fermions), which gives rise to degeneracy pressure even at zero temperature, since the Pauli exclusion principle prevents all particles from occupying the same state.

These quantum corrections are essential for understanding ultracold atomic gases, liquid helium, electrons in metals, and the interiors of compact stars.