Recall the definition of density. Density (d) is equal to mass (m) over volume (v). Hence, you can write "d = m/v."
Rewrite the definition of density to create a definition of volume. Multiply the definition of density on both sides by volume to yield "vd = m." Then divide both sides of this relation by d to yield "v = m/d," or volume equals mass over density.
Recall the ideal gas law. The ideal gas law demonstrates the relationship between pressure, volume, temperature and amount of gas. You can write the ideal gas law as "pv = nrt." In this equation, p is pressure, v is volume, n is amount of gas, r is the gas constant (see resources) and t is temperature.
Combine the ideal gas law with the definition of volume to get the equation "pm/d = nrt."
Solve this new way of writing the ideal gas law for density. Do this by multiplying both sides of the equation by d and then dividing both sides by nrt. You will end up with "d = pm/(nrt)," or density equals pressure times the quantity m/nrt.
Find the density for a given condition by substituting the variables of your condition for p, m, n and t. Conceptually, density is directly related to pressure but moderated by a factor of m/(nrt). If your pressure increases while mass, amount of gas and temperature remain the same, your density must increase as well.