Ideal Gas Laws
A rigorous treatment of ideal gas behavior from molecular first principles: kinetic theory, the Maxwell-Boltzmann distribution, equipartition, and adiabatic processes
1. Introduction
The ideal gas is the foundational model system of physical chemistry thermodynamics. Despite its simplicity — point particles with no intermolecular interactions — the ideal gas captures the essential physics of dilute gases and provides the starting point for understanding real gas behavior, chemical equilibria, and statistical mechanics.
The equation of state for an ideal gas,
\[PV = nRT\]
relates pressure \(P\), volume \(V\), amount of substance \(n\) (in moles), the universal gas constant \(R = 8.314\;\text{J mol}^{-1}\text{K}^{-1}\), and absolute temperature \(T\). This deceptively simple equation encodes deep physics: it emerges from the statistical mechanics of non-interacting particles and connects the macroscopic observables of pressure and temperature to the microscopic reality of molecular motion.
The Ideal Gas Assumptions
The ideal gas model rests on two key assumptions: (1) gas molecules are point particles with negligible volume compared to the container, and (2) intermolecular forces are negligible except during brief elastic collisions. These conditions are well-satisfied for real gases at low pressures and high temperatures, where \(b/V_m \ll 1\) and \(a/V_m^2 \ll P\)in the van der Waals equation.
The ideal gas law unifies the empirical laws discovered independently by Boyle (1662), Charles (1787), Gay-Lussac (1802), and Avogadro (1811). Its molecular foundation was established by Bernoulli (1738) and brought to completion by Maxwell (1860) and Boltzmann (1872).
In this chapter, we derive the ideal gas law from first principles using kinetic molecular theory, develop the full Maxwell-Boltzmann speed distribution, prove the equipartition theorem, and derive the adiabatic relations. Each derivation builds upon the previous, creating a complete and self-contained theoretical framework.
2. Derivation 1: Kinetic Theory of Gases
We derive the ideal gas law by computing the pressure exerted by gas molecules colliding with the walls of a container. Consider \(N\) identical molecules of mass \(m\) in a cubic container of side length \(L\) and volume \(V = L^3\).
2.1 Momentum Transfer in a Single Collision
Consider a molecule with velocity component \(v_x > 0\) approaching the right wall (perpendicular to the \(x\)-axis). Upon elastic collision with the wall, the \(x\)-component of velocity reverses while \(v_y\) and \(v_z\) are unchanged:
\[\Delta p_x = m v_x - m(-v_x) = 2m v_x\]
The momentum transferred to the wall per collision is \(2mv_x\).
2.2 Collision Rate with the Wall
The molecule travels a distance \(2L\) between successive collisions with the same wall (it must traverse the box and return). The time between collisions is:
\[\Delta t = \frac{2L}{v_x}\]
The average force exerted on the wall by this single molecule is:
\[F_i = \frac{\Delta p_x}{\Delta t} = \frac{2m v_{x,i}}{2L / v_{x,i}} = \frac{m v_{x,i}^2}{L}\]
2.3 Total Pressure
The total force on the wall of area \(A = L^2\) is the sum over all \(N\) molecules:
\[P = \frac{F}{A} = \frac{1}{L^2} \sum_{i=1}^{N} \frac{m v_{x,i}^2}{L} = \frac{m}{V} \sum_{i=1}^{N} v_{x,i}^2 = \frac{Nm}{V}\langle v_x^2 \rangle\]
By isotropy, there is no preferred direction, so \(\langle v_x^2 \rangle = \langle v_y^2 \rangle = \langle v_z^2 \rangle\). Since the mean-square speed is \(\langle v^2 \rangle = \langle v_x^2 \rangle + \langle v_y^2 \rangle + \langle v_z^2 \rangle = 3\langle v_x^2 \rangle\), we obtain:
\[\boxed{P = \frac{1}{3}\frac{Nm}{V}\langle v^2 \rangle = \frac{1}{3}\rho \langle v^2 \rangle}\]
where \(\rho = Nm/V\) is the mass density.
2.4 Connecting to Temperature
We identify the mean translational kinetic energy with temperature through the fundamental relation of statistical mechanics (which we prove rigorously in Section 4):
\[\frac{1}{2}m\langle v^2 \rangle = \frac{3}{2}k_B T\]
Substituting into the pressure equation:
\[P = \frac{N}{3V} m\langle v^2 \rangle = \frac{N}{3V} \cdot 3k_B T = \frac{Nk_BT}{V}\]
Since \(N = nN_A\) and \(R = N_A k_B\), this becomes:
\[\boxed{PV = nRT}\]
The ideal gas law, derived from molecular collisions with container walls.
3. Derivation 2: Maxwell-Boltzmann Speed Distribution
The pressure derivation used only the mean-square speed \(\langle v^2 \rangle\). To fully characterize the molecular velocities, we derive the probability distribution of speeds from the Boltzmann factor.
3.1 The Boltzmann Distribution for Velocity Components
In thermal equilibrium at temperature \(T\), the probability of a molecule having velocity in the range \((v_x, v_x + dv_x)\) is proportional to the Boltzmann factor:
\[g(v_x)\,dv_x = A\,\exp\!\left(-\frac{mv_x^2}{2k_BT}\right)dv_x\]
The normalization constant \(A\) is determined by \(\int_{-\infty}^{\infty} g(v_x)\,dv_x = 1\). Using the Gaussian integral \(\int_{-\infty}^{\infty} e^{-\alpha x^2}dx = \sqrt{\pi/\alpha}\) with \(\alpha = m/(2k_BT)\):
\[g(v_x) = \left(\frac{m}{2\pi k_BT}\right)^{1/2}\exp\!\left(-\frac{mv_x^2}{2k_BT}\right)\]
3.2 The Three-Dimensional Velocity Distribution
Since the three velocity components are statistically independent for an ideal gas (no intermolecular interactions), the joint probability distribution factors:
\[f_{\vec{v}}(v_x, v_y, v_z) = g(v_x)\,g(v_y)\,g(v_z) = \left(\frac{m}{2\pi k_BT}\right)^{3/2}\exp\!\left(-\frac{m(v_x^2+v_y^2+v_z^2)}{2k_BT}\right)\]
3.3 Converting to the Speed Distribution
To find the distribution of speeds \(v = |\vec{v}| = \sqrt{v_x^2+v_y^2+v_z^2}\), we transform to spherical coordinates in velocity space. The volume element transforms as:
\[dv_x\,dv_y\,dv_z = v^2 \sin\theta\,dv\,d\theta\,d\phi\]
Integrating over all directions (\(\int_0^\pi \sin\theta\,d\theta \int_0^{2\pi} d\phi = 4\pi\)), we obtain the Maxwell-Boltzmann speed distribution:
\[\boxed{f(v) = 4\pi\left(\frac{m}{2\pi k_BT}\right)^{3/2} v^2 \exp\!\left(-\frac{mv^2}{2k_BT}\right)}\]
The Maxwell-Boltzmann speed distribution. The \(v^2\) factor arises from the spherical shell volume element in velocity space.
3.4 Characteristic Speeds
Three characteristic speeds fully characterize the distribution. Each is obtained by a different operation on \(f(v)\).
Most Probable Speed
Set \(df/dv = 0\). Differentiating and solving:
\[v_{mp} = \sqrt{\frac{2k_BT}{m}}\]
Mean Speed
Compute \(\langle v \rangle = \int_0^\infty v\,f(v)\,dv\):
\[v_{mean} = \sqrt{\frac{8k_BT}{\pi m}}\]
RMS Speed
Compute \(v_{rms} = \sqrt{\langle v^2 \rangle}\):
\[v_{rms} = \sqrt{\frac{3k_BT}{m}}\]
The ordering \(v_{mp} < v_{mean} < v_{rms}\) always holds, with the ratios:
\[v_{mp} : v_{mean} : v_{rms} = 1 : \frac{2}{\sqrt{\pi}} : \sqrt{\frac{3}{2}} \approx 1 : 1.128 : 1.225\]
3.5 Derivation of the Most Probable Speed
To find the most probable speed, we differentiate \(f(v)\) and set it to zero. Writing \(f(v) = C v^2 e^{-\beta v^2}\) where \(\beta = m/(2k_BT)\):
\[\frac{df}{dv} = C\left(2v - 2\beta v^3\right)e^{-\beta v^2} = 0\]
\[2v(1 - \beta v^2) = 0 \implies v_{mp} = \frac{1}{\sqrt{\beta}} = \sqrt{\frac{2k_BT}{m}}\]
3.6 Derivation of the Mean Speed
The mean speed requires the integral \(\langle v \rangle = \int_0^\infty v\,f(v)\,dv\). Using the standard result \(\int_0^\infty v^3 e^{-\beta v^2} dv = 1/(2\beta^2)\):
\[\langle v \rangle = 4\pi\left(\frac{m}{2\pi k_BT}\right)^{3/2} \frac{1}{2\beta^2} = 4\pi\left(\frac{\beta}{\pi}\right)^{3/2}\frac{1}{2\beta^2} = \sqrt{\frac{8k_BT}{\pi m}}\]
3.7 Derivation of the RMS Speed
For the root-mean-square speed, we need \(\langle v^2 \rangle = \int_0^\infty v^2 f(v)\,dv\). Using \(\int_0^\infty v^4 e^{-\beta v^2}dv = (3/8)\sqrt{\pi/\beta^5}\):
\[\langle v^2 \rangle = 4\pi \left(\frac{\beta}{\pi}\right)^{3/2}\frac{3}{8}\sqrt{\frac{\pi}{\beta^5}} = \frac{3}{2\beta} = \frac{3k_BT}{m}\]
\[v_{rms} = \sqrt{\langle v^2 \rangle} = \sqrt{\frac{3k_BT}{m}}\]
Note that \(\frac{1}{2}m\langle v^2 \rangle = \frac{3}{2}k_BT\) is precisely the kinetic energy-temperature relation we used in Section 2 to complete the derivation of \(PV = nRT\).
4. Derivation 3: The Equipartition Theorem
The equipartition theorem is a cornerstone result of classical statistical mechanics. It states that each quadratic degree of freedom contributes \(\frac{1}{2}k_BT\) to the average energy. We prove this rigorously from the Boltzmann distribution.
4.1 Statement and Proof
Consider a system in thermal equilibrium at temperature \(T\) with a Hamiltonian containing a quadratic term \(\varepsilon = \alpha q^2\) where \(q\) is a generalized coordinate or momentum and \(\alpha\) is a positive constant. We compute the thermal average:
\[\langle \alpha q^2 \rangle = \frac{\int_{-\infty}^{\infty} \alpha q^2 \,e^{-\alpha q^2/k_BT}\,dq}{\int_{-\infty}^{\infty} e^{-\alpha q^2/k_BT}\,dq}\]
With \(\beta = 1/(k_BT)\) and the substitution \(u = \sqrt{\alpha\beta}\,q\):
\[\langle \alpha q^2 \rangle = \frac{\int_{-\infty}^{\infty} u^2 e^{-u^2}\frac{du}{\sqrt{\alpha\beta}} \cdot \frac{1}{\beta}}{\int_{-\infty}^{\infty} e^{-u^2}\frac{du}{\sqrt{\alpha\beta}}} = \frac{1}{\beta}\cdot\frac{\int_{-\infty}^{\infty} u^2 e^{-u^2}du}{\int_{-\infty}^{\infty} e^{-u^2}du}\]
Using the standard Gaussian integrals \(\int_{-\infty}^{\infty} e^{-u^2}du = \sqrt{\pi}\) and \(\int_{-\infty}^{\infty} u^2 e^{-u^2}du = \frac{1}{2}\sqrt{\pi}\):
\[\boxed{\langle \alpha q^2 \rangle = \frac{1}{2\beta} = \frac{1}{2}k_BT}\]
Each quadratic degree of freedom contributes exactly \(\frac{1}{2}k_BT\) to the average energy, independent of the coefficient \(\alpha\).
4.2 Application to Translational Motion
For a monatomic ideal gas, the kinetic energy is \(E_k = \frac{1}{2}mv_x^2 + \frac{1}{2}mv_y^2 + \frac{1}{2}mv_z^2\). There are 3 quadratic terms (degrees of freedom), each contributing \(\frac{1}{2}k_BT\):
\[\langle E_k \rangle = 3 \times \frac{1}{2}k_BT = \frac{3}{2}k_BT\]
4.3 Heat Capacities of Ideal Gases
For an ideal gas with \(f\) quadratic degrees of freedom per molecule, the total internal energy is:
\[U = N \cdot \frac{f}{2}k_BT = \frac{f}{2}nRT\]
The heat capacity at constant volume is:
\[\boxed{C_V = \frac{f}{2}nR}\]
For an ideal gas, \(C_P = C_V + nR\) (from \(H = U + PV = U + nRT\)), giving:
\[C_P = \frac{f+2}{2}nR, \qquad \gamma \equiv \frac{C_P}{C_V} = \frac{f+2}{f}\]
| Gas Type | \(f\) | \(C_V/nR\) | \(C_P/nR\) | \(\gamma\) |
|---|---|---|---|---|
| Monatomic (He, Ne, Ar) | 3 | 3/2 | 5/2 | 5/3 = 1.667 |
| Diatomic (N₂, O₂, CO) | 5 | 5/2 | 7/2 | 7/5 = 1.400 |
| Linear triatomic (CO₂) | 7 | 7/2 | 9/2 | 9/7 = 1.286 |
| Nonlinear triatomic (H₂O) | 6 | 3 | 4 | 4/3 = 1.333 |
Diatomic molecules have \(f = 5\) at room temperature: 3 translational + 2 rotational degrees of freedom. The two vibrational modes (1 kinetic + 1 potential) are “frozen out” at room temperature because the vibrational quantum \(\hbar\omega \gg k_BT\). At high temperatures (\(T \gtrsim 1000\;\text{K}\) for N₂), vibrations become active and \(f \to 7\).
5. Derivation 4: Adiabatic Processes
An adiabatic process is one with no heat exchange (\(q = 0\)). For a reversible adiabatic expansion or compression of an ideal gas, we derive the relation \(PV^\gamma = \text{const}\).
5.1 Starting Point: First Law
For a reversible adiabatic process with \(\delta q = 0\):
\[dU = \delta w = -P\,dV\]
5.2 Express dU in Terms of dT
For an ideal gas, the internal energy depends only on temperature, so:
\[dU = nC_V\,dT\]
where \(C_V = (f/2)R\) per mole is the molar heat capacity at constant volume.
5.3 Eliminate dT Using the Ideal Gas Law
From \(PV = nRT\), differentiating: \(P\,dV + V\,dP = nR\,dT\). Setting\(nC_V\,dT = -P\,dV\) gives \(dT = -P\,dV/(nC_V)\). Substituting:
\[P\,dV + V\,dP = nR\left(-\frac{P\,dV}{nC_V}\right) = -\frac{R}{C_V}P\,dV\]
Rearranging:
\[V\,dP = -P\,dV\left(1 + \frac{R}{C_V}\right) = -P\,dV\cdot\frac{C_V + R}{C_V} = -\gamma\,P\,dV\]
5.4 Separation and Integration
Dividing both sides by \(PV\):
\[\frac{dP}{P} = -\gamma\frac{dV}{V}\]
Integrating both sides:
\[\ln P = -\gamma \ln V + \text{const}\]
\[\ln(PV^\gamma) = \text{const}\]
Exponentiating:
\[\boxed{PV^\gamma = \text{const}}\]
The adiabatic equation of state, with \(\gamma = C_P/C_V = (f+2)/f\).
5.5 Equivalent Forms
Using \(PV = nRT\) to eliminate one variable at a time, we obtain two equivalent relations:
Temperature-Volume
\[TV^{\gamma-1} = \text{const}\]
From \(P = nRT/V\) in \(PV^\gamma = \text{const}\).
Temperature-Pressure
\[T^\gamma P^{1-\gamma} = \text{const}\]
From \(V = nRT/P\) in \(PV^\gamma = \text{const}\).
6. Applications of Ideal Gas Theory
6.1 Gas Thermometry
The ideal gas law provides a fundamental definition of temperature that is independent of the working substance. A constant-volume gas thermometer measures pressure at constant volume:\(T = T_{ref} \cdot P/P_{ref}\). In the limit of low density, all gases converge to the same temperature reading, defining the ideal-gas temperature scale that coincides with the thermodynamic temperature scale.
6.2 Atmospheric Pressure Variation
For an isothermal atmosphere, combining the ideal gas law with the hydrostatic equation\(dP = -\rho g\,dz\) yields the barometric formula:
\[P(z) = P_0 \exp\!\left(-\frac{Mgz}{RT}\right)\]
where \(M\) is the molar mass of air and the scale height \(H = RT/(Mg) \approx 8.5\;\text{km}\).
For an adiabatic atmosphere (dry adiabatic lapse rate), using \(T = T_0 - \Gamma z\) with\(\Gamma = Mg/C_P \approx 9.8\;\text{K/km}\), the pressure profile becomes:
\[P(z) = P_0 \left(1 - \frac{\Gamma z}{T_0}\right)^{\gamma/(\gamma-1)}\]
6.3 Speed of Sound in an Ideal Gas
Sound propagation in a gas is an adiabatic process (too fast for heat exchange). The speed of sound is:
\[c_s = \sqrt{\frac{\gamma RT}{M}} = \sqrt{\frac{\gamma k_BT}{m}}\]
For air at 20 °C: \(c_s = \sqrt{1.4 \times 8.314 \times 293 / 0.029} \approx 343\;\text{m/s}\).
Note that \(c_s = v_{rms}\sqrt{\gamma/3}\), showing that the speed of sound is comparable to (but somewhat less than) the typical molecular speed.
6.4 Effusion and Graham's Law
Effusion is the escape of gas molecules through a tiny orifice (diameter « mean free path). The effusion rate depends on the flux of molecules hitting the wall:
\[\Phi = \frac{1}{4}n\langle v \rangle = \frac{P}{\sqrt{2\pi mk_BT}}\]
Since \(\langle v \rangle \propto 1/\sqrt{m}\), the rate of effusion is inversely proportional to the square root of molecular mass. For two gases at the same conditions:
\[\boxed{\frac{r_1}{r_2} = \sqrt{\frac{M_2}{M_1}}}\]
Graham's Law of Effusion. This principle was used in the Manhattan Project to separate\(^{235}\text{UF}_6\) from \(^{238}\text{UF}_6\) by gaseous diffusion.
7. Historical Context
The Road to the Ideal Gas Law
Robert Boyle (1662) — Discovered that at constant temperature, \(PV = \text{const}\)(Boyle's Law). His assistant Robert Hooke constructed the apparatus: a J-tube with mercury trapping air.
Jacques Charles (1787) & Joseph Louis Gay-Lussac (1802) — Independently found that at constant pressure, volume is proportional to temperature: \(V \propto T\) (Charles's Law). Gay-Lussac published the quantitative result: gases expand by \(1/267\) of their volume per °C (later refined to \(1/273.15\)).
Amedeo Avogadro (1811) — Hypothesized that equal volumes of gases at the same temperature and pressure contain equal numbers of molecules. This resolved the puzzling volume ratios in Gay-Lussac's law of combining volumes and established \(V \propto n\).
Daniel Bernoulli (1738) — First proposed in Hydrodynamica that gas pressure arises from molecular collisions with container walls. This was far ahead of its time and largely ignored for over a century.
James Clerk Maxwell (1860) — Derived the velocity distribution of gas molecules using statistical arguments, founding the kinetic theory of gases. His distribution was the first statistical law in physics.
Ludwig Boltzmann (1872) — Provided a rigorous foundation through the Boltzmann equation and the H-theorem. Proved that the Maxwell distribution is the unique equilibrium distribution and connected entropy to molecular disorder via \(S = k_B \ln W\).
8. Python Simulation: Maxwell-Boltzmann Speed Distributions
The following simulation plots the Maxwell-Boltzmann speed distribution for nitrogen gas (\(M = 28\;\text{g/mol}\)) at three different temperatures, marking the most probable, mean, and RMS speeds on each curve.
Click Run to execute the Python code
Code will be executed with Python 3 on the server
9. Fortran Simulation: Thermodynamic Properties of Ideal Gases
The following Fortran program computes thermodynamic properties — heat capacities (\(C_V\), \(C_P\)), the adiabatic index (\(\gamma\)), and the speed of sound — for ideal gases with different numbers of degrees of freedom. It also verifies the adiabatic relation \(PV^\gamma = \text{const}\) numerically.
Click Run to execute the Python code
Code will be executed with Python 3 on the server
References
- Atkins, P. & de Paula, J. (2014). Atkins' Physical Chemistry, 10th ed. Oxford University Press. — The standard undergraduate physical chemistry text; Chapters 1 and 15 cover ideal gases and kinetic theory.
- McQuarrie, D. A. (2000). Statistical Mechanics. University Science Books. — Rigorous derivations of the Maxwell-Boltzmann distribution and equipartition theorem in Chapters 7–8.
- Reif, F. (1965). Fundamentals of Statistical and Thermal Physics. McGraw-Hill. — Classic graduate text; Chapter 7 provides the definitive treatment of kinetic theory.
- Engel, T. & Reid, P. (2013). Thermodynamics, Statistical Thermodynamics, & Kinetics, 3rd ed. Pearson. — Excellent derivations of adiabatic processes and heat capacities.
- Maxwell, J. C. (1860). “Illustrations of the Dynamical Theory of Gases,” Philosophical Magazine 19, 19–32 and 20, 21–37. — Maxwell's original derivation of the velocity distribution.
- Boltzmann, L. (1872). “Weitere Studien über das Wärmegleichgewicht unter Gasmolekülen,” Sitzungsberichte der Kaiserlichen Akademie der Wissenschaften 66, 275–370. — Boltzmann's H-theorem and the approach to equilibrium.