Why is the pressure same in a horizontal plane in a static fluid?

One of the common explainations involve a cylindrical flask filled with fluid and Newton's second law. But such explainations is specific. What could be possible explanation in a case in which the fluid is filled in some randomly shaped flask?

• You're talking not about a pressurized container but pressure in a fluid due to gravity, right? Without even attempting a rigorous physical explanation, doesn't it seem reasonable and unsurprising that the constant pressure surfaces in a liquid should be perpendicular to the pull of gravity regardless of the shape of the fluid container? – Samuel Weir Sep 4 '18 at 16:48

Suppose that you have a very small ball at depth h in the liquid. Suspending disbelief, imagine that the ball expands by a volume $\Delta V$. The net result will be that a volume $\Delta V$ of liquid rises to the surface from depth h. Now if we have an ideal frictionless liquid, and neglect atmospheric pressure (which can easily be re-instated)

Work done on fluid by expanding ball = Grav. PE gained by volume $\Delta V$, $$\text{so}\ \ \ \ \ \ \ \ \ \ \ \ \ \ p \Delta V = (\rho\ \Delta V) g h\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ,$$ $$\text{that is} \ \ \ \ \ \ \ \ \ \ \ \ p = \rho g h\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \.$$ $\rho$ is the density of the liquid, so $\rho\ \Delta V$ is the mass of the volume $\Delta V$ displaced. The left hand side, $p \Delta V$, is the usual formula for the work done by a piston ($F\ \Delta r= (pA)\ \Delta r = p(A\ \Delta r) = p\ \Delta V$); the piston area is A, but its shape (in this case spherical!) doesn't matter.

Not only do you now have the familiar $h \rho g$ formula for pressure (don't forget to add atmospheric!), but you see that it doesn't depend on the shape of the container!

Let's take two random points, $x_1$ and $x_2$, lying in the same horizontal plane in a liquid inside a randomly shaped flask.

Now let's draw a very skinny right circular horizontal cylinder, such that points $x_1$ and $x_2$ lie in the centers of its two circular bases , each having area A. The only horizontal forces acting on the two bases of the cylinder are $p_1A$ and $p_2A$. Since the bases of the cylinder are very small, we assume here that the pressure at each of the bases is uniform.

Naturally, for the cylinder to be in static balance, $p_1A$ has to be equal $p_2A$, and, therefore, $p_1$ has to be equal $p_2$.

If, due to a complex shape of the flask, points $x_1$ and $x_2$ cannot be connected directly, we'll draw a series of horizontal and vertical cylinders going down from both points until a direct horizontal connection can be made. Then, we'll apply the same logic we used earlier for each horizontal cylinder and the same logic you have referred to for each vertical cylinder. 