What Are Similar Right Triangles?
When the altitude is drawn from the right angle of a right triangle to its hypotenuse, it divides the original triangle into two smaller triangles. All three triangles — the original and the two pieces — are similar to one another. This similarity produces the famous geometric mean (or "right triangle altitude") relationships, which let you find the altitude and the two legs purely from the two segments the altitude carves out of the hypotenuse.
How to Use This Calculator
Enter the two hypotenuse segments, p and q. Segment p sits adjacent to one leg and q adjacent to the other; together they make up the full hypotenuse. The calculator returns the altitude h, the full hypotenuse length, and both legs.
The Formula Explained
The altitude to the hypotenuse is the geometric mean of the segments: \(h = \sqrt{p \cdot q}\). Each leg is the geometric mean of the whole hypotenuse and the segment adjacent to it: \(a = \sqrt{p \cdot (p+q)}\) and \(b = \sqrt{q \cdot (p+q)}\). These follow directly from the proportions between similar triangles.
$$ h = \sqrt{p \cdot q} \\[1.5em] \text{where}\quad \left\{ \begin{aligned} c &= p + q \\ a &= \sqrt{p \cdot c} \\ b &= \sqrt{q \cdot c} \end{aligned} \right. $$
Worked Example
Suppose \(p = 4\) and \(q = 9\). The hypotenuse is \(4 + 9 = 13\). The altitude is \(\sqrt{4 \cdot 9} = \sqrt{36} = 6\). The legs are \(\sqrt{4 \cdot 13} = \sqrt{52} \approx 7.2111\) and \(\sqrt{9 \cdot 13} = \sqrt{117} \approx 10.8167\). You can verify with the Pythagorean theorem: $$ 7.2111^2 + 10.8167^2 \approx 52 + 117 = 169 = 13^2. $$
More Worked Examples
In a right triangle, the altitude to the hypotenuse splits it into segments p and q. The altitude and the two legs then follow from the geometric mean relationships \(h^2 = pq\), \(a^2 = pc\) and \(b^2 = qc\), where \(c = p + q\).
Example 1: p = 1, q = 4
- Hypotenuse: \(c = p + q = 1 + 4 = 5\).
- Altitude: \(h = \sqrt{pq} = \sqrt{1 \cdot 4} = \sqrt{4} = \)2.
- Leg a (next to p): \(a = \sqrt{pc} = \sqrt{1 \cdot 5} = \sqrt{5} \approx 2.2361\).
- Leg b (next to q): \(b = \sqrt{qc} = \sqrt{4 \cdot 5} = \sqrt{20} \approx 4.4721\).
Checks: \(h^2 = 2^2 = 4 = pq = 1 \cdot 4\). Also \(a^2 + b^2 = 5 + 20 = 25 = 5^2 = c^2\), so the Pythagorean theorem holds. Another useful identity is \(ab = ch\): \(\sqrt{5} \cdot \sqrt{20} = \sqrt{100} = 10 = 5 \cdot 2\).
Example 2: p = 3, q = 12
- Hypotenuse: \(c = 3 + 12 = 15\).
- Altitude: \(h = \sqrt{3 \cdot 12} = \sqrt{36} = 6\).
- Leg a: \(a = \sqrt{3 \cdot 15} = \sqrt{45} \approx 6.7082\).
- Leg b: \(b = \sqrt{12 \cdot 15} = \sqrt{180} \approx 13.4164\).
Checks: \(h^2 = 36 = 3 \cdot 12 = pq\). Also \(a^2 + b^2 = 45 + 180 = 225 = 15^2 = c^2\), and \(ab = \sqrt{45 \cdot 180} = \sqrt{8100} = 90 = 15 \cdot 6 = ch\).
Example 2 is Example 1 scaled by 3, so every length is exactly 3 times larger. This is why the triangles are similar.
Comparing Different Segment Ratios
The table below shows how the shape of the triangle changes with the ratio p:q. All values are rounded to four decimal places where needed.
| p | q | Ratio p:q | Hypotenuse c | Altitude h | Leg a | Leg b |
|---|---|---|---|---|---|---|
| 5 | 5 | 1:1 | 10 | 5 | √50 ≈ 7.0711 | √50 ≈ 7.0711 |
| 1 | 4 | 1:4 | 5 | 2 | √5 ≈ 2.2361 | √20 ≈ 4.4721 |
| 4 | 9 | 4:9 | 13 | 6 | √52 ≈ 7.2111 | √117 ≈ 10.8167 |
| 1 | 9 | 1:9 | 10 | 3 | √10 ≈ 3.1623 | √90 ≈ 9.4868 |
When p = q, the two legs are equal and the triangle is an isosceles right triangle (45°-45°-90°), with the altitude equal to half the hypotenuse. As the ratio becomes more lopsided, the longer leg approaches the length of the hypotenuse and the altitude becomes small relative to c. For 1:1 the altitude is 50% of c, for 4:9 about 46%, for 1:4 it is 40%, and for 1:9 it is 30%.
Key Terms and Variables
- Hypotenuse segments p and q: the two pieces into which the altitude divides the hypotenuse. Their foot is the point where the altitude meets the hypotenuse.
- Altitude h: the perpendicular segment from the right-angle vertex to the hypotenuse.
- Hypotenuse c: the longest side, opposite the right angle, with \(c = p + q\).
- Legs a and b: the two sides that form the right angle. Leg a is adjacent to segment p, and leg b is adjacent to segment q.
- Geometric mean: the geometric mean of two positive numbers x and y is \(\sqrt{xy}\). Here h is the geometric mean of p and q, and each leg is the geometric mean of its adjacent segment and the whole hypotenuse.
- Similar triangles: triangles with equal corresponding angles and proportional corresponding sides. The altitude splits the large right triangle into two smaller right triangles that are similar to each other and to the original.
The three key relationships, which follow from that similarity, are:
$$h^2 = pq, \qquad a^2 = pc, \qquad b^2 = qc$$
FAQ
What is a geometric mean? The geometric mean of two numbers a and b is \(\sqrt{a \cdot b}\) — the value \(x\) where \(a/x = x/b\).
Can p and q be equal? Yes. If \(p = q\) the triangle is isosceles right at the foot, and the altitude equals each segment.
What if I only know the legs? Use the standard Pythagorean theorem instead; this tool is specifically for the segment-based geometric mean relationships.