In any column of fluid (water or gas), the pressure decreases as altitude increases because the fluid pressure is proportional to the weight of the fluid above the point of measurement (given that pressure is results from the weight of the fluid above, pressing downward). The way the pressure decreases with increasing altitude, however, will depend on whether we are looking at water or a gas.
In a column of water, gravity acts downward on the molecules of water, so the molecules at the top of the column are pressing on the molecules at the bottom. Since water is not compressible, the density of the water throughout the column should be the same, because the spaces between the molecules cannot be compressed away by the weight of the water above. Gases, on the other hand, can be compressed, so their densities will be increased by the compression. | In a gas, however, the weight of the gas in the upper part of the column will push down on the gas near the bottom, and this force will compress the gas in the lower part of the column and raise the density. The upper part of the column will not be as compressed as the bottom because there is less weight above. Thus, the density of the column of gas will decrease as you go from the bottom to the top. |
This means that most of the mass of the gas will be concentrated
near the bottom of the column, and the pressure will decrease with increasing
height in proportion to the amount of mass one passes by while going upward.
The pressure (and density) will decrease very rapidly in the first few kilometers
up from the ground, then decrease much less rapidly.
In fact, we will lose about 90% of the surface pressure after going up only
about 15-20 km, while the last 10% will be lost going from there up to about 500
km. This suggests that nearly 90% of the total mass of the atmosphere is located
in the Earth's troposphere.