Consider a liquid of density ρ in a vessel as shown in figure.
To find: Pressure difference between two points A and B separated by vertical height h.
Consider an imaginary cuboid of area of cross-section a of liquid with upper and lower cap passing through A and B respectively in order to evaluate the pressure difference between points A and B.
Volume of the imaginary cylinder is, V = ah
Mass of liquid of imaginary cylinder, m = ρah
Let, P1 and P2 be the pressure on the upper and lower face of cylinder.
Forces acting on the imaginary cylinder are:
(i) Weight, mg = ρahg in vertically downward direction.
(ii) Downward thrust of F1 =P1a on upper cap.
(iii) Upward thrust of F2 = P2a on lower face.
As the imaginary cylinder in the liquid is in equilibrium, therefore the net force on the cylinder is zero.
Thus, the pressure difference between two points separated vertically by height h in the presence of gravity is ρgh.
Note: In the absence of gravity this pressure difference becomes zero.