According to Charles's law, the volume of a gas is directly proportional to the number of molecules at constant temperature and pressure.