Why does a gas press on its container?
Seal air in a container and it keeps pushing on the walls. At the particle scale, though, there is no layer continuously leaning against them. We see particles moving about and briefly striking a wall. How can such short collisions produce the pressure we measure continuously?
Follow one particle until it hits a wall and turns back. Recall the collision page: mass multiplied by velocity, including direction, gives momentum. Reversing direction changes the particle’s momentum. The wall exerts a force on the particle, and the particle exerts a force on the wall. One particle does not collide continuously, but enormous numbers take turns. Together, their impacts produce a sustained effect. The force per unit area is the pressure we want to explain.
Now raise the temperature and compare the motion. Keep an eye on the group, not only that first particle: one unusually fast or slow particle cannot represent the whole gas. For the ideal gas here, higher temperature means greater average energy of particle motion, called kinetic energy. We will connect those small, invisible collisions to quantities we can measure outside the container.
1 · From one collision to pressure
A moving molecule rebounds from a wall. To describe how much motion it carries in one direction, multiply its mass by its velocity in that direction: this is momentum. Velocity has a direction, so reversing it changes momentum even if the speed stays the same. A force is needed to produce that change; here the wall supplies it. The molecule exerts an opposite force on the wall. Many impacts, spread over the surface and over time, give a nearly steady push.
Pressure means force divided by area. The same total force acting on half the area gives twice the pressure. In the model, blue dots represent a sample of molecules; a short amber ring marks an impact. The transparent box is the container. Start the motion and follow the impacts before changing anything.
2 · Change V, n and T; observe p
is the volume available to the gas. is the amount of gas, measured in moles: one mole contains about particles. is the absolute temperature, measured in kelvin. Pressure is calculated from the equilibrium ideal-gas law. The sliders set separate equilibrium states; resizing the box is not a simulation of compression without heat exchange.
More gas adds more markers; higher temperature increases their typical speed in proportion to . The cube side scales as the cube root of . Markers are enlarged and motion is slowed; they do not count all the real molecules. The pressure readout is , not a noisy estimate from these few dots.
First keep and , then change from 24 L to 12 L: pressure doubles. Reset. Double while holding and fixed: more molecules deliver more momentum to the same wall. Reset again and double from 300 K to 600 K: pressure doubles, while a typical molecular speed rises only by . Temperature and speed are not the same quantity.
Check: double both V and n. What happens to p?
At unchanged T, the effects cancel: (2n)RT/(2V) = nRT/V. The density of particles and the pressure stay the same. Try 48 L and 2 mol, and compare the readout with the initial state.
3 · Why these three controls belong in one equation
Experiments on dilute gases give three relationships. At fixed n and T, p is inversely proportional to V. At fixed V and T, p is proportional to n. At fixed V and n, p is proportional to the kelvin temperature T. These are empirical relationships, not consequences of the sliders.
Combining them says that pV/(nT) is constant for an ideal gas. We call that constant R. Multiplying both sides by nT gives pV = nRT; dividing by V gives the pressure we want to predict.
Here . A kilopascal times a litre equals a joule, so this matches the usual SI value. Temperature must be in kelvin: , where is the Celsius temperature and is the kelvin temperature. Doubling a Celsius reading does not double absolute temperature. The first line below is the initial state; the second uses your current settings.
4 · Connect the equation to the collisions
For this derivation, consider a cube with side L and a molecule of mass m. Its velocity component perpendicular to one wall is vₓ. An elastic rebound reverses that component, transferring momentum 2m|vₓ| to the wall. To hit the same wall again it travels to the opposite wall and back, a perpendicular distance 2L. The time is therefore 2L/|vₓ|. Momentum transferred per unit time gives its average force.
Add this force for molecules, then divide by the wall area . Since , we obtain . Angle brackets mean an average over the molecules. Here are velocity components along three perpendicular directions, and is speed. Pythagoras gives . Average both sides over the molecules. At thermal equilibrium with no bulk flow and no preferred direction, the three squared-component averages are equal. Their sum is , so each is one third: . The ordinary average can be zero because opposite directions cancel; its square is not the average of .
Classical equilibrium statistical mechanics gives the next link: mean translational kinetic energy is 3kBT/2, where kB is Boltzmann’s constant. We use this result here rather than deriving statistical mechanics. Substitute it into the pressure expression. Finally N = nNA and R = NAkB, where NA is the number of particles per mole. This recovers the same gas law.
5 · Where the model stops being accurate
An ideal gas neglects molecular size and intermolecular forces except during elastic collisions. This is often useful at low density, away from condensation. At high density or near a liquid–gas transition, real gases can depart substantially from pV = nRT. The animation shows wall collisions only; it does not resolve intermolecular collisions, thermalisation or a real compression process.
