Geometric mean theorem

area of grey square = area of grey rectangle:

In Euclidean geometry, the right triangle altitude theorem or geometric mean theorem is a relation between the altitude on the hypotenuse in a right triangle and the two line segments it creates on the hypotenuse. It states that the geometric mean of those two segments equals the altitude.