Squeeze a gas and the pressure rises. Heat it and the pressure rises. Pump in more gas and the pressure rises. One equation captures all three effects at once.
Ideal Gas Law
Change n, T and V and watch the pressure respondPV = nRT
P = nRT / V
Using R = 0.08206 L·atm/(mol·K), with n in moles, V in litres and T in kelvin, this gives pressure in atmospheres. The simulation also shows kilopascals and the root-mean-square molecular speed.
What each variable actually does
- n (amount) — more molecules in the same space means more collisions with the walls, so more pressure. Double n and you double P.
- T (temperature) — temperature is molecular kinetic energy. Raising T makes molecules move faster, so they hit the walls harder and more often. Note the speed scales as √T, not T: to double the speed you need four times the temperature.
- V (volume) — shrinking the container crowds the same molecules into less space, so collisions become more frequent. Halve V and you double P.
Notice something important when you change the volume: the molecular speed in the readout does not budge. Squeezing a gas does not make its molecules move faster — it only makes them hit the walls more often. Only temperature changes their speed.
Try this
- Set T to 300 K and sweep the volume. The marker traces a hyperbola — Boyle’s law, P ∝ 1/V.
- Double the temperature from 300 K to 600 K at fixed volume. Pressure doubles, but the molecular speed only rises by a factor of 1.41.
- Press Freeze · 100 K. The molecules slow to a crawl and the pressure collapses.
Why it matters
This equation explains why a sealed container can burst in a fire, why aircraft cabins must be pressurised, why a bicycle tyre feels harder on a hot afternoon, and why a weather balloon expands as it climbs into lower pressure. It is not perfectly accurate — real molecules have volume and attract each other slightly — but at ordinary pressures it is remarkably close.