Pythagoras Theorem Formula

a² + b² = c² — the relationship that defines every right-angled triangle

MathematicsGeometry

The formula

a and b are the two legs (shorter sides) of a right-angled triangle. c is the hypotenuse — the side opposite the right angle, which is always the longest side.

What is Pythagoras?

Pythagoras' theorem describes a fixed relationship between the three sides of any right-angled triangle. If you square the length of each leg and add those two squares together, the sum equals the square of the hypotenuse. The formula only applies when one of the angles is exactly 90° — if the triangle has no right angle you need the cosine rule instead.

The theorem is named after the Greek mathematician Pythagoras (c. 570–495 BCE), though Babylonian mathematicians knew the relationship more than a thousand years earlier. A quick way to see why it works: draw squares on each of the three sides of a right triangle. The combined area of the two squares on the legs exactly equals the area of the square on the hypotenuse. That geometric picture is the original proof, and it still holds for any triangle whose largest angle is 90°.

Pythagoras shows up constantly in geometry, coordinate geometry (the distance formula is a direct application), physics (resultant velocity, resolving vectors), and GPS and computer graphics. You'll use it whenever you know two sides of a right triangle and need the third — whether that's finding the length of a ladder against a wall, the diagonal of a rectangle, or the straight-line distance between two points on a map.

A useful extension: any three positive integers (a, b, c) that satisfy a² + b² = c² are called a Pythagorean triple. The smallest is (3, 4, 5) — you'll recognise it in exam questions when the numbers are chosen to produce a clean integer answer. Other common triples worth memorising are (5, 12, 13), (8, 15, 17), and (7, 24, 25).

Solved Examples

Example 1: Find the hypotenuse of a right triangle with legs 6 cm and 8 cm.

  1. 1

    Identify the sides

    The two legs are a = 6 cm and b = 8 cm. We want c, the hypotenuse.

  2. 2

    Apply the formula

  3. 3

    Square root both sides

    The 6-8-10 triangle is just a doubled 3-4-5 Pythagorean triple — a common exam setup.

Answer

c = 10 cm

Example 2: A 13 m ladder leans against a wall. Its foot is 5 m from the wall. How high up the wall does the ladder reach?

  1. 1

    Draw the triangle

    The ladder is the hypotenuse (c = 13). The distance from the wall is one leg (a = 5). The height up the wall is the unknown leg b.

  2. 2

    Rearrange the formula for b

  3. 3

    Solve

    The (5, 12, 13) triple again — memorising the common triples saves time on exams.

Answer

The ladder reaches 12 m up the wall.

Example 3: Find the distance between the points P(2, 3) and Q(7, 15) on the coordinate plane.

  1. 1

    Turn the gap into a right triangle

    The horizontal distance is 7 − 2 = 5 units. The vertical distance is 15 − 3 = 12 units. P, Q and the right-angle corner form a right triangle.

  2. 2

    Apply Pythagoras to the legs 5 and 12

  3. 3

    Take the square root

    This is the coordinate distance formula — it's just Pythagoras applied to the horizontal and vertical differences.

Answer

PQ = 13 units

Solve your own geometry problem

Paste a question or upload a photo. Full step-by-step working, 1 free solve without signup.

Guest · 1 free solve today

Related Formulas & Solvers

Coming Soon

Complete Mathematics Formula Sheet (PDF)

A printable one-pager with every mathematics formula, ready to pin above your desk. We're polishing it now — sign up and we'll email you when it drops.

Notify me when it's ready →

Frequently asked questions

When can I use Pythagoras' theorem?
Only when the triangle contains a 90° angle. If the largest angle isn't a right angle, the theorem breaks — you need the cosine rule (c² = a² + b² − 2ab·cos C) or the sine rule instead.
How do I know which side is the hypotenuse?
The hypotenuse is always directly across from the right angle, and it is always the longest side of a right triangle. If a problem says 'ladder against a wall', the ladder itself is the hypotenuse because the 90° corner is formed by the wall and the ground.
What is a Pythagorean triple and why do they matter?
A Pythagorean triple is any set of three positive whole numbers (a, b, c) where a² + b² = c². The most common are (3, 4, 5), (5, 12, 13), (8, 15, 17), and (7, 24, 25). Exam writers use these because the side lengths come out as clean integers — spotting the triple on sight saves you doing square-root arithmetic.
Does the theorem work in three dimensions?
Yes. The 3D extension is d² = x² + y² + z² — the straight-line distance between two points in 3D space equals the square root of the sum of squared differences in each coordinate. This is how games and navigation systems compute distances between points.
Pythagoras Theorem Formula – a² + b² = c² Explained | SolveGini