Geometric Mean Altitude Theorem Calculator — h = √(p × q) with Proof
The Geometric Mean Altitude Theorem states that the altitude drawn from the right angle of a right triangle to its hypotenuse equals the geometric mean of the two hypotenuse segments it creates. Formula: h = √(p × q). Example: segments p = 4 and q = 16 → h = √(4 × 16) = √64 = 8. Hypotenuse = p + q = 20. Verify with the Pythagorean theorem on each sub-triangle: √(4² + 8²) = √80 = 4√5 and √(8² + 16²) = √320 = 8√5. This calculator solves for h, or rearranges to find a missing segment when h and one segment are known.
Client-side
Geometric mean of hypotenuse segments
Before you calculate
The Geometric Mean Altitude Theorem states that the altitude drawn from the right angle of a right triangle to its hypotenuse equals the geometric mean of the two hypotenuse segments it creates. Formula: h = √(p × q). Example: segments p = 4 and q = 16 → h = √(4 × 16) = √64 = 8. Hypotenuse = p + q = 20. Verify with the Pythagorean theorem on each sub-triangle: √(4² + 8²) = √80 = 4√5 and √(8² + 16²) = √320 = 8√5. This calculator solves for h, or rearranges to find a missing segment when h and one segment are known.
Best forCalculating the altitude to the hypotenuse in a right triangle when both hypotenuse segments are known. Also solves for a missing segment p or q when h is given. Useful for geometry homework, similarity proofs, and Euclidean mean visualizations.InputTwo positive hypotenuse segment lengths p and q (the lengths that the altitude creates on the hypotenuse, not the triangle’s legs). Both must be greater than zero.OutputAltitude h = √(p × q), full hypotenuse length (p + q), segment ratio p : q, and the geometric mean value alongside the arithmetic mean for comparison.
Three connections the altitude theorem reveals
h = √(pq) is more than a formula — it is the geometric mean definition made visible in a triangle, a proof of AM-GM inequality, and the key to unlocking all triangle measurements from just two numbers.
AA similarity proof
Why three triangles sharing two angles produce h = √(pq)
Dropping altitude CD from right angle C to hypotenuse AB creates triangle ACD and triangle CDB. Both sub-triangles share a right angle (at D) and one angle with the original triangle: ACD shares angle A with ABC; CDB shares angle B with ABC. Two equal angles (AA) force similarity. From ACD ~ CDB: AD/CD = CD/DB → p/h = h/q → h² = pq → h = √(pq). For p = 9, q = 4: h = 6. Both sub-triangles are similar to ABC (angles 90°, arctan(2/3), arctan(3/2)).
AM-GM connection
The altitude is always shorter than the average of the two segments
By the AM-GM inequality, (p+q)/2 ≥ √(pq), with equality only when p = q. The arithmetic mean of the hypotenuse segments is always at least as long as the altitude. For p = 4, q = 16: AM = 10, GM = h = 8 — the altitude is 20% shorter than the midpoint of the hypotenuse. For p = q = 9: AM = GM = h = 9 (isoceles right triangle — the altitude equals the midpoint).
Full triangle from two numbers
p and q determine everything about the triangle
Once p and q are known: altitude h = √(pq); hypotenuse = p+q; leg a = √(p(p+q)); leg b = √(q(p+q)). For p = 4, q = 16: h = 8; hypotenuse = 20; leg a = √80 = 4√5 ≈ 8.94; leg b = √320 = 8√5 ≈ 17.89. Pythagorean check: 80 + 320 = 400 = 20² ✓. Two input numbers fully define a right triangle.
Which version of the altitude theorem applies to your problem
Identify which value is unknown, then pick the correct form. All examples use the same triangle (p=4, q=16, h=8) for direct comparison.
Situation
Input
Best next move
Why
Find altitude h from both segments
p = 4, q = 16
h = √(4×16) = √64 = 8
Direct application of the geometric mean altitude theorem.
Find missing segment q from h and p
h = 8, p = 4
q = h²/p = 64/4 = 16 ✓
Rearrange h² = pq: divide both sides by p.
Find a leg of the original triangle
p = 4, q = 16, hypotenuse = 20
leg a = √(p × hyp) = √(4×20) = √80 ≈ 8.94
Use the geometric mean leg theorem — different from the altitude theorem.
Non-right triangle or altitude not to hypotenuse
Triangle with no 90° angle
Do not use this theorem
AA similarity requires a right angle at C. Without it, h/p ≠ q/h and h ≠ √(pq).
Step-by-step: how to use this calculator correctly
01
Identify the right angle in the triangle. The altitude must be drawn from this vertex perpendicular to the hypotenuse — not from any other vertex.
02
Label the two segments the altitude creates on the hypotenuse as p (shorter) and q (longer), or enter them in any order — h = √(p×q) is symmetric.
03
Enter p and q. Both must be positive real numbers. The formula is undefined for zero or negative segment lengths.
04
Read h as the altitude length. Verify: h² should equal p × q exactly. For p = 4, q = 9: h² = 36 and h = 6. Check: 4 × 9 = 36 ✓.
05
If you need a missing segment instead: rearrange h² = pq → p = h²/q or q = h²/p. For h = 6 and q = 9: p = 36/9 = 4 ✓.
Three ways to use the altitude theorem: solve for h, p, or q
Given
Right triangle ABC with right angle at C. Altitude CD meets hypotenuse AB at D.
Work
Case 1 (find h): AD = p = 4, DB = q = 16 → h = √(4×16) = √64 = 8. Case 2 (find q): h = 8, p = 4 → q = h²/p = 64/4 = 16 ✓. Case 3 (find p): h = 8, q = 16 → p = h²/q = 64/16 = 4 ✓.
Result
h = 8, hypotenuse = p + q = 20. Leg AC = √(p×(p+q)) = √(4×20) = √80 = 4√5 ≈ 8.94. Leg BC = √(q×(p+q)) = √(16×20) = √320 = 8√5 ≈ 17.89.
Takeaway
AM of p and q = (4+16)/2 = 10. GM = h = 8. AM > GM by 2 units (25% larger) — exactly as the AM-GM inequality predicts for unequal positive values, and the same gap the GM vs AM guide tracks for financial data.
Four ways to express the altitude theorem: formula, proportion, rearrangement, and leg theorem
The altitude theorem h = √(p×q) is one equation with four useful forms. Each form solves a different unknown. Use the table to identify which version matches your problem.
Method
Best for
Watch for
Example
Altitude formula: h = √(p×q)
Finding the altitude when both hypotenuse segments p and q are given.
Both segments must be the parts of the hypotenuse, not the legs of the triangle.
Understanding why h = √(pq) — it follows directly from AA-similar triangle ratios.
Cross-multiply correctly: p × q = h × h = h². Do not write p/q = h/h.
p = 4, h = 8, q = ?: 4/8 = 8/q → q = 8×8/4 = 16 ✓.
Segment rearrangement: p = h²/q or q = h²/p
Recovering a missing segment when the altitude and one segment are known.
Divide h² (not h) by the known segment. A common error is dividing h instead of h².
h = 6, q = 9 → p = 36/9 = 4. Check: h = √(4×9) = √36 = 6 ✓.
Geometric mean leg theorem: leg = √(adjacent segment × hypotenuse)
Finding a leg of the original triangle from hypotenuse segment data.
Different formula from the altitude theorem. Uses the full hypotenuse (p+q), not just p or q.
p = 4, q = 16, hypotenuse = 20 → leg a = √(4×20) = √80 ≈ 8.94; leg b = √(16×20) ≈ 17.89.
Triangle with p = 4, q = 16, h = 8: three similar triangles labeled
Point D on hypotenuse AB splits it into AD = 4 and DB = 16. Altitude CD = 8. Triangle ACD ~ Triangle CDB ~ Triangle ABC (AA similarity). AM of segments = (4+16)/2 = 10 > h = GM = 8.
Similar trianglesh / p = q / hh^2 = p x qh = √(p × q)
Altitude theorem proof: 4 steps from right angle to geometric mean
For p = 4, q = 16: proportion 4/h = h/16 → h² = 64 → h = 8. Every step is a geometric fact, not just algebra.
01Drop altitude
From right angle C, draw CD perpendicular to hypotenuse AB. D lies between A and B. Label AD = p = 4 and DB = q = 16.
->02Identify similar triangles
Triangle ACD: angles are A, 90°, (90°−A). Triangle CDB: angles are (90°−A), 90°, A. Both share the same two non-right angles as triangle ABC → AA similarity.
h = √64 = 8. Verify: h² = 64 = p×q = 4×16 ✓. Also verify legs: AC = √(p×AB) = √80 ≈ 8.94; BC = √(q×AB) = √320 ≈ 17.89. 8.94² + 17.89² ≈ 400 = 20² ✓.
Altitude theorem diagram
The altitude h splits the hypotenuse into p and q. Similar triangles produce h / p = q / h, so h^2 = p x q.
Key facts before you calculate
How three similar triangles prove h = √(pq)
When altitude CD is dropped from right angle C to hypotenuse AB: Triangle ACD has angles A, 90°, and (90° − A). Triangle CDB has angles (90° − A), 90°, and A. Triangle ABC has angles A, 90°, and (90° − A). All three triangles share the same angle set, so they are AA-similar. From ACD ~ CDB: AD/CD = CD/DB → p/h = h/q → h² = pq. Taking the square root: h = √(pq), the geometric mean. For p = 3, q = 12: h = √36 = 6. Verify: leg AC = √(3×15) = √45 = 3√5; leg BC = √(12×15) = √180 = 6√5. Pythagorean check: (3√5)² + (6√5)² = 45 + 180 = 225 = 15² ✓. The same √(p × q) structure is what the geometric mean calculator computes for any two positive values.
Geometric mean altitude vs geometric mean leg theorem
There are two related theorems, often confused. (1) Altitude theorem: h = √(p×q) — the altitude equals the GM of the two hypotenuse segments. (2) Leg theorem (geometric mean leg): each leg equals the GM of the hypotenuse and the adjacent segment. For leg a (adjacent to p): a = √(p×(p+q)). For p = 4, q = 16, hypotenuse = 20: leg a = √(4×20) = √80 = 4√5 ≈ 8.94; leg b = √(16×20) = √320 = 8√5 ≈ 17.89. This calculator solves the altitude theorem (h). For leg calculations, use the rearranged Pythagorean theorem. Both are the two-number case of the geometric mean formula, where GM simplifies to the square root of a product — the same shortcut used across the geometry section.
Three altitude theorem errors that produce wrong triangle measurements
Each mistake produces a specific wrong answer. Knowing the error helps you catch it during a self-check.
Watch for
Using leg lengths as p and q instead of hypotenuse segments
If you enter the legs of the triangle (e.g., a = 8.94 and b = 17.89) as p and q, you get h = √(8.94×17.89) = √159.9 ≈ 12.65 — wrong. The correct altitude is h = 8. Always use the two pieces of the hypotenuse (AD and DB), not the original legs.
Watch for
Computing p×q without taking the square root
4×16 = 64 is the value of h² (variance units), not h (length units). Forgetting √ gives 64 instead of 8 — a factor of 8 error. Always complete the formula: h = √(p×q).
Watch for
Using the altitude theorem on an obtuse or acute triangle
The theorem requires the 90° angle to be inside the triangle. For an obtuse triangle, the altitude from the largest angle falls outside the triangle. The proportion p/h = h/q no longer holds. Confirm the right angle exists before applying the theorem.
Keep going
Related calculators and reference guides
Continue with the Statistics hub, compare this result against a related method, or open a guide that covers the same data pattern in more depth.
No. h = √(p×q) is symmetric: √(4×16) = √(16×4) = 8. Enter either segment as p and the other as q. The altitude length is the same regardless of order.
How do I find a leg of the triangle using this theorem?
Use the geometric mean leg theorem: leg a = √(p×(p+q)) and leg b = √(q×(p+q)), where p is the segment adjacent to leg a. For p = 4, q = 16: leg a = √(4×20) = √80 ≈ 8.94; leg b = √(16×20) = √320 ≈ 17.89. Verify: 8.94² + 17.89² = 80 + 320 = 400 = 20² ✓.
Do p and q have to be entered in a specific order?
No. h = √(p×q) is symmetric: √(4×16) = √(16×4) = 8. Enter either segment as p and the other as q — the altitude is the same. However, if you are also computing the legs, you must track which segment is adjacent to which leg: leg a = √(p_adjacent × hypotenuse).
What is the point D in the diagram?
D is the foot of the altitude — the point where the perpendicular from right angle C meets the hypotenuse AB. It divides AB into segments AD = p and DB = q. For p = 4 and q = 16, D is 4 units from A and 16 units from B on a 20-unit hypotenuse.
Can I find a leg of the triangle from p and q?
Yes, using the geometric mean leg theorem: leg a (adjacent to p) = √(p × (p+q)); leg b (adjacent to q) = √(q × (p+q)). For p = 4, q = 16: leg a = √(4×20) = √80 ≈ 8.94; leg b = √(16×20) = √320 ≈ 17.89. Pythagorean check: 80 + 320 = 400 = 20² ✓.
Why does the altitude equal the geometric mean, not the arithmetic mean?
The proportion from similar triangles gives p/h = h/q, which is the definition of geometric mean: h is the value between p and q such that the ratio from p to h equals the ratio from h to q. AM = (p+q)/2 would be the midpoint of AB, which is a different point. For p = 4, q = 16: AM = 10 (midpoint of hypotenuse), GM = h = 8 (foot of altitude). They are 2 units apart on the hypotenuse.