Skip to main content

Pythagorean theorem

Calculate hypotenuse or leg.

abc

Guide: Pythagorean Theorem

The Pythagorean theorem is one of the fundamental theorems of Euclidean geometry, describing the relationship between the sides of a right triangle.It states: in every right triangle, the sum of the squares of the legs equals the square of the hypotenuse.If we denote the legs as a and b, and the hypotenuse as c, then a² + b² = c².This theorem was already known in ancient Babylonian and Indian civilizations, but its name comes from the Greek mathematician Pythagoras.

Pythagorean triples are right triangles where all sides are integers.The simplest example is the triangle with sides 3, 4, and 5, where 3² + 4² = 5² (9 + 16 = 25).Other examples include 5, 12, 13 and 8, 15, 17.These triangles are particularly useful in practice because they can be constructed without needing precise measurements.

The Pythagorean theorem finds applications in many fields of science and engineering.In construction and architecture, it is used to determine right angles for foundations and walls. In GPS navigation, it calculates distances between points on a plane. In computer graphics, it determines distances between pixels and renders 3D scenes. In physics, it describes relationships between forces, velocities, and accelerations in circular motion.

To calculate the hypotenuse, we use the formula c = √(a² + b²).In the calculator, select the "Hypotenuse (c)" mode and enter the values of the legs.To calculate a leg, we use the formula a = √(c² - b²) or b = √(c² - a²).In the calculator, select the "Leg (a/b)" mode and enter the longer side (hypotenuse) and one known side.

It is important to remember that the theorem applies ONLY to right triangles.In other triangles, the relationship between the sides is different.In any triangle, the relationship is described by the law of cosines: c² = a² + b² - 2ab·cos(γ).The Pythagorean theorem is a special case of the law of cosines for a 90-degree angle (cos 90° = 0).

Checking a diagonal beats checking a corner

The theorem is usually taught as a way to find a missing side. Its most common practical use is the reverse: proving that a corner is square without measuring an angle at all. Measure two sides and the diagonal, and the arithmetic tells you whether the corner is right — to a precision no square or protractor matches.

How it works

  • Finds any third side of a right triangle from the other two.
  • Tests whether three given lengths form a right angle, which is the site-work use.
  • Handles the reverse problem, deriving a leg from the hypotenuse and the other leg.
a² + b² = c²      where c is the hypotenuse

c = √(a² + b²)
a = √(c² − b²)

if a² + b² = c² exactly, the angle between a and b is 90°

Worked example

Squaring a 4 m by 3 m room, and seeing how much a small error matters.

  1. a truly square 4 × 3 room has both diagonals at exactly 5.0000 m
  2. a diagonal 0.5 cm out → the corner is 89.88°, off by 0.12°
  3. 1 cm out → 89.76°, off by 0.24°
  4. 5 cm out → 88.80°, off by 1.20°

A one-centimetre discrepancy in the diagonal means the corner is a quarter of a degree off — which across a 4 m wall displaces the far end by about 17 mm. The tape measures the error more reliably than any handheld square.

Reading the result

  • The 3-4-5 triangle and its multiples are the reason this works on site without a calculator. 6-8-10, 9-12-15 and 30-40-50 are all exactly right-angled, so a builder can strike a square corner with nothing but a tape and three marks.
  • In a rectangle, both diagonals being equal proves the corners are square. That single check is faster and more reliable than testing four corners individually, and it catches a parallelogram that four correct-looking corners would not.
  • The converse is what makes it a test rather than a formula. If a² + b² equals c² the angle is right; if the sum is larger the angle is acute, and if smaller it is obtuse — so the size of the gap tells you which way to adjust.
  • It holds only on a flat plane. Over long distances on the ground, or on any curved surface, the flat-plane assumption fails and surveying uses spherical formulas instead.

Common questions

How do I square a room with just a tape measure?
Measure both diagonals. If they are equal, the corners are square; if not, the longer diagonal marks the corner that is open past 90°. Adjust until they match — a one-centimetre difference is about a quarter of a degree.
Why 3-4-5 specifically?
It is the smallest set of whole numbers where a² + b² = c², so 9 + 16 = 25 exactly. That makes it the easiest right angle to construct by measurement alone, and any multiple of it works identically.