The second formula says pressure depends only on depth — not on the shape of the container or the total amount of liquid. A narrow tube and a wide lake of the same depth have the same pressure at the bottom.
Pressure acts equally in all directions at a point, which is why it pushes sideways on the walls of a container just as it pushes down on the base.
Gauge pressure is $\rho gh$ alone — the amount above atmospheric. Absolute pressure includes $P_0$. Read the question carefully to see which is wanted.
The two main ideas of the chapter, drawn side by side. Left: the pressure arrows get longer with depth, and only with depth — a container that bulges or narrows changes nothing. Right: a narrowing pipe forces the flow to be faster (the continuity equation), and where the flow is faster the pressure is lower (Bernoulli). The second part is where intuition often fails: many people guess that the narrow section is “squeezed,” so the pressure must be high.
Worked example: pressure at the bottom of a tank
A water tank is $3$ m deep, $\rho=1000$ kg/m³, $P_0=1.0\times10^5$ Pa. Find the absolute pressure at the bottom. Take $g=10$.
Notably, $3$ m of water adds only $30\%$ to atmospheric pressure. You must go down about $10$ m to add one more atmosphere.
Common mistake
The pressure at the bottom does not depend on the area of the bottom or on the amount of water. But the force on the bottom does: $F=PA$. These are two different questions, and exams often ask them back to back to test whether you can tell them apart.
Key takeaway
$P=P_0+\rho gh$, depends only on depth. Pressure acts equally in all directions. Distinguish gauge pressure from absolute pressure.