Sub topic 2
The ideal gas equation PV = nRT and the gas laws
Prerequisites and scope
This chapter assumes you know the following:
- Pressure as force per unit area, with the SI unit pascal (Pa).
- The mole and Avogadro's number.
- The kelvin temperature scale from the previous chapter.
- Basic algebra, including taking ratios of equations.
It covers the equation of state of an ideal gas, the three classical gas laws as special cases, the ratio method for comparing two states, and the usual mistakes in JEE numericals.
The equation of state
An ideal gas is a gas whose state is fixed by four variables: pressure P, volume V, amount n (in moles) and absolute temperature T. They obey
$$PV = nRT$$
Here R is the universal gas constant, R = 8.314 J/(mol·K). The same law can be written per molecule:
$$PV = NkT, \qquad k = \frac{R}{N_A} = 1.38\times10^{-23}\ \text{J/K}$$
N is the number of molecules and N_A = 6.022 × 10²³ mol⁻¹. Two equivalent forms are often useful:
- Using mass m and molar mass M: PV = (m/M)RT, so the density is ρ = PM/(RT).
- Using number density nv = N/V: P = nv kT.
A real gas behaves almost ideally when it is at low pressure and high temperature. Molecules are then far apart and interact only during brief collisions.
Units and the value of R
The product PV has units of energy, so R carries joules. Choose the unit of R to match the units of P and V.
| P unit | V unit | R value |
|---|---|---|
| Pa | m³ | 8.314 J/(mol·K) |
| atm | litre | 0.0821 L·atm/(mol·K) |
| mmHg | litre | 62.4 L·mmHg/(mol·K) |
Useful conversions are 1 atm = 1.013 × 10⁵ Pa and 1 L = 10⁻³ m³. At STP (0 °C, 1 atm) one mole of an ideal gas occupies about 22.4 L.
The gas laws as special cases
Each classical law comes from holding two of the four variables fixed.
| Law | Held constant | Relation |
|---|---|---|
| Boyle | n, T | PV = constant |
| Charles | n, P | V/T = constant |
| Gay-Lussac | n, V | P/T = constant |
| Avogadro | P, T | V/n = constant |
Boyle's law gives a hyperbola on a P-V graph, called an isotherm. Charles's and Gay-Lussac's laws give straight lines through the origin when plotted against absolute temperature. If the same lines are plotted against temperature in °C, they cut the axis at −273.15 °C, which is how absolute zero was first estimated.
The ratio method
Most JEE problems give an initial state and ask for a final state. Write the equation for both states and divide:
$$\frac{P1V1}{n1T1} = \frac{P2V2}{n2T2}$$
R cancels, so you do not need to convert units, provided the same unit is used for each variable in both states. Temperature is the exception: it must always be in kelvin.
Worked example. A sealed cylinder holds a gas at 27 °C and 2.0 atm. It is heated to 127 °C. Find the final pressure.
Volume and amount are fixed, so P₁/T₁ = P₂/T₂. With T₁ = 300 K and T₂ = 400 K:
P₂ = 2.0 × 400/300 = 2.67 atm.
Using 27 and 127 directly would give 9.4 atm, which is wrong.
Finding mass, density and number of molecules
Rearranging the equation lets you obtain quantities that are not in the original four variables.
R = 8.314 # J/(mol K)
k = 1.381e-23 # J/K
def moles(P, V, T):
"""Moles of ideal gas for P in Pa, V in m^3, T in K."""
return P * V / (R * T)
def density(P, M, T):
"""Density in kg/m^3 for molar mass M in kg/mol."""
return P * M / (R * T)
P, V, T = 1.013e5, 1.0e-3, 300.0 # 1 atm, 1 litre, 300 K
n = moles(P, V, T)
print(f"n = {n:.4f} mol")
print(f"molecules = {n * 6.022e23:.3e}")
print(f"N2 density = {density(P, 0.028, T):.3f} kg/m^3")
print(f"molecules via P V / (k T) = {P * V / (k * T):.3e}")The last two lines print the same molecule count, which confirms that PV = nRT and PV = NkT are the same law.
Variable amount of gas
When gas leaks out or is added, n changes. The ratio method still works if you keep n in it. For a rigid container at constant temperature, P ∝ n, so the pressure falls in proportion to the amount of gas remaining.
For two connected vessels at the same temperature, the total amount is conserved:
$$n1 + n2 = n1' + n2'$$
Final pressure is the same in both vessels once the connecting tap is open. Apply PV = nRT to each vessel and then use conservation of n.
Common errors
- Using °C instead of K in any ratio or product.
- Mixing units, such as P in atm with R = 8.314.
- Forgetting that V in m³ is 10⁻³ times V in litres.
- Treating a "constant" law as universal: Boyle's law needs constant T, and it fails if the gas is heated or cooled during the process.
- Assuming 22.4 L per mole at any conditions. It applies only at 0 °C and 1 atm.
- Confusing n (moles) with N (molecules) when switching between R and k.
Reading graphs
Each pair of variables gives a recognisable graph for a fixed amount of gas.
| Process | Graph | Shape |
|---|---|---|
| Isothermal | P vs V | Hyperbola |
| Isothermal | P vs 1/V | Straight line through origin |
| Isobaric | V vs T | Straight line through origin |
| Isochoric | P vs T | Straight line through origin |
Slope is useful. On a P vs 1/V graph at fixed T, the slope is nRT. On a V vs T graph at fixed P, the slope is nR/P, so a lower pressure gives a steeper line.
Exercise
A 5.0 L vessel holds a gas at 300 K and 4.0 atm. A tap is opened and the gas escapes until the pressure is 1.0 atm at the same temperature. What fraction of the original moles has left, and how many moles remain? (Use R = 0.0821 L·atm/(mol·K).)
Show answer
At fixed V and T, P ∝ n, so the remaining fraction is 1.0/4.0 = 1/4 and 3/4 of the gas has left. Initial moles n = PV/RT = (4.0 × 5.0)/(0.0821 × 300) = 0.812 mol. Remaining moles = 0.812/4 = 0.203 mol.
Exercise
An ideal gas has density 1.25 kg/m³ at 1 atm (1.013 × 10⁵ Pa) and 273 K. Find its molar mass and identify it among N₂ (28 g/mol), O₂ (32 g/mol) and CO₂ (44 g/mol).
Show answer
M = ρRT/P = 1.25 × 8.314 × 273/(1.013 × 10⁵) = 0.0280 kg/mol = 28 g/mol, so the gas is N₂.