# Properties of Fluids-theoritical confusion

I am having a very basic confusion on how we calculate the height of atmosphere when we assume that the density does not change with altitude(density remains 1.29 kg/m$^3$).

I want to know why we say that in this case that the atmospheric pressure is $$P=\rho gh$$

I think my confusion here is if there is any pressure exerted on the atmosphere itself!

Because we can say in this question that $$P_{\text{on the atmosphere}}-P_{\text{by the atmosphere}}=\rho gh$$

Then if pressure on the atmosphere is 0 then my confusion is gone :) Otherwise please explain the same.

By the way the answer to the above question is about 8Kms.

Perhaps you're looking for the formula $$\nabla p = \rho \mathbf g$$ that relates the pressure gradient at any point with an acceleration field, which is usually taken to be gravity alone in many practical cases. If both $\rho$ and $\mathbf g$ are constant, then $\mathbf g$ comes from a potential $V=-\mathbf g\cdot\mathbf r$, so that $p= p_0+\rho\mathbf g\cdot\mathbf r$, where $p_0$ is any integration constant. Since $\mathbf g$ is pointing downward, the inner product $\mathbf g\cdot\mathbf r$ reduces to just $-g\Delta h$, where $\Delta h$ is assumed to be positive when measured w.r.t to a "ground" level and going upward. Hence the pressure profile at constant density and gravity is $$p = p_0 - \rho g h,$$ where $p_0$ is the pressure at $h=0$ (e.g. the pressure at sea level). As you go up, $h$ increases and therefore the pressure decreases, which physically corresponds to the fact that there is a shorter column of fluid at higher heights. Clearly, when there is no more fluid on top the $p$ must be zero, which leads to the equation $$p_0 = \rho g h$$ in $h$, and the solution is the total height of fluid.