Home › Reference information › Geometry formulas › Pythagorean theorem

Pythagorean theorem: formula, proof, and problems with solutions

Short answer The Pythagorean theorem states that in a right triangle, the square of the hypotenuse equals the sum of the squares of the legs: a² + b² = c². Here a and b are the legs, and c is the hypotenuse (the side opposite the right angle).

The Pythagorean theorem is one of the fundamental theorems of geometry. On this page, you will find the formula, the proof, the converse theorem, a table of Pythagorean triples, typical problems with solutions, and examples of application in construction.


The Pythagorean theorem is perhaps one of the most famous theorems in mathematics in general and geometry in particular. In fact, despite being named after Pythagoras, it was known a thousand years before him.

Pythagorean theorem. Right triangle

The Pythagorean theorem states: in a right triangle, the square of the hypotenuse equals the sum of the squares of the legs. If the legs are a and b, and the hypotenuse is c, then:

a2 + b2 = c2
Geometric explanation of the Pythagorean theorem

We know that the quantity a2 describes the area of a square with side a. That is, if we construct a square on leg a, a square on leg b, and a square on hypotenuse c, we obtain that the area of the square with side a plus the area of the square with side b equals the area of the square with side c. This is the so-called geometric explanation of the Pythagorean theorem: the sum of the areas of the squares built on the legs equals the area of the square built on the hypotenuse.

If instead of squares you construct any similar figures, say semicircles, then the sum of the areas built on the legs will still equal the area of the figure built on the hypotenuse.


Proof of the Pythagorean theorem

Today, more than 200 different proofs of the Pythagorean theorem are known. We will use one of them.

Pythagorean theorem. Right triangle

In order to prove the Pythagorean theorem, consider a right triangle with legs a, b and hypotenuse c.

Pythagorean theorem. Extend the leg of length a by a distance b

Extend the right triangle with sides a, b, c to a square as follows: extend the leg of length a by a distance b.

Pythagorean theorem. From the end of the resulting segment a+b draw a perpendicular at a distance a

From the end of the resulting segment a+b, draw a perpendicular at a distance a.

Pythagorean theorem. By joining points A and A', we obtain the original triangle, only turned over

By joining points A and A', we obtain the original triangle, only turned over.

Pythagorean theorem. Similarly, we extend from the other sides. We get a square with side a+b

Similarly we extend from the other sides. We get a square with side a+b.

Pythagorean theorem. What the square consists of

We know:

  • The area of the square with side a+b equals the square of the side (a+b).
  • The square consists of four identical right triangles and an inner figure — a square. The area of each right triangle is half the product of its legs.
  • The inner figure — a square — has sides c.
    Let us prove that the inner figure is a square.
    All sides of the figure are equal — so it is a rhombus. If we prove that one angle is right, then all the other angles will also be right.
    From the properties of a right triangle we know that the acute angles of a right triangle sum to 90°.
    ∡1'+∡2'=90°
    Since all the triangles shown are equal, ∡2'=∡2" and ∡1'+∡2"=90°
    Hence it follows that 180°-∡1'+∡2"=90° — this is the angle between the sides of the inner figure — the rhombus.
    In our case it was proved that this rhombus is a square.

Transforming what was described above into a formula, we get:

a+b2=4·12ab+c2

Expand the square of a sum formula:

a2+b2+2ab=2ab+c2

Cancel 2ab:

a2+b2+2ab=2ab+c2

We get:

a2+b2=c2

We have proved the Pythagorean theorem.

Converse of the Pythagorean theorem

The converse of the Pythagorean theorem allows you to determine whether a triangle is right-angled if you know the lengths of its sides.

Statement

If the square of one side of a triangle equals the sum of the squares of the other two sides, then the triangle is right-angled, and the right angle lies opposite the longest side.

If for the sides of a triangle with sides a, b, and c (where c is the longest side) the following equality holds:

a2+b2=c2

then the triangle is right-angled and the angle between the sides a and b equals 90°.

Example. Check whether a triangle is right-angled

Given:
A triangle with sides 6, 7, and 9.

Solution:
The longest side is 9. Let us check whether the equality holds:

92=81

62+72=36+49=85

Since 81≠85, the equality does not hold.

Answer: a triangle with sides 6, 7, and 9 is not right-angled.

Pythagorean triples

Pythagorean triples are sets of three natural numbers a, b, and c for which the equality a² + b² = c² holds. Such triples are useful to memorize: they are often encountered in problems and allow you to quickly find the sides of a right triangle without computation.

The most well-known Pythagorean triples:

a b c
345
51213
6810
81517
72425
91215
94041
121620
152025
202129

The triple 3, 4, 5 is called the Egyptian triangle — it was used by the ancient Egyptians to construct right angles.

How to get new Pythagorean triples

If a Pythagorean triple is multiplied by any natural number k, a new Pythagorean triple is obtained. For example, from the triple (3, 4, 5) with k = 2 we get (6, 8, 10), and with k = 3 — (9, 12, 15).

Problems on the topic "Pythagorean theorem"

Egyptian triangle

Problems on the topic "Pythagorean theorem". Egyptian triangle

Given:
A right triangle with legs 3 and 4.

Required to find its hypotenuse.

Solution:
Denote the hypotenuse as c and use the Pythagorean theorem: the sum of the squares of the legs equals the square of the hypotenuse:
32+42=c2
9+16=c2
25=c2
c=5

Answer: the hypotenuse of a right triangle with legs 3 and 4 equals 5.

A right triangle with sides 3, 4, and 5 is called the Egyptian triangle.

Pythagorean triple

Problems on the topic "Pythagorean theorem". Triangle with sides 5, 12, and 13

Given:
The hypotenuse is 13, and one of the legs is 12.

Required to find the second leg.

Solution:
Denote the second leg as a and again use the Pythagorean theorem: the sum of the squares of the legs equals the square of the hypotenuse:
122+a2=132
144+a2=169
a2=169-144
a2=25
a=5

Answer: the second leg a of a right triangle with hypotenuse 13 and one leg 12 equals 5.

Note that in the first and second examples the sides of the triangles turned out to be whole numbers. Such numbers, which satisfy the Pythagorean theorem, are called Pythagorean triples.

Find the hypotenuse

Given:
A right triangle with legs 6 and 8.

Required to find the hypotenuse.

Solution:
Denote the hypotenuse as c and apply the Pythagorean theorem:
62+82=c2
36+64=c2
100=c2
c=10

Answer: the hypotenuse equals 10.

Find a leg

Given:
A right triangle with hypotenuse 10 and leg 6.

Required to find the second leg.

Solution:
Denote the second leg as b and apply the Pythagorean theorem:
b2+62=102
b2+36=100
b2=100-36
b2=64
b=8

Answer: the second leg equals 8.

Isosceles trapezoid

Problems on the topic "Pythagorean theorem". Isosceles trapezoid. Given

Given:
An isosceles trapezoid. The top base is 4, the lateral side is 10, the bottom base is 20.

Required to find the area of the trapezoid S.

Solution:

Pythagorean theorem. Isosceles trapezoid. Solution. Drop perpendiculars to the base

Denote the angles of the trapezoid by points A, B, C, D. From points B and C, drop perpendiculars to side AD at points E and K respectively.

Consider the quadrilateral BCKE. This quadrilateral is a rectangle. Sides BC and EK are mutually parallel, and sides BE and CK are also mutually parallel, and one of the angles of the rectangle BCKE is 90°. This proves that the quadrilateral BCKE is a rectangle.

In a rectangle, opposite sides are equal. If segment BC equals 4, then EK also equals 4.

Pythagorean theorem. Isosceles trapezoid. Solution. Identical triangles

Since our trapezoid is isosceles, the left and right triangles are equal to each other, because they have equal legs and equal hypotenuses. By the criteria for congruence of right triangles they are equal. This means that segments AE and KD are equal to each other.

Segment AD is 20, segment EK is 4. Hence, for the segments (AE+KD) there remains 20-4=16. Hence each of them equals 8.

Pythagorean theorem. Isosceles trapezoid. Solution. Find the height of the trapezoid

Consider any of the triangles, for example ABE. It is a right triangle. One of the legs equals 8, and the hypotenuse equals 10.

By the Pythagorean theorem we can find BE. The sum of the squares of the legs equals the square of the hypotenuse:
BE2+82=102
BE2+64=100
BE2=100-64
BE2=36
BE=6
Thus we have found the height of the trapezoid.

Pythagorean theorem. Isosceles trapezoid. Result of the solution

Now we can find the area of the trapezoid S.
The area of the trapezoid equals the half-sum of the bases multiplied by the height of the trapezoid.

4+202·6=72

Answer: the area of the trapezoid S equals 72.

Applications of the Pythagorean theorem

The most frequent application of the Pythagorean theorem can be seen in construction. Modern laser rangefinders have a built-in function that indirectly determines the length of the third side of a triangle when measuring two other sides.

Let us consider two theoretical examples where one needs to calculate a roof structure, and in the other we will learn to position the walls of a house relative to each other at an angle of 90°.

Calculation of the roof rafter system

The problem is extremely simplified for exact calculations of the roof rafter system, but it is clear enough to convey the principles of calculation using the Pythagorean theorem.

Calculation of the roof rafter system

Given:
The distance between the mauerlat (M) and the ledger (L) (they lie on the walls) is known and equals 5 meters.
The roof is covered with metal tiles, whose minimum recommended slope angle is 22.5°.
The post (h) is positioned strictly perpendicular to the ledger (L).

Required to find the length of the rafter (g) and the height of the post (h).

Solution:

To find the height of the post (h), one can apply the law of sines. To do this, one needs to find the angle opposite the known side. Knowing that the sum of the angles of a triangle is 180°, we calculate the angle opposite the known side ML:
180°-90°-22,5°=67,5°

Now we substitute the known values into the formula for determining the height of the post (h) using the law of sines:
sin22,5° h=sin67,5°ML

h=5·sin22,5°sin67,5°=2.0710678118655

One can also find the length (g) using the law of sines, but we are interested in the Pythagorean theorem.

Therefore, knowing that the square of the hypotenuse (in our case this is g) equals the sum of the squares of the legs (in our case these are h and the distance between points ML), we obtain:

g2=h2+ML2

Substituting the previously calculated and known values into the formula, we get:

g=5.411961001462

Answer: the obtained values are measured in meters. In construction, rounding such parts to millimeters is more than accurate. Therefore, rounding the values of the rafter g and the post h, we get:

g≈5412мм

h≈2071мм

Egyptian triangle

Application of the Pythagorean theorem. Egyptian triangle

Another example of the practical application of the Pythagorean theorem in construction is the use of the Egyptian triangle.

To lay out a 90° angle on a flat surface, one needs to take a rope and mark three distances on it: 3, 4, 5. It does not matter in what units the segments are measured; perhaps these units of measurement will be invented by you.

Join the rope into a triangle, as shown in the image, and stretch the sides of the resulting triangle.

The angle between the sides 3, 4 will always be 90°. Using it, one can lay out the walls or the foundation of a future house.

Online Pythagorean theorem calculator

Enter two known values — the calculator will find the third using the Pythagorean theorem. Both integer and decimal numbers are supported.

The calculator uses the formula c = √(a² + b²) for the hypotenuse and a = √(c² − b²) for a leg.

About the author and verification

The material was prepared by Alexey Pavlov, a mathematics teacher with over 10 years of experience in school and tutoring. All formulas, proofs, and problems have been tested in practice while preparing students for the OGE and EGE. The Pythagorean theorem appears in OGE and EGE tasks every year — both in the basic and in the profile part.

Frequently asked questions about the Pythagorean theorem

How is the Pythagorean theorem stated?

In a right triangle, the square of the hypotenuse equals the sum of the squares of the legs: a² + b² = c², where a and b are the legs, c is the hypotenuse.

What is the Egyptian triangle?

It is a right triangle with sides 3, 4, and 5. It is called Egyptian because it was used by the ancient Egyptians to construct right angles when building pyramids.

What Pythagorean triples exist?

Pythagorean triples are sets of integers satisfying the Pythagorean theorem. Examples: (3, 4, 5), (5, 12, 13), (8, 15, 17), (7, 24, 25), (9, 40, 41).

Where is the Pythagorean theorem applied?

The Pythagorean theorem is widely applied in construction (rafter calculation, foundation layout), geodesy, navigation, astronomy, computer graphics, and many other fields.

How do you find a leg using the Pythagorean theorem?

To find leg a, use the formula: a = √(c² - b²), where c is the hypotenuse, b is the known leg.

What is the hypotenuse by the Pythagorean theorem?

The hypotenuse equals the square root of the sum of the squares of the legs: c = √(a² + b²). For example, if the legs are 6 and 8, then the hypotenuse is c = √(36 + 64) = √100 = 10.

How do you find a leg using the Pythagorean theorem?

To find leg a, use the formula: a = √(c² − b²), where c is the hypotenuse, b is the known leg. For example, if the hypotenuse is 10 and the known leg is 6, then a = √(100 − 36) = √64 = 8.

For which triangles does the Pythagorean theorem work?

The Pythagorean theorem works only for right triangles, i.e., triangles with one angle equal to 90°. For non-right triangles, the law of cosines is used.

Compiled by: Alexey Pavlov, mathematics teacher. Source: standard school geometry curriculum, materials for the OGE and EGE preparation. Last updated: 11.10.2026

  • Quick facts
  • Tables
  • Formulas
  • Geometry formulas
  • Math theory