|Effect of Temperature on Density
The effect of increasing the temperature of a substance is to decrease its density. Conversely, decreasing the temperature has the effect of increasing the density. Thus, the density of air varies inversely as the absolute temperature varies. This statement is true only at a constant pressure.
In the atmosphere, both temperature and pressure decrease with altitude, and have conflicting effects upon density. However, the fairly rapid drop in pressure as altitude is increased usually has the dominating effect. Hence, we can expect the density to decrease with altitude.