The Pythagorean theorem applies specifically to right triangles. It connects the two perpendicular legs with the hypotenuse, the side opposite the right angle.
Label the right triangle
If c is the hypotenuse, then a^2 + b^2 = c^2. The hypotenuse must be the longest side. If you are solving for a leg, rearrange to a = sqrt(c^2 - b^2).
A familiar example
For legs of 3 and 4, c = sqrt(9 + 16) = 5. The same method works for a diagonal across a rectangular room when the two perpendicular dimensions are known.
Check the geometry
If the triangle is not right-angled, use the law of cosines instead. Entering a side longer than the hypotenuse or invalid dimensions should produce an error rather than a meaningful result.
A worked example
Worked example: a rectangular room 3 meters wide and 4 meters long has a diagonal of sqrt(3^2 + 4^2) = 5 meters. The same relationship helps estimate a ladder length across a right angle.
Confirm the right angle before using the theorem. For a general triangle, the law of cosines is the appropriate extension.
The side labels are part of the problem. Sketch the right angle, identify the hypotenuse, and keep all lengths in one unit before entering them into a calculator.
A negative value under a square root signals invalid side inputs, often because the proposed leg is longer than the hypotenuse.
The theorem is simple and powerful when the right angle and side labels are identified correctly.
COMMON QUESTIONS
Frequently asked questions
Which side is c?
c is the hypotenuse, the side opposite the right angle and the longest side.
Can I use it for any triangle?
No. It directly applies to right triangles. Other triangles require a different relationship.