Boyle's law states that the volume of a gas is inversely proportional to its pressure when temperature is kept constant. Charles's law states that the volume of a gas is directly proportional to its temperature when pressure is kept constant. An ideal gas obeys both Boyle's law and Charles's law, such that its volume is directly proportional to temperature and inversely proportional to pressure, as expressed by the equation PV=nRT.