The Ideal Gas Law. The ideal gas law relates the variables of pressure, volume, temperature, and number of moles of gas within a closed system. The ideal gas law takes the form: PV nRT. P Pressure of the confined gas in atmospheres. V Volume of the confined gas, in liters. n Number of moles of gas.