Pythagoras Theorem: Formula Proof and Examples

#Pythagoras Theorem
TL;DR
The Pythagoras theorem says that in a right triangle, the square on the hypotenuse equals the sum of the squares on the two legs: a2+b2=c2a^2 + b^2 = c^2. Four proofs and six worked examples follow.
Annie Charlette Sophia A·reviewed byShikha SharmaLast updated on December 2, 202615 min read

Key Points

  • In a right triangle with legs aa and bb and hypotenuse cc: a2+b2=c2a^2 + b^2 = c^2.
  • To find the hypotenuse, add the squares and take the square root; to find a leg, subtract.
  • The rule is about areas: the squares on the legs exactly fill the square on the hypotenuse.
  • It works only at exactly 90°90°; the converse uses this to test for right angles.
  • Babylonian scribes used the relationship more than a thousand years before Pythagoras.

Why Three Squares Tell the Whole Story

Square each side of a 3-4-5 right triangle and something odd happens: 9 plus 16 is 25.

  • Build a square on each side. The square on the 3-side holds 9 unit cells, the 4-side 16, and the long side 25.
  • That is no accident of these numbers. It happens in every right triangle ever drawn.
  • This fact, the Pythagoras theorem, finds ladders, TV sizes, map distances and the diagonal of a box.
the squares on the legs of a 3-4-5 right triangle hold 9 and 16 cells, which together equal the 25 cells on the hypotenuse
A right triangle with legs 3 and 4 and hypotenuse 5, with a square drawn on each side and divided into unit cells: 9 cells on the leg a, 16 on the leg b and 25 on the hypotenuse c, beside the sum 9 + 16 = 25.

What Is the Pythagoras Theorem?

In a right-angled triangle, the square of the hypotenuse equals the sum of the squares of the other two sides. Every figure and example here uses the same labels:

  • the right angle is at corner C;
  • the two sides that form it are the legs, aa and bb;
  • the side opposite it is the hypotenuse, cc, always the longest side.
a2+b2=c2a^2 + b^2 = c^2

a2a^2 is the area of a square with side aa. The theorem says the two smaller squares, cut up and rearranged, cover the big square exactly.

The three forms of the formula

You know You want Formula
both legs aa, bb the hypotenuse cc c=a2+b2c = \sqrt{a^2 + b^2}
hypotenuse cc and leg bb the leg aa a=c2−b2a = \sqrt{c^2 - b^2}
hypotenuse cc and leg aa the leg bb b=c2−a2b = \sqrt{c^2 - a^2}
  • Finding the hypotenuse means adding squares; finding a leg means subtracting from the hypotenuse's square.
  • Square roots stay exact (such as 2\sqrt{2}) and are rounded to two places only at the end.

Pythagorean triples and the converse

  • Three whole numbers that fit, such as (3, 4, 5), (5, 12, 13), (8, 15, 17) and (7, 24, 25), are Pythagorean triples. Any multiple, like (6, 8, 10), is one too.
  • The theorem also runs backwards: if a2+b2=c2a^2 + b^2 = c^2, the angle opposite cc is 90°90°. Builders use this 3-4-5 check to set square corners.

Try It Yourself

Drag the two handles to change the legs and watch the three squares resize. Try 3-4-5, then legs 2 and 3, which give c=13≈3.61c = \sqrt{13} \approx 3.61, as most right triangles do.

Four Ways to Prove the Pythagoras Theorem

It may be the most-proved result in mathematics: Elisha Loomis's 1940 book The Pythagorean Proposition collects 370 proofs. Here are four very different reasons it is true.

Proof 1: move four triangles around

Take a square with side a+ba + b and place four copies of the right triangle inside it, in two ways.

  • First way: triangles in the corners, hypotenuses facing in. The gap in the middle is a tilted square of area c2c^2.
  • Second way: the triangles pair into two a×ba \times b rectangles. The gaps are two squares, a2a^2 and b2b^2.
  • Same big square, same four triangles, so the gaps match: c2=a2+b2c^2 = a^2 + b^2.
the rearrangement proof of the Pythagoras theorem leaves c squared in one square and a squared plus b squared in the other
Two squares of side 7 (a + b with a = 3 and b = 4). Left: four blue right triangles in the corners leave a tilted orange square of area 25. Right: the same four triangles form two rectangles, leaving a blue square of area 9 and a green square of area 16.

Proof 2: the same picture in algebra

  1. The big square's area is (a+b)2=a2+2ab+b2(a + b)^2 = a^2 + 2ab + b^2.
  2. It is also four triangles plus the middle square: 4⋅12ab+c2=2ab+c24 \cdot \tfrac{1}{2}ab + c^2 = 2ab + c^2.
  3. Set them equal and the 2ab2ab cancels: a2+b2=c2a^2 + b^2 = c^2.

Proof 3: the triangle contains two smaller copies of itself

Drop a perpendicular from C to the hypotenuse, meeting it at H. It splits cc into pp (next to aa) and qq (next to bb).

  • Each small triangle shares an angle with the big one and has a right angle, so each is similar to it (same shape, different size).
  • Matching sides gives pa=ac\tfrac{p}{a} = \tfrac{a}{c}, so a2=cpa^2 = cp. In the same way, b2=cqb^2 = cq.
  • Add them: a2+b2=c(p+q)=c2a^2 + b^2 = c(p + q) = c^2.
the altitude to the hypotenuse makes two similar triangles, so a squared equals c times p and b squared equals c times q
A 3-4-5 right triangle with the hypotenuse along the bottom and the altitude from C dropped to H, splitting the hypotenuse into q = 3.2 and p = 1.8. The working shows 9 = 5 × 1.8 and 16 = 5 × 3.2, which add to 25.

For 3-4-5: p=1.8p = 1.8 and q=3.2q = 3.2, and 5×1.8=95 \times 1.8 = 9, 5×3.2=165 \times 3.2 = 16. More on this in similar triangles.

Proof 4: Garfield's trapezium

In 1876 James A. Garfield, then a US congressman and later President, published a proof in the New England Journal of Education.

  • Two copies of the triangle and one right triangle with legs cc make a trapezium.
  • Its area is 12(a+b)2\tfrac{1}{2}(a + b)^2 by the trapezium formula, and ab+12c2ab + \tfrac{1}{2}c^2 by adding the three triangles.
  • Set them equal and simplify: a2+b2=c2a^2 + b^2 = c^2.

What Happens When the Angle Is Not 90°?

The theorem holds for right triangles only. Keep the legs at 3 and 4 and change the angle at C:

Angle at C Third side cc c2c^2 Compared with 25
60°60° 13≈3.61\sqrt{13} \approx 3.61 1313 smaller
90°90° 55 2525 equal
120°120° 37≈6.08\sqrt{37} \approx 6.08 3737 larger
only a right angle makes c squared equal to a squared plus b squared
Three triangles with sides a = 3 and b = 4 and the angle at C set to 60, 90 and 120 degrees. The third side measures 3.61, 5 and 6.08, so c squared is 13, 25 and 37: less than, equal to and greater than 25.
  • A sharper angle pulls the ends together and cc shrinks; a wider angle pushes them apart.
  • Only 90°90° lands exactly on a2+b2a^2 + b^2, which is why the converse of the Pythagoras theorem works.
  • For any angle, the Law of Cosines, c2=a2+b2−2abcos⁡Cc^2 = a^2 + b^2 - 2ab\cos C, applies (see how to find side c of a triangle). At 90°90°, cos⁡C=0\cos C = 0.
  • The surface must be flat. On a globe, a triangle from the North Pole to two points on the equator can have three right angles.

Pythagoras Beyond the Triangle

The theorem keeps turning up in topics that do not look like triangles.

  • Distance between two points. The horizontal and vertical gaps are legs, giving the distance formula: d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}.
  • Three dimensions. Used twice, it gives the diagonal of a cuboid: l2+w2+h2\sqrt{l^2 + w^2 + h^2}.
  • Trigonometry. On the unit circle it becomes cos⁡2θ+sin⁡2θ=1\cos^2\theta + \sin^2\theta = 1, the first of the Pythagorean identities.

Worked Examples of the Pythagoras Theorem

Six examples, from a ladder to a TV screen.

Example 1

A ladder's foot is 5 m from a wall and its top reaches 12 m up. How long is the ladder?

  1. Wall and ground meet at a right angle, so the ladder is the hypotenuse.
  2. c2=52+122=25+144=169c^2 = 5^2 + 12^2 = 25 + 144 = 169.
  3. c=169=13c = \sqrt{169} = 13.
the ladder is the hypotenuse of a 5-12-13 right triangle
A ladder leaning against a wall with its foot 5 m out and its top 12 m up, the right angle marked at the base of the wall, and the working c² = 5² + 12² = 169, so c = 13 m.

Final answer: the ladder is 13 m long.

Example 2

A right triangle has hypotenuse 25 and one leg 7. Find the other leg.

  1. The habit is to add: b2=252+72=674b^2 = 25^2 + 7^2 = 674, so b≈25.96b \approx 25.96.
  2. But that leg is longer than the hypotenuse, which is impossible.
  3. The hypotenuse stays alone: 72+b2=2527^2 + b^2 = 25^2, so b2=625−49=576b^2 = 625 - 49 = 576.
  4. b=576=24b = \sqrt{576} = 24.

Final answer: the other leg is 24.

Example 3

A triangle has sides 9, 40 and 41. Is it right-angled?

  1. Test the converse with the longest side as cc: 92+402=81+1600=16819^2 + 40^2 = 81 + 1600 = 1681.
  2. 412=168141^2 = 1681. The two match.

Final answer: yes, it is right-angled at the corner opposite the side of 41.

Example 4

A square has sides of 1 m. How long is its diagonal?

  1. The diagonal makes a right triangle with legs 1 and 1.
  2. c2=12+12=2c^2 = 1^2 + 1^2 = 2, so c=2c = \sqrt{2}.

Final answer: exactly 2\sqrt{2} m, about 1.41 m. It cannot be written as a fraction, so it stays exact.

Example 5

Find the distance between P(1, 2) and Q(7, 10).

  1. Across: 7−1=67 - 1 = 6. Up: 10−2=810 - 2 = 8.
  2. PQ2=36+64=100PQ^2 = 36 + 64 = 100, so PQ=10PQ = 10.
the distance between two points is the hypotenuse of a right triangle drawn on the grid
A coordinate grid with P at (1, 2) and Q at (7, 10), joined by an orange hypotenuse of length 10, with a blue horizontal leg of 6 and a green vertical leg of 8 meeting at a right angle.

Final answer: 10 units.

Example 6

A "55-inch" TV has a 55-inch diagonal and a 16 : 9 screen. Find its width and height.

  1. Call the width 16k16k and the height 9k9k.
  2. (16k)2+(9k)2=552(16k)^2 + (9k)^2 = 55^2, so 337k2=3025337k^2 = 3025.
  3. k=55337≈2.996k = \frac{55}{\sqrt{337}} \approx 2.996.
  4. Width =16k≈47.94= 16k \approx 47.94; height =9k≈26.96= 9k \approx 26.96.
a 55-inch 16 by 9 TV screen is about 47.94 inches wide and 26.96 inches tall
A flat TV screen with its 55-inch diagonal drawn in orange, the width labelled 47.94 inches and the height 26.96 inches, and the working 16² + 9² = 337 and one unit = 55 ÷ √337 = 2.996 inches.

Final answer: about 47.94 inches wide and 26.96 inches tall.

Where the Pythagoras Theorem Does Real Work

  • Squaring a corner. Builders measure 3 m and 4 m along two walls and check the diagonal is 5 m.
  • Screens and paper. Screen sizes are diagonals, as Example 6 shows.
  • Maps. "As the crow flies" is a hypotenuse, shorter than walking the streets.
  • Ramps, roofs and stairs. A rafter's sloping length comes from its rise and run.
  • Games and graphics. Checking how far apart two objects are runs the distance formula.

The Mathematicians Who Shaped the Pythagoras Theorem

The story starts long before Pythagoras (around 570 to 495 BCE).

  • Babylonian scribes. The clay tablet YBC 7289 (about 1800 to 1600 BCE, Yale Babylonian Collection) shows a square of side 30 with its diagonals.
  • Along the diagonal is 1;24,51,101;24,51,10 in base 60, which is 1.414212961.41421296: within one millionth of 2\sqrt{2}. The scribe knew a diagonal is the side times 2\sqrt{2}.
the Babylonian tablet YBC 7289 records the square root of 2 to about six decimal places
A redrawn diagram of the Babylonian tablet YBC 7289: a square with side 30 and its diagonals, labelled 1;24,51,10 and 42;25,35 in base 60. The working converts 1;24,51,10 to 1.41421296, against √2 = 1.41421356, a difference of 0.0000006.
  • Baudhāyana (India, around 800 BCE) stated the rule in words for laying out fire altars. Chinese mathematics knows it as the gougu rule.
  • Pythagoras of Samos led a school credited with proving it. The Pythagoreans also found that 2\sqrt{2} is not a ratio of whole numbers, which clashed with their belief that "all things are numbers".
  • Euclid (around 300 BCE) gave the proof that survived, in Elements Book I, Proposition 47.
  • Bhāskara II (12th century, India) is said to have drawn the rearrangement picture with one word: "Behold!"

Common Mistakes

Mistake 1: Adding the legs instead of their squares

Where it slips in: The first time a problem gives two legs.

Don't do this: Write c=6+8=14c = 6 + 8 = 14.

The correct way: c=36+64=10c = \sqrt{36 + 64} = 10. The hypotenuse is always shorter than the two legs together, since a straight line is the shortest path.

Mistake 2: Treating the longest given side as a leg

Where it slips in: Problems that give the hypotenuse and one leg, listed out of order.

Don't do this: Write 252+72=b225^2 + 7^2 = b^2 and get a leg of 25.96.

The correct way: Find the side opposite the right angle first. It alone is cc. A "leg" longer than the hypotenuse means you swapped them.

Mistake 3: Stopping at c2c^2

Where it slips in: Long problems where squaring and adding take all the attention.

Don't do this: Find c2=169c^2 = 169 and write "the ladder is 169 m".

The correct way: The last step is always the square root. Then ask if the length makes sense.

Mistake 4: Using the theorem on a triangle that is not right-angled

Where it slips in: A triangle that looks nearly right-angled, with no square mark.

Don't do this: Assume a2+b2=c2a^2 + b^2 = c^2 for any three sides.

The correct way: Confirm the right angle first, by the mark, the wording or the converse. The student who knows the formula by heart is the one most tempted to use it everywhere. Otherwise use the Law of Cosines.

Key Takeaways

  • In a right triangle, a2+b2=c2a^2 + b^2 = c^2, with cc the hypotenuse opposite the right angle.
  • Add squares for the hypotenuse, subtract for a leg, and always finish with the square root.
  • It is an area fact, proved by rearranging triangles, by algebra, by similar triangles and by Garfield's trapezium.
  • At any other angle c2c^2 is smaller or larger, which is how the converse tests for right angles.

Try These Next

Now try these, then check your answers.

  1. A right triangle has legs 9 and 12. Find the hypotenuse. How is it linked to the 3-4-5 triangle?
  2. The hypotenuse is 17 and one leg is 8. Find the other leg.
  3. Find the distance between (−2, 1) and (4, 9).

Answer to Question 1: 15; it is the 3-4-5 triangle tripled. Answer to Question 2: 15. Answer to Question 3: 10. If Question 2 gave more than 17, go back to Example 2.

The natural next steps are the distance formula and then trigonometric ratios, which carry the theorem into angles. To work through them with a teacher, explore Bhanzu's geometry tutor or math classes online.

Want a live Bhanzu trainer to walk your child through right triangles? Book a free demo class.

Read More

Research Behind This Article

  1. Euclid, Elements, Book I, Proposition 47, with commentary by D. E. Joyce, Clark University. mathcs.clarku.edu
  2. OpenStax, Prealgebra 2e, Section 9.3: Use Properties of Angles, Triangles, and the Pythagorean Theorem. openstax.org
  3. E. S. Loomis, The Pythagorean Proposition (2nd edition, 1940; reissued by NCTM), via ERIC, US Department of Education. files.eric.ed.gov
  4. J. J. O'Connor and E. F. Robertson, "Pythagoras's theorem in Babylonian mathematics", MacTutor History of Mathematics, University of St Andrews. mathshistory.st-andrews.ac.uk
  5. J. J. O'Connor and E. F. Robertson, "Baudhayana", MacTutor History of Mathematics, University of St Andrews. mathshistory.st-andrews.ac.uk
  6. J. J. O'Connor and E. F. Robertson, "Pythagoras of Samos", MacTutor History of Mathematics, University of St Andrews. mathshistory.st-andrews.ac.uk

Quick Quiz: Check Yourself

Three levels, questions with figures, instant feedback with the reason.

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What is the formula of the Pythagoras theorem?
a2+b2=c2a^2 + b^2 = c^2, where aa and bb are the legs of a right triangle and cc is the hypotenuse.
Did Pythagoras discover the Pythagoras theorem?
No. Babylonian scribes used it more than a thousand years earlier, and an early Indian text states it too. The Greeks are credited with the formal proof, not the discovery.
Can the hypotenuse be a decimal or a square root?
Yes, and usually it is. Legs of 1 and 1 give 2\sqrt{2}. Whole-number answers happen only for Pythagorean triples, so never assume the answer must be one.
Does it work in 3D?
Yes, applied twice. A box with edges ll, ww and hh has a space diagonal of l2+w2+h2\sqrt{l^2 + w^2 + h^2}.
When does the Pythagoras theorem fail?
On triangles without a right angle, and on curved surfaces such as a globe. On any flat right triangle it always holds.
✍️ Written By
Annie Charlette Sophia A
Annie Charlette Sophia A
Subject Matter Expert and Curriculum Developer
Annie Charlette Sophia A is a curriculum developer and educator with 13 years of experience teaching students from LKG to Grade 7. Her approach is rooted in the Primary Years Programme (PYP) philosophy, which encourages students to become inquirers, thinkers and confident communicators. She designs engaging, student-centred learning experiences that support both academic understanding and personal growth. Recognised as Innovative Teacher of the Year (2016) from Royale Concorde International School, Bangalore.
LinkedIn
🔬 Reviewed By
Shikha Sharma
Subject Matter Expert
Related Articles
Book a FREE Demo ClassBook Now →