Home
Login

Color

Indigo
Red
Green
Teal
Blue
Purple
Rose

Mode

Light
বাং

The Pythagorean Theorem: Drag a Triangle and Watch the Proof

The Pythagorean theorem says that in a right triangle, the square on the hypotenuse equals the sum of the squares on the other two sides: a² + b² = c². A triangle with legs 3 and 4 has a hypotenuse of 5. Drag the triangle below and watch the three squares' areas balance.

Drag the two red points to reshape the triangle · Press ▶ to pour the “water” of a² and b² into c²

Square on aSquare on bSquare on c
Speed

Controls

Show

3.0
4.0

Readings

a
3
b
4
Hypotenuse, c
5
C
90°
a²
9
b²
16
c²
25
a² + b²
25
a² + b² − c²
0
Triangle by angle C
Right
Whole-number triple?
Yes

How to use this simulation

  1. Drag the two red points: the right-hand one changes leg a, the top one changes leg b. The sliders do the same.
  2. Press ▶ and the coloured “water” in a² and b² drains away while c² fills by exactly the same area. It ends precisely full: nothing spills, nothing is missing.
  3. Choose “Rearrangement proof”: four identical triangles slide around inside a big square, and the empty space is c² at one moment and a² + b² at the next. The empty space never changed, so the two are equal.
  4. Choose “Converse” and move angle C away from 90°: a² + b² − c² stops being zero, and the poured water either overflows c² (acute) or leaves it short (obtuse).
  5. Turn on “Snap to Pythagorean triples” and the triangle only settles on whole-number sides such as 3-4-5, 6-8-10 and 5-12-13; the readings panel then says “Whole-number triple? Yes”.

Ladders, TVs and shortcuts across the field

Picture a ladder leaning on a wall. The builder wants to know how high up the wall it reaches. Nobody climbs up with a tape measure: they measure how far the foot of the ladder is from the wall, they know how long the ladder is, and they work the rest out. That calculation is the Pythagorean theorem.

When a shop sells a “40-inch TV”, 40 inches is neither the width nor the height: it is the diagonal, corner to corner. Knowing the width and height, the same formula gives the diagonal. And when you cut diagonally across the school field instead of walking along two edges, the theorem tells you exactly how many metres you saved.

The theorem carries the name of Pythagoras, a Greek mathematician from about 2,500 years ago, but Babylonian, Egyptian, Indian and Chinese mathematicians used the relationship even earlier. Egyptian surveyors tied 12 evenly spaced knots in a rope and pulled it into a 3-4-5 triangle to get a perfect right angle. So this is not just an exam formula; it has been a working tool for thousands of years.

What is the Pythagorean theorem? Statement and formula

The textbook statement: “In a right-angled triangle, the square on the hypotenuse is equal to the sum of the squares on the other two sides.” When an exam says “state the Pythagorean theorem”, write exactly that sentence.

In plain words: if one angle of a triangle is exactly 90°, the side opposite that angle (always the longest side) is the hypotenuse. The two sides that form the right angle are called the legs, or the base and the perpendicular. Draw a square on each of the three sides. The areas of the two small squares add up to exactly the area of the big one.

Take the simulation's starting triangle: a = 3, b = 4. Then a² = 9 and b² = 16, which add up to 25. The hypotenuse is c = 5, so c² = 25. Turn on the unit-square tiles and count: 9 squares in the green one, 16 in the orange one, and exactly 25 in the big one.

a² + b² = c²c is the hypotenuse, a and b the legs

c = √(a² + b²)finding the hypotenuse

a = √(c² − b²)finding a leg when the hypotenuse is known

b = √(c² − a²)and the other leg the same way

TermMeaningWhere it is in the simulation
Right triangleA triangle with one angle of exactly 90°The small square mark at C
Hypotenuse (c)The side opposite the right angle, the longest sideThe blue square sits on it
Leg / base (a)One side that forms the right angleThe green square sits on it
Leg / perpendicular (b)The other side of the right angleThe orange square sits on it
TheoremA mathematical truth that must be proved by argumentThe whole simulation
Pythagorean tripleThree whole numbers satisfying a² + b² = c²The “snap to triples” toggle

Proof 1: four triangles in a square

This is the proof moving in the simulation's “Rearrangement proof” mode. In an exam, set it out like any theorem: the given, the construction, the proof, with a reason beside every step.

Given and to prove

ABC is a right triangle with ∠C = 90°, hypotenuse AB = c, BC = a and AC = b. To prove: AB² = BC² + AC², that is, c² = a² + b².

Construction

Draw a square with side a + b. Divide each side into a part of length a and a part of length b, going round in the same direction. Join the division points in order. This cuts four right triangles off the corners, each with legs a and b and hypotenuse c.

Proof

Step 1: All four corner triangles are congruent to ABC (SAS: two sides a and b with the right angle between them), so each hypotenuse is c.

Step 2: The inner quadrilateral has four sides equal to c. Each of its angles is 180° minus the two acute angles of the triangle, which add to 90°, so each angle is 90°. The inner shape is a square of side c.

Step 3: The area of the big square is (a + b)². The same area is also the inner square plus four triangles: c² + 4 × ½ab = c² + 2ab.

Step 4: So (a + b)² = c² + 2ab, which expands to a² + 2ab + b² = c² + 2ab, giving a² + b² = c². Hence AB² = BC² + AC². (Proved)

(a + b)² = c² + 4 · ½abthe same area counted two ways

a² + 2ab + b² = c² + 2abexpanding

a² + b² = c²subtracting 2ab from both sides

Proof 2: the trapezium (Garfield's proof)

Take right triangle ABC with the right angle at B, BC = a, AB = b and AC = c. Extend BC to D so that CD = b, and draw DE perpendicular to BD with DE = a. Join A to E.

ABDE is a trapezium, because AB and DE are both perpendicular to BD and therefore parallel. Its parallel sides are b and a, and its height is BD = a + b. Inside it sit three triangles: ABC, CDE and ACE. The first two are congruent, and angle ACE is 90° because the two angles beside it at C add to 90°.

Now compare areas. The trapezium has area ½(a + b)(a + b). The three triangles have ½ab + ½ab + ½c². Setting them equal and doubling gives (a + b)² = 2ab + c², so a² + b² = c². Fun fact: James Garfield, later the 20th President of the United States, published this proof in 1876.

½(a + b)² = ½ab + ½ab + ½c²trapezium = three triangles

(a + b)² = 2ab + c²multiplying by 2

Proof 3: similar triangles

In right triangle ABC with ∠C = 90°, drop the perpendicular CD from C onto the hypotenuse AB. It splits the triangle into two smaller ones, and all three triangles are similar: each has a right angle and shares one angle with the big triangle.

Similarity gives AC² = AD · AB and BC² = BD · AB. Adding, AC² + BC² = AB(AD + BD) = AB · AB = AB². This is the proof most higher-level textbooks use, including India's NCERT books, and it is the one that generalises to the rest of geometry.

The converse: does it work backwards?

The converse of the Pythagorean theorem says: if the square on one side of a triangle equals the sum of the squares on the other two sides, then the angle between those two sides is a right angle. So you can decide whether a triangle is right-angled from its three side lengths alone.

Even when the sides do not balance, you learn something. If a² + b² > c², the angle opposite c is less than 90° and the triangle is acute. If a² + b² < c², that angle is more than 90° and the triangle is obtuse. The reason is simple: open the angle and the opposite side gets longer; close it and the side gets shorter.

The “Converse” mode shows exactly this. Set C to 120°: c grows, and even all the water from a² and b² cannot fill c². Set C to 60°: c shrinks and the water overflows, turning red. Only at exactly 90° does it fill c² to the brim.

c² = a² + b² − 2ab·cos Cthe law of cosines; at C = 90°, cos C = 0

Pythagorean triples: when all three sides are whole numbers

Most right triangles have a messy hypotenuse: legs of 1 and 1 give √2 ≈ 1.414. A few special ones have three whole-number sides, and such a set is called a Pythagorean triple. The famous one is 3, 4, 5.

Multiply a triple by any whole number and you get another: 3-4-5 gives 6-8-10, 9-12-15 and 12-16-20. There is also a formula that makes new ones (Euclid's formula): pick whole numbers m > n, and m² − n², 2mn and m² + n² always form a triple. Every row of the table below is computed, and the last column checks it.

(m² − n²)² + (2mn)² = (m² + n²)²Euclid's formula, m > n > 0

m, na = m² − n²b = 2mnc = m² + n²a² + b² = c²?
2, 134525 = 25 ✓
3, 251213169 = 169 ✓
4, 115817289 = 289 ✓
4, 372425625 = 625 ✓
5, 2212029841 = 841 ✓
5, 4940411,681 = 1,681 ✓
6, 13512371,369 = 1,369 ✓

The distance formula is Pythagoras in disguise

You do not need to memorise the distance formula between (x₁, y₁) and (x₂, y₂); you can build it. The horizontal gap x₂ − x₁ and the vertical gap y₂ − y₁ are the legs of a right triangle, and the straight-line distance between the points is its hypotenuse.

In the same way, the length of a vector (|v| = √(x² + y²)), the diagonal of a box in three dimensions and even the trigonometric identity sin²θ + cos²θ = 1 are all the Pythagorean theorem wearing different clothes. Understand this chapter well and a large part of coordinate geometry, physics and admission-test maths becomes easy.

d = √[(x₂ − x₁)² + (y₂ − y₁)²]distance between two points

sin²θ + cos²θ = 1Pythagoras on the unit circle

Experiments to try in the simulation

Reading a theorem does not make it stick; changing things with your own hands does. Try these one by one and note what you see.

  • Halve both a and b: c halves too, but every square's area drops to a quarter. Notice the difference between length and area.
  • Keep a fixed and keep increasing b: c grows, but it never reaches a + b. Any two sides of a triangle add up to more than the third.
  • Make a = b (an isosceles right triangle): the hypotenuse is a × √2, and the square on c is exactly two of the small squares.
  • In rearrangement mode, change a and b: the empty space is equal in both arrangements for every size. One example is not a proof; working for every triangle is.
  • In converse mode, sweep angle C slowly past 90° and watch the “a² + b² − c²” reading go from positive, through zero, to negative.

Solved examples

Every number below is calculated in this page's code from the formula. Work each one in your notebook and compare.

Example 1: legs 7 cm and 9 cm; find the hypotenuse

c² = 7² + 9² = 49 + 81 = 130, so c = √130 ≈ 11.40 cm. It is not a whole number, so 7 and 9 are not part of a Pythagorean triple.

Example 2: hypotenuse 13 cm, one leg 5 cm; find the other leg

b² = c² − a² = 169 − 25 = 144, so b = 12 cm. Careful: you subtract the squares here, because you are looking for a shorter side.

Example 3: a 10 m ladder with its foot 2.8 m from the wall

The ladder is the hypotenuse (wall and ground meet at a right angle). Height h² = 100 − 7.84 = 92.16, so h ≈ 9.60 m.

If the foot slips out to 6 m from the wall, the height becomes √(100 − 36) = 8.00 m: the top of the ladder has slid down 1.60 m.

Example 4: a screen 88.6 cm wide and 49.8 cm tall; what size TV is it?

diagonal² = 7,849.96 + 2,480.04 = 10,330.00, so the diagonal ≈ 101.64 cm. One inch is 2.54 cm, so 101.64 ÷ 2.54 ≈ 40 inches. That is what the shop calls a “40-inch TV”.

Example 5: face diagonal and space diagonal of a 6 cm cube

Face diagonal = √(6² + 6²) = √72 ≈ 8.49 cm. The face diagonal and one vertical edge form another right triangle, so the space diagonal = √(72 + 36) = √108 ≈ 10.39 cm. Pythagoras twice gives distance in 3D.

Example 6: build a Pythagorean triple from m = 5, n = 2

a = 5² − 2² = 21, b = 2 × 5 × 2 = 20, c = 5² + 2² = 29. Check: 441 + 400 = 841 = 29². So 21, 20, 29 is a triple.

Example 7: right, acute or obtuse?

Sides 7, 24, 25: 7² + 24² = 625 and 25² = 625, so the triangle is right-angled.

Sides 6, 7, 9: 6² + 7² = 85 and 9² = 81, so the triangle is acute.

Sides 5, 8, 11: 5² + 8² = 89 and 11² = 121, so the triangle is obtuse.

Example 8: the distance between (2, -1) and (7, 11)

The horizontal gap is 5 and the vertical gap is 12. Distance = √(25 + 144) = 13 units. Notice: that is the 5-12-13 triple.

Example 9: an isosceles right triangle and the height of an equilateral triangle

With two equal legs of 5 cm, the hypotenuse is 5√2 ≈ 7.07 cm. In an equilateral triangle of side 10 cm, the height splits the base into 5 + 5, so the height = √(10² − 5²) ≈ 8.66 cm.

Example 10: walk 12 km north, then 9 km east; how far from the start?

North and east are perpendicular, so the distance is √(12² + 9²) = 15 km. Likewise, walking the edges of a 40 m × 30 m field takes 70 m, but the diagonal is 50 m; the shortcut saves 20 m.

Mistakes everyone makes

Marks are rarely lost for not knowing the formula; they are lost to these small slips.

  • Calling the wrong side c. The hypotenuse is always opposite the right angle and always the longest; find it first.
  • Writing c = a + b. Adding squares is not adding sides: 3 + 4 = 7, but the hypotenuse is 5.
  • Forgetting the square root: getting c² = 25 and writing 25 as the answer. The last step is always √.
  • Using the formula on a triangle that is not right-angled. The condition is one angle of exactly 90°; otherwise you need the law of cosines.
  • Leaving out the reasons in a proof. Steps without the “why” do not earn full marks.
  • Mixing units: one side in centimetres, another in metres. Convert first.

The Pythagorean theorem in real life

Architects and builders check square corners with 3-4-5. Surveyors measure diagonal distances across land this way. For short distances, a map app finding how far apart two places are is essentially doing this sum. In video games, the distance between two characters, or between the mouse and a button, is √(dx² + dy²).

In physics, the resultant of two perpendicular velocities or forces comes from Pythagoras: the true speed of a boat crossing a river, the speed of a projectile at any instant. In electrical engineering, the impedance of an AC circuit uses the same formula. It is not just a geometry chapter; it is one of the most used formulas in all of mathematics.

Exam corner

In middle school and Class 8 to 10 exams, expect: find the hypotenuse or a leg; state and prove the theorem; decide whether a triangle is right-angled; and a word problem about a ladder, a pole, a field or a screen. In Bangladesh's SSC and in many Indian state boards the proof itself is a common long question; check your current syllabus, since CBSE's rationalised syllabus changed how the proof is treated.

In higher classes the theorem rarely appears by name, but it is everywhere: the distance formula, vector magnitudes, trigonometric identities and the law of cosines. In admission and entrance tests, recognising a Pythagorean triple instantly saves real time.

  • Learn the statement word for word: “In a right-angled triangle, the square on the hypotenuse …”.
  • In a proof, draw the figure, write the given and the construction, and give a reason for every step.
  • Practise at least two proofs (four triangles and the trapezium); a paper may ask for “another proof”.
  • Always write units, and give a non-whole square root to two decimal places.

Revision summary

Read just this part the night before the exam and the whole chapter comes back.

  • Condition: one angle of the triangle is exactly 90°.
  • Formula: hypotenuse² = leg² + leg², a² + b² = c².
  • Hypotenuse: c = √(a² + b²); leg: a = √(c² − b²).
  • Converse: a² + b² = c² means right; greater means acute; smaller means obtuse.
  • Triples: 3-4-5, 5-12-13, 8-15-17, 7-24-25; Euclid: m² − n², 2mn, m² + n².
  • Distance: d = √[(x₂ − x₁)² + (y₂ − y₁)²].

Frequently asked questions

What is the Pythagorean theorem?

In a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². The hypotenuse c is the side opposite the right angle.

What is the Pythagorean theorem formula?

a² + b² = c². To find the hypotenuse use c = √(a² + b²); to find a leg use a = √(c² − b²).

What is the easiest proof of the Pythagorean theorem?

Arrange four copies of the triangle inside a square of side a + b. The big square's area is (a + b)² = c² + 2ab, which simplifies to a² + b² = c². The “Rearrangement proof” mode above animates it.

What is the converse of the Pythagorean theorem?

If the square of one side of a triangle equals the sum of the squares of the other two, the angle between those two sides is a right angle. For example, a triangle with sides 7, 24 and 25 is right-angled because 49 + 576 = 625.

What is a Pythagorean triple?

Three positive whole numbers a, b, c with a² + b² = c², such as 3-4-5 or 5-12-13. For any whole numbers m > n, the numbers m² − n², 2mn and m² + n² form a triple.

Does the Pythagorean theorem work for every triangle?

No, only for right triangles. For any other triangle use the law of cosines, c² = a² + b² − 2ab·cos C. When C = 90°, cos C = 0 and it reduces to the Pythagorean theorem.

How do I know which side is the hypotenuse?

It is the side directly opposite the 90° angle, and it is always the longest side. Find the angle marked with a small square and take the side across from it.

Can the Pythagorean theorem be used in 3D?

Yes. Apply it twice: the diagonal of a box with sides x, y and z is √(x² + y² + z²). For a cube of side s the space diagonal is s√3.

Who discovered the Pythagorean theorem?

It is named after the Greek mathematician Pythagoras (6th century BCE), but the relationship was known earlier in Babylon, Egypt and India, where Baudhayana's Sulba Sutra states it for building altars.

Keep studying this topic

The animation made the idea click; now turn it into marks. Syllabus, suggestions, textbooks and admission-test guides are below.

More math animations

Grade 10–11

Trigonometric Ratios and the Unit Circle

Drag a point round the unit circle and watch sin, cos and tan change. Standard angle table, ASTC signs, identities, radians and graphs, with solved examples.

Grade 9–11

Quadratic functions and their graphs

Drag the vertex and change a, b, c to see how a quadratic function graph moves. Learn factoring, completing the square, the quadratic formula and discriminant.

Grade 9–10

Circle theorems

All the circle theorems with drag-and-check diagrams: angle at the centre, same segment, semicircle, cyclic quadrilateral, chords, tangents and alternate segment.

Grade 9–10

Heights and distances: elevation and depression angles

What angle of elevation and angle of depression mean, how the height-and-distance formula works, and how two observations solve a tower's height without ever measuring it — with an interactive simulation and solved problems.

Grade 9–11

Probability: experimental vs theoretical probability

What probability means, how the sample-space formula P(E) = n(E)/n(S) works, and why experimental frequency edges closer to theoretical probability the more you flip, roll or draw — with a coin, dice and coloured-ball simulator.

Grade 10–11

Arithmetic and Geometric Sequences

Learn the arithmetic and geometric sequence formulas for the nth term and sum, Gauss's pairing trick, and the sum-to-infinity formula a/(1−r), with a drag-and-slide bar-chart simulation and worked examples.

Grade 9–10

Mean, Median and Mode

Learn the mean, median and mode formulas, why the median resists an outlier while the mean does not, and the grouped-data median/mode formulas, by dragging points on a number line, with worked examples.

Animations in other subjects