Starting with the Ideal Gas Law
Why does pressure change as you go up a mountain? Because goes down, this is due to gravity pulling the molecules down. So it would be relevant to know how the number density depends on gravity and height. Generally and . We can look at an infinitesimally small portion of volume where the number density becomes
with , where A is the area of the column of volume being analyzed. Assume the gas is at rest macroscopically, the net force is zero. If the force on each molecule was only then the molecules would all fall down, there must be some force in the direction. The gas below the column is providing some pressure upwards. The mechanical equilibrium condition,
The force pressing down from the molecules above the column is in the direction and the force pressing up from the molecules below the column is in the direction.
The number of molecules is . The expression becomes,
dividing by ,
The second term is just the definition of the derivative in the limit that goes to zero
Using the ideal gas law
Determining integration constant by setting
The ratio becomes
Notice that the pressure has the same ratio