Unlike a solid or liquid, a gas does not necessarily expand when heated.
That is because its volume depends on the container it is in.
When dealing with a fixed mass of gas, there are always three factors to consider:
pressure
volume
temperature
Depending on the circumstances, a change in temperature can produce a change in pressure, or volume, or both.
How pressure changes with temperature (at constant volume)
In the experiment on the right, air is trapped in a flask of fixed volume.
The temperature of the air is changed in stages by heating the water - or putting a hotter or colder material (melting ice, for example) in the container.
At each stage, the pressure is measured on the gauge.
The table below shows some typical readings:
As the temperature of the air rises, so does the pressure. This is because the molecules move faster. There is a greater change in momentum when they hit the sides of the flask, so a greater force:
The cylinders used for storing gas are strong enough to withstand any extra pressure due to normal rises in temperature.
It is dangerous to throw aerosol cans on bonfires because they might burst.
However, that is mainly because more of the liquid propellant in the can turns to gas.
Comparing expansions of solids, liquids, and gases
At constant pressure, gases expand much more than liquids which, in turn, expand more than solids.
For example, for the same volume of material and the same rise in temperature (starting at room temperature):
Water expands 7 times as much as steel
Air (at constant pressure) expands 16 times as much as water.
It is the strength of the attractions between the particles (molecules, for example) that makes the difference. In a solid, the attractions are very strong.
If the temperature rises and the particles move faster, this has very little effect on their separation because they are so tightly held together.
In a liquid, the attractions are weaker, so the expansion is greater.
In a gas, the attractions are extremely weak, so the expansion is much more.
Before its flight, this balloon is tilled with cold air using a motorized fan. Then the gas burner raises the temperature of the air to 100 °C or more. There is no change in pressure (it stays at atmospheric), but a large increase in volume.