Ideal Gas Law
The ideal gas law is the fundamental thermodynamic equation of state (PV = nRT = Nk_B T) relating pressure, volume, absolute temperature, and molar quantity in a gas of non-interacting point particles undergoing elastic collisions.
The ideal gas law is the foundational thermodynamic equation of state describing the macroscopic behavior of a hypothetical gas composed of point-like particles that undergo elastic collisions without intermolecular attractive or repulsive forces. First synthesized by French physicist and engineer Émile Clapeyron in 1834, the equation unifies four empirical gas relations into a single expression: PV = nRT, where P is absolute pressure (in pascals, Pa), V is container volume (in cubic meters, m3), n is the amount of substance (in moles, mol), R = 8.314462618 J mol−1 K−1 is the universal gas constant, and T is absolute thermodynamic temperature (in kelvins, K). In statistical mechanics and molecular physics, the law is equivalently written in microscopic form as PV = NkBT, where N = nNA is the total number of gas molecules, NA = 6.02214076 × 1023 mol−1 is the Avogadro constant, and kB = R / NA = 1.380649 × 10−23 J K−1 is the Boltzmann constant linking macroscopic thermal energy to microscopic entropy and particle dynamics.
At standard temperature and pressure (STP, defined by IUPAC since 1982 as T = 273.15 K and P = 100 kPa = 1 bar), one mole of an ideal gas occupies a molar volume Vm = RT / P = 22.71095 L mol−1; under the older 1 atm (101.325 kPa) convention at 273.15 K, the molar volume equals 22.41397 L mol−1. Although real gases such as N2, O2, CO2, and H2O vapor possess finite molecular volumes and van der Waals intermolecular attractions, the ideal gas law remains accurate to within 1% for most diatomic and monatomic gases at ambient temperatures and pressures near or below 1 atm. It serves as the reference baseline for chemical thermodynamics, Gibbs free energy calculations, atmospheric physics, and ideal thermodynamic cycles such as the Carnot cycle.
Master the Equations of State: Test your ability to identify thermodynamic variables, gas constants, and scaling exponents in EquaGuess.
Empirical Gas Laws and Macroscopic Unification
Historical Synthesis of Boyle, Charles, Gay-Lussac, and Avogadro
Before Clapeyron formulated the combined equation of state in his 1834 memoir Mémoire sur la puissance motrice de la chaleur, experimental natural philosophers had independently characterized two-variable projections of gas behavior while holding the remaining state variables constant. In 1662, Anglo-Irish chemist Robert Boyle (working with Robert Hooke) demonstrated using a J-tube mercury manometer that the pressure of a fixed mass of air at constant temperature varies inversely with its volume (P ∝ 1/V, or P1V1 = P2V2). On a pressure–volume (P–V) diagram, curves of constant temperature therefore trace rectangular hyperbolas known as isotherms.
In the late 18th and early 19th centuries, Jacques Charles (1787) and Joseph Louis Gay-Lussac (1802) measured the thermal expansion of gases at constant pressure, finding that the volume of a fixed molar quantity of any permanent gas increases linearly with Celsius temperature t by a fractional expansion coefficient αV ≈ 1 / 273.15 °C−1. Defining an absolute temperature scale T = t + 273.15 K transforms this linear relation into the direct proportionality V ∝ T at constant P and n (Charles's law). Similarly, Guillaume Amontons (1702) and Gay-Lussac (1809) established that for a gas held in a rigid constant-volume vessel (an isochoric process), pressure scales directly with absolute temperature (P ∝ T). Finally, in 1811, Italian physicist Amedeo Avogadro proposed that equal volumes of all ideal gases at the same temperature and pressure contain equal numbers of molecules (V ∝ n at constant P and T). Combining these four partial derivatives into a single state function yields V ∝ nT / P, where the proportionality constant R is independent of the chemical identity of the gas.
Intensive Forms, Mass Density, and Dalton's Law of Partial Pressures
In continuum fluid mechanics, meteorology, and astrophysics, it is often advantageous to express the ideal gas law in terms of intensive state variables that do not depend on total system size. Substituting the molar mass M (in kg mol−1) and total gas mass m = nM into PV = nRT and dividing by volume V yields the density form of the equation of state:
P = (nM / V)(RT / M) = ρ Rspecific T
where ρ = m / V is mass density (in kg m−3) and Rspecific = R / M is the specific gas constant for a given substance or mixture (for dry Earth air with mean molar mass Md = 0.0289652 kg mol−1, Rd = 287.053 J kg−1 K−1). Because water vapor (H2O, Mv = 0.018015 kg mol−1) has a lower molar mass than dry air (predominantly N2 and O2), moist air at a given temperature and pressure is less dense than dry air—a buoyancy effect parameterized in atmospheric science via the virtual temperature Tv = T(1 + 0.608*q*), where q is specific humidity.
For a non-reactive multicomponent mixture of k ideal gases occupying volume V at temperature T, John Dalton's law of partial pressures (1801) states that each species i exerts an independent partial pressure Pi = niRT / V equal to the pressure it would exert if it occupied the entire container alone. Summing over all components gives the total pressure:
Ptotal = ∑i=1k Pi = (∑i=1k ni)(RT / V) = ntotal (RT / V)
Dividing Pi by Ptotal shows that the partial pressure of species i equals the product of its dimensionless mole fraction xi = ni / ntotal and total pressure: Pi = xiPtotal. In respiratory physiology, Dalton's law governs alveolar gas exchange: as dry atmospheric air (oxygen mole fraction xox = 0.2095 for O2) is inhaled and saturated with H2O vapor at body temperature (37 °C, where saturation water vapor pressure Pvap = 6.28 kPa = 47 mmHg), the inspired O2 partial pressure at sea level (Ptotal = 101.3 kPa = 760 mmHg) drops from 159 mmHg to Pinsp = 0.2095 × (760 − 47) = 149.4 mmHg before mixing with alveolar CO2.
| Empirical / Theoretical Relation | Mathematical Expression | Held Constant | Primary Physical Domain or Application |
|---|---|---|---|
| Boyle's Law (1662) | P1V1 = P2V2 | n, T | Isothermal compression/expansion, pulmonary mechanics |
| Charles's Law (1787) | V1 / T1 = V2 / T2 | n, P | Isobaric thermal expansion, gas thermometry |
| Gay-Lussac's / Amontons's Law | P1 / T1 = P2 / T2 | n, V | Isochoric pressure vessels, constant-volume gas thermometers |
| Avogadro's Law (1811) | V1 / n1 = V2 / n2 | P, T | Stoichiometric gas reactions, molar volume determination |
| Combined Ideal Gas Law (1834) | PV = nRT = NkBT | R, kB | General equation of state for dilute gases |
| Dalton's Law (1801) | Ptotal = ∑ Pi = ∑ xiPtotal | V, T | Atmospheric chemistry, alveolar O2/CO2 gas exchange |
| Van der Waals Equation (1873) | (P + *a*[n/V]2)(V − nb) = nRT | a, b, R | Real gases near condensation, critical point phenomena |
Microscopic Derivation from Kinetic Theory
Momentum Transfer and Wall Pressure
In the second half of the 19th century, Rudolf Clausius, James Clerk Maxwell, and Ludwig Boltzmann placed the empirical ideal gas law on a rigorous mechanical foundation through the kinetic theory of gases. Consider N identical molecules of mass m confined within a cubical container of side length L and volume V = L3. Under the ideal gas assumptions:
- The volume of the molecules themselves is negligible compared to V (the mean intermolecular spacing d = (V/N)1/3 is much larger than the molecular diameter σ).
- Molecules exert no long-range intermolecular forces on one another except during brief, elastic collisions.
- Molecular motion is isotropic and statistically random, obeying Newtonian mechanics.
When a single molecule moving with velocity vector v = (vx, vy, vz) strikes a rigid container wall perpendicular to the x-axis and rebounds elastically, its y and z momentum components remain unchanged while its x-component reverses from +*mv*x to −*mv*x, imparting a momentum impulse Δ*p*x = 2*mv*x to the wall. The molecule travels across the box and back (a distance 2*L*) between successive collisions with the same wall, corresponding to a collision time interval Δ*t* = 2*L* / vx. By Newton's second law, the time-averaged force exerted on that wall of area A = L2 by all N molecules is the sum of their individual momentum transfer rates:
Fx = ∑i=1N (Δ*p*x,i / Δ*t*i) = ∑i=1N [2*mv*x,i / (2*L* / vx,i)] = (m / L) ∑i=1N vx,i2 = *Nm*⟨*v*x2⟩ / L
where ⟨*v*x2⟩ denotes the ensemble mean of the squared x-velocity component. Because molecular velocities are isotropic in three-dimensional space, the mean squared velocity components along the three orthogonal axes are equal: ⟨*v*x2⟩ = ⟨*v*y2⟩ = ⟨*v*z2⟩ = (1/3)⟨*v*2⟩, where ⟨*v*2⟩ = ⟨*v*x2 + vy2 + vz2⟩ is the mean-square speed. Dividing the force Fx by the wall area A = L2 (with AL = L3 = V) yields the fundamental kinetic pressure equation:
P = Fx / L2 = (1/3)(N / V) *m*⟨*v*2⟩ = (2/3)(N / V)(½*m*⟨*v*2⟩)
Equipartition of Energy and Root-Mean-Square Speed
Comparing the mechanical pressure expression PV = (2/3)*N*(½*m*⟨*v*2⟩) with the microscopic ideal gas law PV = NkBT reveals the physical meaning of absolute temperature: the mean translational kinetic energy of a gas molecule moving through three-dimensional space is directly proportional to T and independent of molecular mass or chemical structure:
⟨*E*trans⟩ = ½*m*⟨*v*2⟩ = (3/2)*k*BT
This result is a direct manifestation of the classical equipartition theorem derived from the Boltzmann distribution, which assigns an average thermal energy of ½*k*BT to each quadratic degree of freedom f in the molecular Hamiltonian. Because a monatomic gas (such as He, Ne, or Ar) possesses only f = 3 translational degrees of freedom (x, y, z motion), its total internal energy is U = *N*⟨*E*trans⟩ = (3/2)*Nk*BT = (3/2)*nRT*, yielding a molar heat capacity at constant volume CV,m = (∂*U*/∂*T*)V = (3/2)*R* = 12.47 J mol−1 K−1. Linear diatomic molecules (such as N2 and O2 at 300 K) possess two additional rotational degrees of freedom (f = 5), giving U = (5/2)*nRT* and CV,m = (5/2)*R* = 20.79 J mol−1 K−1, while at constant pressure an ideal gas performs expansion work P d*V* = nR d*T*, resulting in Robert Mayer's relation CP,m − CV,m = R.
Solving the translational kinetic energy relation for molecular velocity defines the root-mean-square (rms) speed of gas particles moving at temperature T:
vrms = √⟨*v*2⟩ = √(3*k*BT / m) = √(3*RT* / M)
At T = 298.15 K (25 °C), lightweight molecular hydrogen (H2, M = 2.016 × 10−3 kg mol−1) exhibits vrms = 1,920 m s−1, whereas molecular nitrogen (N2, M = 28.013 × 10−3 kg mol−1) moves at vrms = 515 m s−1 and carbon dioxide (CO2, M = 44.01 × 10−3 kg mol−1) moves at vrms = 411 m s−1. The inverse-square-root dependence on molar mass (vrms ∝ M−1/2) directly explains Thomas Graham's law of effusion (1848), which governs isotopic gas separation (such as separating 235UF6 from 238UF6).
Atmospheric Scale Height and Real Gas Deviations
Barometric Formula and Hypsometric Scale Height
In planetary atmospheres, combining the ideal gas law P = ρ*RT* / M with the hydrostatic equilibrium equation d*P* / d*z* = −ρ*g* (where z is altitude and g is gravitational acceleration) yields the differential relation d*P* / P = −(Mg / RT) d*z*. For an isothermal atmosphere layer at temperature T, integrating from surface pressure P0 at z = 0 gives the barometric exponential decay profile:
P(z) = P0 exp(−*z* / H), where H = RT / (Mg) = kBT / (mg)
Here H is the atmospheric pressure scale height—the vertical distance over which atmospheric pressure and density decrease by a factor of e ≈ 2.718. For Earth's troposphere and lower stratosphere (T ≈ 255 K, M = 0.02897 kg mol−1, g = 9.80665 m s−2), the scale height is H ≈ 7.48 km (roughly 8.5 km near the warm surface at 288 K). This exponential barometric decay exp(−*z*/H) reflects the competition between downward gravitational potential energy mgz and upward thermal motion governed by the Boltzmann distribution.
Compressibility Factor and the Van der Waals Equation of State
At elevated pressures (where molecular crowding reduces free volume) or low temperatures approaching the condensation point (where intermolecular London dispersion and dipole-dipole attractions become comparable to the mean translational kinetic energy of the molecules), real gases deviate systematically from PV = nRT. Deviations are quantified by the dimensionless compressibility factor Z = PV / (nRT) = PVm / (RT). For an ideal gas, Z = 1 under all conditions. At moderate pressures, attractive intermolecular forces pull molecules together, reducing wall impact frequency and causing Z < 1 (for CO2 at 300 K and 50 bar, Z ≈ 0.74). At very high pressures (>200 bar for N2), short-range Pauli exclusion repulsions dominate, making the gas less compressible than an ideal gas (Z > 1).
In his 1873 doctoral dissertation at Leiden University, Johannes Diderik van der Waals introduced a two-parameter modification of the ideal gas law that accounts for both microscopic non-idealities:
(P + a [n / V]2)(V − nb) = nRT
The parameter b (in L mol−1) represents the excluded molar volume occupied by the finite hard-sphere cores of the molecules (equal to four times the proper volume of one mole of spherical particles), reducing the available container volume from V to V − nb. The parameter a (in L2 bar mol−2 or Pa m6 mol−2) accounts for pairwise attractive intermolecular forces: because both the spatial density of molecules near the container wall and the density of interior molecules pulling them backward scale with molar concentration n/V, the inward cohesive pressure reduction scales as a(n/V)2. Setting the first and second partial derivatives of P with respect to Vm equal to zero along the critical isotherm locates the gas-liquid critical point at Vc = 3*b*, Tc = 8*a* / (27*Rb*), and Pc = a / (27*b*2), yielding a universal critical compressibility factor Zc = PcVc / (RTc) = 3/8 = 0.375.
Frequently Asked Questions
Why must temperature always be in kelvins when using the ideal gas law?
The ideal gas law PV = nRT is a direct proportionality derived from the physical principle that gas pressure is proportional to the mean translational kinetic energy of the molecules, ½*m*⟨*v*2⟩ = (3/2)*k*BT. Zero thermal kinetic energy corresponds to absolute zero (0 K = −273.15 °C). Relative scales like Celsius or Fahrenheit have arbitrary zero points (such as the freezing point of H2O at 0 °C); substituting t = 0 °C or negative Celsius values into PV = nRT would falsely predict zero or negative pressures and volumes.
Under what temperature and pressure conditions do real gases deviate most from ideal behavior?
Real gases deviate most strongly from PV = nRT at low temperatures and high pressures, particularly near their liquefaction or critical point. At low temperatures, the mean translational kinetic energy of the gas molecules ((3/2)*k*BT) becomes small relative to intermolecular van der Waals or hydrogen-bonding potential energies (large parameter a), allowing attractive forces to cause clustering and condensation. At high pressures, the average distance between molecules shrinks until the volume of the molecules themselves (nb) becomes a substantial fraction of the total container volume V.
Why is moist air less dense than dry air at the same temperature and pressure?
By Avogadro's law and the ideal gas law (n/V = P/RT), a cubic meter of any ideal gas at a fixed temperature and pressure contains the same total number of molecules. Dry air consists primarily of diatomic nitrogen (N2, molar mass 28.01 g mol−1) and oxygen (O2, molar mass 32.00 g mol−1), giving dry air a mean molar mass of 28.97 g mol−1. When water vapor (H2O, molar mass 18.02 g mol−1) is added at constant P and T, lighter H2O molecules replace heavier N2 and O2 molecules, lowering the mixture's mean molar mass M and mass density ρ = PM / (RT).
References
- Clapeyron, É. (1834). "Mémoire sur la puissance motrice de la chaleur." Journal de l'École Polytechnique, 14(23), 153–190. https://gallica.bnf.fr/ark:/12148/bpt6k4336791/f157
- Clausius, R. (1857). "Über die Art der Bewegung, welche wir Wärme nennen." Annalen der Physik und Chemie, 176(3), 353–380. doi:10.1002/andp.18571760302
- van der Waals, J. D. (1873). Over de Continuiteit van den Gas- en Vloeistoftoestand (Doctoral dissertation). Universiteit Leiden. https://ilorentz.org/history/waals/tesi.pdf
- Atkins, P., & de Paula, J. (2014). Atkins' Physical Chemistry (10th ed., Chapter 1: "The Properties of Gases"). Oxford University Press. https://global.oup.com/academic/product/atkins-physical-chemistry-9780198769866