The ideal gas law is used when no variables are held constant. The ideal gas law is expressed as PV = nRT, where P is pressure, V is volume, n is the number of moles of gas, R is the ideal gas constant, and T is temperature. This law relates the pressure, volume, temperature, and amount of gas in a system without holding any variables constant.