Solubility and Solubility Curves showed most solids dissolving better in hot water. Gases do the opposite, and they also respond to something solids ignore: the pressure of the gas above the liquid, the Gas Pressure of that one gas.
Key idea
Henry's law: at a fixed temperature, the concentration of a dissolved gas is proportional to its partial pressure above the liquid, $$C = k_\text{H}\,P_\text{gas}.$$ At $25^\circ\text{C}$ in water, $k_\text{H}$ is about $1.3 \times 10^{-3}$ for $\mathrm{O_2}$, $6.4 \times 10^{-4}$ for $\mathrm{N_2}$ and $3.3 \times 10^{-2}\ \text{mol/(L·atm)}$ for $\mathrm{CO_2}$. Gases dissolve less as the water warms.
Why it works
At equilibrium, gas molecules enter the liquid as fast as they leave. The rate of entering is proportional to how often molecules hit the surface, which is proportional to the gas's pressure; so doubling the pressure doubles the dissolved amount. Warming the water gives dissolved molecules more energy to escape, and dissolving a gas releases heat (its molecules give up their freedom and are attracted to the water), so higher temperature shifts the balance toward the gas. That is why a warm soda goes flat faster, and why warm water holds less oxygen for fish.
Worked example: Oxygen in a lake
Air is about 21% oxygen, so at 1 atm $P_{\mathrm{O_2}} = 0.21\ \text{atm}$. Find the concentration of dissolved $\mathrm{O_2}$ in water at $25^\circ\text{C}$, in mol/L and in mg/L.
- $$C = k_\text{H}P = (1.3 \times 10^{-3})(0.21) = 2.7 \times 10^{-4}\ \text{mol/L}$$
- $$2.7 \times 10^{-4}\ \text{mol/L} \times 32.00\ \text{g/mol} = 8.7 \times 10^{-3}\ \text{g/L} = 8.7\ \text{mg/L}$$
Answer: $2.7 \times 10^{-4}\ \text{M}$, about $9\ \text{mg/L}$.
Worked example: A sealed soda
A soda is bottled under $2.5\ \text{atm}$ of $\mathrm{CO_2}$. How much $\mathrm{CO_2}$ is dissolved at $25^\circ\text{C}$, and what happens when the cap comes off?
- $C = (3.3 \times 10^{-2})(2.5) = 0.083\ \text{mol/L}$.
- Open air has only about $4 \times 10^{-4}\ \text{atm}$ of $\mathrm{CO_2}$, so the equilibrium amount falls about 6000-fold. The extra gas comes out of solution as bubbles.
Answer: $0.083\ \text{M}$; most of it slowly escapes once opened.
Henry's law uses the gas's own partial pressure, not the total pressure. In air at 1 atm, oxygen's share is 0.21 atm and nitrogen's 0.78 atm, so each dissolves according to its own share and its own $k_\text{H}$. The law holds well for gases that don't react much with the solvent and at modest pressures.
Common mistake
Applying "hotter water dissolves more" to gases. For most solids that is true, but gases dissolve less as water warms. Check with experience: a glass of cold water left in a warm room grows bubbles on its sides as the dissolved air comes out.