The speed of molecules in a gas is inversely proportional to the square root of its temperature. This means that as the temperature of a gas decreases, the speed of its molecules also decreases. When the temperature of a gas reaches its boiling point, the molecules have enough energy to overcome the intermolecular forces holding them together and the gas changes into a liquid.