The ideal gas law says what a gas does. Kinetic theory explains why, from Newton's laws applied to the molecules. The payoff is a surprising fact: temperature measures the average kinetic energy of the molecules.
Why it works
Put $N$ molecules of mass $m$ in a cube of side $L$. One molecule with $x$-velocity $v_x$ bounces off the right wall, and its momentum changes by $2mv_x$. It returns every $2L/v_x$ seconds, so its average force on that wall is $\dfrac{2mv_x}{2L/v_x} = \dfrac{mv_x^2}{L}$. For all $N$ molecules, divide by the wall's area $L^2$: $P = \dfrac{Nm\overline{v_x^2}}{L^3}$. The motion is random in three directions, so $\overline{v_x^2} = \tfrac{1}{3}\overline{v^2}$, and $$PV = \tfrac{1}{3}Nm\overline{v^2} = \tfrac{2}{3}N\left(\tfrac{1}{2}m\overline{v^2}\right).$$ Compare $PV = Nk_BT$: the average kinetic energy of a molecule is $\tfrac{3}{2}k_BT$.
Key idea
$\bar K = \tfrac{1}{2}m\overline{v^2} = \tfrac{3}{2}k_BT$, the same for every gas at the same temperature. The rms speed is $v_{\text{rms}} = \sqrt{\dfrac{3k_BT}{m}} = \sqrt{\dfrac{3RT}{M}}$ ($M$ in kg/mol). A monatomic ideal gas stores $U = \tfrac{3}{2}nRT$.
Worked examples
Worked example: Energy of one molecule
Find the average kinetic energy of a gas molecule at $300\,\text{K}$ (about room temperature).
- $\bar K = \tfrac{3}{2}k_BT = \tfrac{3}{2}(1.38 \times 10^{-23}\,\text{J/K})(300\,\text{K})$.
- $\bar K = 6.21 \times 10^{-21}\,\text{J}$, whether the gas is helium or carbon dioxide.
Answer: $6.21 \times 10^{-21}\,\text{J}$
Worked example: How fast is air?
Find the rms speed of nitrogen molecules ($M = 28.0\,\text{g/mol}$) at $300\,\text{K}$.
- Molar mass in SI: $M = 0.0280\,\text{kg/mol}$.
- $v_{\text{rms}} = \sqrt{\dfrac{3RT}{M}} = \sqrt{\dfrac{3(8.31)(300)}{0.0280}} = \sqrt{2.67 \times 10^{5}}\,\text{m/s}$.
- $v_{\text{rms}} = 517\,\text{m/s}$, faster than the speed of sound in air.
Answer: $517\,\text{m/s}$
Worked example: Internal energy
How much internal energy is stored in $2.0\,\text{mol}$ of helium at $300\,\text{K}$?
- Helium is monatomic, so its internal energy is the kinetic energy of its atoms: $U = N\bar K = \tfrac{3}{2}nRT$.
- $U = \tfrac{3}{2}(2.0)(8.31)(300) = 7.48 \times 10^{3}\,\text{J}$.
Answer: $7.48\,\text{kJ}$
Common mistake
Thinking every molecule moves at the same speed, or that heavier molecules at the same temperature carry more kinetic energy. Speeds spread out widely (the histogram), and $v_{\text{rms}}$ is only a typical value. At one temperature every kind of molecule has the same average kinetic energy; a heavy molecule pays for its mass by moving more slowly. Check: in $\tfrac{3}{2}k_BT$ there is no mass.
Molecules with two or more atoms can also spin, which stores extra energy. So $U = \tfrac{3}{2}nRT$ is for monatomic gases such as helium, neon and argon; air near room temperature stores about $\tfrac{5}{2}nRT$.