What this Pythagorean theorem calculator does
This tool solves any right-triangle problem based on the Pythagorean theorem. It works in three modes: finding the hypotenuse when the two legs are known, and finding either leg when the hypotenuse and the other leg are known. It validates impossible inputs — such as a hypotenuse shorter than a leg — before computing. The result is shown in exact form (integer or simplified radical) alongside the decimal approximation, and a diagram draws the right triangle at the correct proportions with each side labelled.
The Pythagorean theorem
Variable definitions
- c — hypotenuse, the side opposite the right angle, always the longest side.
- a, b — the two legs, which meet at the right angle.
Common Pythagorean triples
These integer triples satisfy a² + b² = c² exactly and recur throughout exam problems. Recognising them saves time.
- (3, 4, 5)
- (5, 12, 13)
- (8, 15, 17)
- (7, 24, 25)
- (9, 40, 41)
- (6, 8, 10) — 2× the (3, 4, 5)
Worked examples
Example 1: Given legs a = 3, b = 4
- Square each leg: a² = 9, b² = 16.
- Sum: 9 + 16 = 25.
- Take the square root: c = √25 = 5.
- (3, 4, 5) is the smallest Pythagorean triple.
Example 2: Given legs a = 5, b = 12
- a² = 25, b² = 144. Sum = 169.
- c = √169 = 13.
- (5, 12, 13) is the second most common triple in exams.
Example 3: Given legs a = 1, b = 1
- a² + b² = 1 + 1 = 2.
- c = √2.
- The exact form is √2 ≈ 1.41421356… — an irrational number.
- This is the side ratio of a 45-45-90 triangle.
Example 4: Given hypotenuse c = 13 and leg a = 5
- Square each: c² = 169, a² = 25.
- Difference: 169 − 25 = 144.
- Other leg: b = √144 = 12.
Example 5: Given hypotenuse c = 5, leg a = 5
- Difference c² − a² = 25 − 25 = 0.
- b = √0 = 0. But a side of length 0 does not form a triangle.
- Invalid — a right triangle cannot have a leg equal to its hypotenuse.
Example 6: Given hypotenuse c = 4, leg a = 5
- c² − a² = 16 − 25 = −9, which is negative.
- There is no real number whose square is −9.
- Invalid — the hypotenuse must be the longest side, so it cannot be shorter than a leg.
Where the Pythagorean theorem appears in Class 9 & 10
The theorem is one of the most widely used results in the Punjab board syllabus:
- Coordinate geometry — the distance formula is Pythagoras applied to coordinate differences.
- Trigonometry — establishing sin²θ + cos²θ = 1 uses Pythagoras on the unit circle.
- Physics — vector addition, projectile motion, and forces at right angles.
- Real-world problems — finding the diagonal of a rectangle, the height of a ladder, or the distance between two points on a grid.
Common mistakes to avoid
- Adding the sides without squaring first. The theorem is a² + b² = c², not a + b = c. 3 + 4 is 7, but the hypotenuse is 5, not 7.
- Confusing which side is the hypotenuse. The hypotenuse is always the side opposite the right angle and always the longest. If your "hypotenuse" is shorter than a leg, something is wrong.
- Subtracting instead of adding when finding the hypotenuse. To find c, you ADD the squares of the legs. Subtracting gives the difference, which is meaningless here.
- Forgetting to take the square root. The theorem gives c² = a² + b², so you must take the square root at the end. Leaving the answer as a² + b² is incomplete.
- Mixing up which square to subtract when finding a leg. To find a leg, compute c² − (the other leg)², not the other way around. c must be larger than either leg.
- Rounding the hypotenuse too early. Keep √ symbols until the final step. For exam answers, the exact form √13 is preferred over 3.606.
FAQ
What is the Pythagorean theorem?
In any right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². Here c is the hypotenuse (the side opposite the right angle) and a and b are the two legs.
How do I find the hypotenuse if I know the two legs?
Use c = √(a² + b²). Square each leg, add them, then take the square root. For example, if a = 3 and b = 4, then c = √(9 + 16) = √25 = 5.
How do I find a leg if I know the hypotenuse and the other leg?
Rearrange the Pythagorean equation: a = √(c² − b²). The hypotenuse must be longer than the known leg, otherwise the expression inside the square root is negative and no real triangle exists.
What is a Pythagorean triple?
A Pythagorean triple is a set of three positive integers (a, b, c) satisfying a² + b² = c². The smallest is (3, 4, 5). Multiples like (6, 8, 10) and (9, 12, 15) are also triples. Recognising triples lets you solve right-triangle problems without a calculator.
Can a right triangle have a side of length zero?
No. All three sides must be strictly positive. A zero-length side would make the shape degenerate and the theorem would reduce to a trivially true equation like a² = a².
When solving for a leg, why must the hypotenuse be greater than the other leg?
Because the expression under the square root is c² − b². If c ≤ b, then c² − b² is zero or negative, which cannot be the square of a real number. This reflects the geometric fact that the hypotenuse is always the longest side of a right triangle.
Related tools
Related Hira Academy resources
The Pythagorean theorem is a foundation for the geometry and trigonometry chapters in Class 9 and 10. Revise with our free Class 9 notes and Class 10 notes.