Hydrostatic pressure is the pressure distribution in a resting fluid, balancing its body force from gravity. Take upward and a uniform downward gravitational field , where . The vertical pressure gradient satisfiesA short derivation balances the vertical forces on a thin horizontal layer of area and thickness : . Dividing by and taking the derivative gives the equation above. For constant mass density , integration from the surface at givesThus pressure increases with depth . For the stipulated water with mass density and gravitational acceleration , depths and give gauge pressures and . Their difference produces the buoyancy of the example cube. [ref]
https://www.feynmanlectures.caltech.edu/II_40.html#Ch40-S1. Feynman Lectures, II §40-1: hydrostatics
New to topics? Read the docs here!