The geometric mean of two lengths
For two positive lengths x and y, the geometric mean is sqrt(x × y), the square root of their product. Geometrically, it is the side length of a square with the same area as an x by y rectangle. Because both inputs are measured in the same unit, the result keeps that unit: the geometric mean of 4 cm and 9 cm is sqrt(36 cm²) = 6 cm. Only dimensionless inputs, such as ratios or growth factors, produce a dimensionless geometric mean. To find the geometric mean of more than two values, use the geometric mean calculator.
The geometric mean theorem: h² = pq
Take a right triangle ABC with the right angle at C. Drop the altitude from C to the hypotenuse AB, and call its foot D. The altitude divides the hypotenuse into two segments, p = AD and q = DB, and its own length is h = CD. The geometric mean theorem, also called the right triangle altitude theorem, states that h² = p × q, so h = sqrt(p × q). In words, the altitude to the hypotenuse is the geometric mean of the two segments it creates. If you know the altitude and one segment, rearrange the formula to find the other segment: q = h² / p.
Hypotenuse and leg rules
With the same labels, the hypotenuse is the sum of the two segments: c = p + q. Let a = AC, the leg adjacent to segment p, and let b = BC, the leg adjacent to segment q. Then a² = c × p and b² = c × q, so a = sqrt(c × p) and b = sqrt(c × q). Each leg is the geometric mean of the whole hypotenuse and the segment next to it. Adding the two leg rules gives a² + b² = c × (p + q) = c², which is the Pythagorean theorem. Keep the labels consistent, because pairing a leg with the far segment gives the wrong length.
Worked example: p = 9 and q = 16
Suppose the altitude splits the hypotenuse into p = 9 cm and q = 16 cm. The altitude is h = sqrt(9 × 16) = sqrt(144) = 12 cm. The hypotenuse is c = 9 + 16 = 25 cm. The leg next to p is a = sqrt(25 × 9) = sqrt(225) = 15 cm, and the leg next to q is b = sqrt(25 × 16) = sqrt(400) = 20 cm. Two checks confirm these results. First, 15² + 20² = 225 + 400 = 625 = 25². Second, the area computed from the legs, (1/2) × 15 × 20 = 150 cm², equals the area computed from the hypotenuse and altitude, (1/2) × 25 × 12 = 150 cm².
Why it works: a short similarity proof
The altitude creates two smaller right triangles, ADC and CDB, each with its right angle at D. In triangle ABC, angle A = 90° - angle B. In triangle CDB, angle BCD = 90° - angle B. So angle A equals angle BCD, and the two small triangles are similar by angle-angle, with A matching C, D matching D, and C matching B. Corresponding sides are proportional, so AD / CD = CD / BD, which is p / h = h / q. Cross-multiplying gives h² = p × q. Comparing each small triangle with the original triangle ABC in the same way gives the leg rules. For a labeled diagram, the full proof, and a calculator, see the altitude theorem page.