Sub topic 8
Pythagorean Theorem and Common Triples
This chapter assumes you can solve simple quadratics, simplify surds, and use the angle facts from the triangle basics chapter. Special 30-60-90 and 45-45-90 triangles, and the altitude on the hypotenuse, have their own chapters and are not covered here.
The theorem and its converse
In a right triangle with legs a and b and hypotenuse c, the theorem says a² + b² = c². The hypotenuse is the side opposite the right angle, and it is always the longest side.
The converse is just as useful in CAT. If the three sides of a triangle satisfy a² + b² = c², the angle opposite c is a right angle. Use it to prove that a triangle is right-angled when the question gives only side lengths.
The theorem extends to a test for every triangle. Let c be the longest side:
| Condition | Triangle type |
|---|---|
| a² + b² = c² | Right |
| a² + b² > c² | Acute |
| a² + b² < c² | Obtuse |
The test only applies after the triangle inequality holds, meaning a + b > c. Sides 2, 3, 10 give 4 + 9 < 100, but no such triangle exists.
def classify(a, b, c):
x, y, z = sorted((a, b, c))
if x + y <= z:
return "not a triangle"
if x * x + y * y == z * z:
return "right"
return "acute" if x * x + y * y > z * z else "obtuse"
print(classify(7, 8, 9)) # acute
print(classify(4, 5, 7)) # obtuse
print(classify(5, 12, 13)) # right
print(classify(2, 3, 10)) # not a trianglePythagorean triples
A Pythagorean triple is a set of three positive integers (a, b, c) with a² + b² = c². Questions rarely ask you to prove a triple. They hide one, so that you can skip the square roots.
A primitive triple has no common factor among its three numbers. Multiplying every number in a triple by k gives another triple, because k²(a² + b²) = k²c². So (3, 4, 5) generates (6, 8, 10), (9, 12, 15), (15, 20, 25), and so on.
Triples worth memorising
| Primitive triple | Useful multiples |
|---|---|
| 3, 4, 5 | 6, 8, 10; 9, 12, 15; 12, 16, 20; 15, 20, 25; 24, 32, 40 |
| 5, 12, 13 | 10, 24, 26; 15, 36, 39; 20, 48, 52 |
| 8, 15, 17 | 16, 30, 34; 24, 45, 51 |
| 7, 24, 25 | 14, 48, 50 |
| 20, 21, 29 | 40, 42, 58 |
| 9, 40, 41 | |
| 12, 35, 37 | |
| 11, 60, 61 |
The first four cover most exam questions. Learn the others as a recognition aid, not as something to derive on the spot.
Generating triples
For integers m > n > 0, the numbers a = m² − n², b = 2mn and c = m² + n² always form a triple. This works because (m² − n²)² + (2mn)² = (m² + n²)². The triple is primitive when m and n share no factor and have opposite parity (one even, one odd).
import math
def primitive_triples(limit):
found = []
for m in range(2, int(limit ** 0.5) + 2):
for n in range(1, m):
if (m - n) % 2 == 1 and math.gcd(m, n) == 1:
a, b, c = m * m - n * n, 2 * m * n, m * m + n * n
if c <= limit:
found.append((min(a, b), max(a, b), c))
return sorted(found, key=lambda t: t[2])
print(primitive_triples(50))
# [(3, 4, 5), (5, 12, 13), (8, 15, 17), (7, 24, 25),
# (20, 21, 29), (12, 35, 37), (9, 40, 41)]Two patterns help when one number is given:
- An odd leg b greater than 1 gives the triple (b, (b² − 1)/2, (b² + 1)/2). For b = 7 this is (7, 24, 25). For b = 11 it is (11, 60, 61).
- An even leg b = 2k (with k > 1) gives (b, k² − 1, k² + 1). For b = 8 this is (8, 15, 17).
In every triple, one leg is divisible by 3, one number is divisible by 4, and one is divisible by 5. This lets you reject a wrong option quickly.
Worked examples
Example 1: scaling a known triple
A right triangle has hypotenuse 25 and one leg 15. Compare with 3-4-5: 15 = 3 × 5 and 25 = 5 × 5, so the scale factor is 5 and the other leg is 4 × 5 = 20. No squaring was needed.
Example 2: isosceles triangle
An isosceles triangle has sides 13, 13 and 10. The altitude to the base meets the base at its midpoint, which makes a right triangle with hypotenuse 13 and one leg 5. That is the 5-12-13 triple, so the altitude is 12 and the area is ½ × 10 × 12 = 60.
Example 3: two poles
Two vertical poles of heights 6 m and 14 m stand 15 m apart on level ground. Find the distance between their tops. The height difference is 14 − 6 = 8, so draw a horizontal line from the top of the shorter pole. This gives a right triangle with legs 8 and 15, and the hypotenuse is 17 by the 8-15-17 triple. The answer is 17 m.
Example 4: hypotenuse and leg differ by 1
A right triangle has one leg 11, and the hypotenuse exceeds the other leg by 1. Find the hypotenuse. Let the hypotenuse be c and the other leg be a, with c − a = 1. Then c² − a² = 121, so (c − a)(c + a) = 121 and c + a = 121. Solving gives c = 61 and a = 60. This difference-of-squares step avoids a quadratic.
import math
b = 11
# c - a = 1 and (c - a)(c + a) = b^2, so c + a = b^2
c = (b * b + 1) // 2
a = (b * b - 1) // 2
print(a, c) # 60 61
print(math.isclose(a ** 2 + b ** 2, c ** 2)) # TrueA decision flow for CAT questions
Where the theorem appears in other figures
- A rectangle with sides l and w has diagonal √(l² + w²). A square with side s has diagonal s√2.
- A rhombus has perpendicular diagonals that bisect each other. Each side is the hypotenuse of a right triangle whose legs are half the diagonals. Diagonals 16 and 30 give half-diagonals 8 and 15, so the side is 17.
- The distance between points (x₁, y₁) and (x₂, y₂) is √((x₂ − x₁)² + (y₂ − y₁)²), which is the theorem applied to the horizontal and vertical gaps.
- A chord of length 2L at distance d from the centre of a circle of radius r satisfies r² = d² + L². The perpendicular from the centre bisects the chord.
- A 3D diagonal of a cuboid is √(l² + w² + h²). Apply the theorem twice.
Common errors
- Treating any longest side as the hypotenuse when no right angle is given. Check the right angle first.
- Adding the legs instead of their squares. In a 3-4-5 triangle, 3 + 4 = 7 is not 5.
- Forgetting to take the square root at the end. An option such as 169 is c², not c.
- Matching a triple by the wrong role. The largest number of a triple is always the hypotenuse. A triangle with legs 5 and 13 is not a 5-12-13 triangle. The missing side is √(169 − 25) = √144 = 12 only if 13 is the hypotenuse, so check which side is given.
- Assuming that an "almost" triple works. Sides 6, 8, 11 give 36 + 64 = 100, which is less than 121, so the triangle is obtuse.
Exercises
Exercise
A ladder 26 m long rests against a vertical wall. Its foot is 10 m from the wall. The top of the ladder slides down 4 m. How far does the foot move away from the wall?
Show answer
Initially the height reached is √(26² − 10²) = 24, from the 5-12-13 triple scaled by 2. After sliding down 4 m the height is 20. The new horizontal distance is √(26² − 20²) = √276 ... check with a triple: 26 = 2 × 13, so look at 10-24-26 and 20-?-26. Since 20² + x² = 676, x² = 276, which is not a perfect square, so x = 2√69 ≈ 16.61 m. The foot moves 16.61 − 10 ≈ 6.61 m away from the wall.
Exercise
The sides of a triangle are 9, 40 and 41. Is it right, acute or obtuse? Find its area and the altitude to the longest side.
Show answer
9² + 40² = 81 + 1600 = 1681 = 41², so by the converse the triangle is right-angled, with the right angle between the sides 9 and 40. The area is ½ × 9 × 40 = 180. The altitude h to the hypotenuse 41 satisfies ½ × 41 × h = 180, so h = 360/41 ≈ 8.78.