A simple theory of a gas
The atoms or molecules in a gas are widely separated from one another and interact only when they collide. Each one changes its direction of travel only in collisions. This theory of a gas relates macroscopic quantities that we can measure (such as pressure, volume and temperature) to the motion of its molecules. Developed in the nineteenth century, it is called 'kinetic theory' because the molecules are always in motion.
Suppose the pressure of the gas on the walls is produced by the impact of bombarding molecules. Attach a pressure gauge to the box and read the pressure.
Now suppose that you put more and more molecules into the box until there are twice as many as before. The picture below shows a microscopic demon popping in additional molecules one by one, through a trap door.
When there are twice as many molecules as before, what pressure would you expect? With twice as many molecules to bombard the walls, you might expect double the pressure.
Of course with more molecules, collisions would also happen more often in the middle of the box. But those internal collisions would not affect the bombardment of the walls, for the following reason. Suppose there are two molecules moving in opposite ways, heading for opposite ends of the box, where each will add its contribution to the pressure. If they do not collide, but just pass each other, each will arrive at its target end. If they do collide head-on, they will rebound, elastically. Then each of them takes on the other one’s job and does what the other would have done without a collision.
Therefore, you might expect double the number of molecules to produce double the pressure. Yet all the pressure gauge can notice is a doubling of the local population of molecules, in other words, a doubling of density.
There is another way that you could double the density. Push the end wall of the box in, as a piston, so that the air occupies half the volume. Result: the pressure gauge would show the pressure doubling. So collision theory leads to a prediction: Halving the volume of a gas will double its pressure. Does experiment confirm this is true?
Robert Boyle did an experiment to investigate the relationship between pressure and volume more than three centuries ago. He was not testing a theory, but simply taking measurements. In 1661 he announced his result ‘concerning the spring of air’ to the Royal Society. It is now called ‘Boyle’s law’. Provided the temperature is kept constant, the product of gas pressure and volume is constant.
Real gases do not behave in this ideal way. Molecules are not point-like particles, and there are likely to be so many of them in the box that space for movement is reduced. Molecules move a shorter distance to and fro. Bombardments happen a little more often, and the pressure is a little larger than for point-like particles.
Also molecules attract each other when they are fairly close, as surface tension shows. This effect decreases gas pressure when molecules are crowded close together and moving slowly, at low temperatures. Some of the slowest molecules are weeded out and never reach the walls. There is a less dense layer near the walls and that exerts smaller pressure.
In real gases, both of these effects are found at high pressure and small volumes, but they can be distinguished because they change in different ways with temperature. At low temperatures the effects of molecule size remain much the same, but the effects of attraction make themselves felt so strongly that gases can liquefy.