,

The Pythagorean theorem relates the three side lengths of a right triangle. If aa and bb are the legs meeting at the right angle and cc is the hypotenuse opposite that angle, then

a2+b2=c2.a^2+b^2=c^2.

The placement of the right angle, not the orientation of the drawing, tells you which side is cc. The hypotenuse is also the longest side. Calling a sloping segment the hypotenuse without first identifying a right angle is not enough.

On this page

The theorem is an area relationship

A square of side length aa has area a2a^2. The equation says that the areas of the squares on the legs add to the area of the square on the hypotenuse. It does not say that the leg lengths themselves add to the hypotenuse.

For a 33–44–55 right triangle, the areas are 99, 1616 and 2525 square units. The relation is 9+16=259+16=25, not 3+4=53+4=5.

Four equal triangles leave a central square

Four equal triangles leave a central squareFour three-four-five right triangles sit in a seven-by-seven square. Their hypotenuses bound an inner five-by-five square.c²ababc
Subtract the four triangle areas from the outer square: c² = (a + b)² − 2ab.
Diagram explanation and exact data

The drawing uses a=3, b=4 and c=5. The central angles are right angles because the acute angles of each right triangle are complementary. The area argument in the text uses general positive a and b, not just these chosen lengths.

Four equal triangles leave a central square: exact reference data
Region Example area
Outer square 72=497^2=49
Four triangles 4(3⋅4/2)=244(3\cdot4/2)=24
Central square 49−24=2549-24=25

An alternative dissection moves pieces of the two leg-squares directly into the hypotenuse-square. The next illustration shows that different arrangement; it is not the four-triangle layout used in the algebra above.

The leg-squares reassembled

Pythagorean dissection of squares on a right triangleColoured pieces from the two squares on the triangle legs are rearranged without changing area to fill the square on the hypotenuse.
The two squares beside the triangle are cut into pieces that fit the square beneath its hypotenuse. The source artwork is a geometric dissection, not a coordinate graph.
Diagram explanation and source

The unfilled triangle between the three squares is right-angled. Each coloured polygon from a leg-square has a matching piece in the lower square. Moving a piece rigidly does not change its area. The square outlines, piece boundaries and the accompanying equation explain the area relationship independently of colour. The general four-triangle proof below supplies the algebraic argument.

Source: Pythagorean theorem rearrangement.svg, Brews ohare (original); Gauravjuvekar (SVG derivative). Licensed under CC BY-SA 3.0. Artwork paths and colours unchanged; XML declaration and external DTD omitted. The inline adaptation retains the same licence.

An area proof

Arrange four copies of a right triangle with legs a,ba,b around a central square inside a larger square of side a+ba+b. Each central side is a hypotenuse of length cc. The two acute angles of a right triangle add to 90∘90^\circ, which makes every corner of the central region a right angle. It is therefore a square, not just a four-sided gap.

Calculate the large area in two ways:

(a+b)2=4(12ab)+c2.(a+b)^2=4\left(\frac12 ab\right)+c^2.

Expanding and subtracting the triangular areas gives

a2+2ab+b2=2ab+c2⇒a2+b2=c2.a^2+2ab+b^2=2ab+c^2\quad\Longrightarrow\quad a^2+b^2=c^2.

This argument works for arbitrary positive leg lengths. The particular diagram helps explain it; the algebra supplies the general relationship. Euclid I.47 provides a different geometric proof.

Finding the hypotenuse

A right triangle has legs 6 cm6\text{ cm} and 8 cm8\text{ cm}. Substitute those lengths before taking a square root:

c2=62+82=36+64=100,c=10 cm.c^2=6^2+8^2=36+64=100,\qquad c=10\text{ cm}.

Only the positive square root represents a side length. The negative solution to the algebraic equation c2=100c^2=100 does not represent another physical length.

If the legs are 2 cm2\text{ cm} and 5 cm5\text{ cm}, the exact answer is

c=22+52=29 cm≈5.385 cm.c=\sqrt{2^2+5^2}=\sqrt{29}\text{ cm}\approx5.385\text{ cm}.

Keep 29\sqrt{29} during later calculations. Rounding it early can introduce avoidable error.

Finding a missing leg

If the hypotenuse is known, subtract the known leg’s square from the hypotenuse’s square. A 13 m13\text{ m} hypotenuse and a 5 m5\text{ m} leg give

b2=132−52=169−25=144,b=12 m.b^2=13^2-5^2=169-25=144,\qquad b=12\text{ m}.

A common error is to calculate 132+52\sqrt{13^2+5^2}. That treats the known hypotenuse as a leg and produces a new length larger than it, contradicting the geometry.

An idealized ladder of length 5 m5\text{ m} resting against a vertical wall with its foot 1.4 m1.4\text{ m} from the wall reaches

h=52−1.42=23.04=4.8 m.h=\sqrt{5^2-1.4^2}=\sqrt{23.04}=4.8\text{ m}.

This calculation assumes a right angle between wall and ground and measures the ladder as a straight segment. It is a geometric model, not guidance on safe ladder placement.

The converse: checking whether an angle is right

The theorem begins with a right triangle and concludes a side equation. Its converse begins with positive side lengths that form a triangle. If the square of the longest side equals the sum of the other two squares, the angle opposite that longest side is right.

For sides 88, 1515 and 1717,

82+152=64+225=289=172.8^2+15^2=64+225=289=17^2.

The triangle is right-angled. For 66, 77 and 1010, the triangle inequality holds, but 62+72=85<100=1026^2+7^2=85<100=10^2. The largest angle is obtuse. For 66, 77 and 88, 85>6485>64, so the largest angle is acute and the triangle is acute. These comparisons follow more generally from the cosine rule.

The equality test is exact. Rounded measurements that nearly satisfy it support an approximate assessment, not an exact theorem about the underlying object.

Diagonals and coordinates

A rectangle’s diagonal is a hypotenuse because adjacent sides meet at right angles. A rectangle 9 cm9\text{ cm} by 12 cm12\text{ cm} has diagonal 15 cm15\text{ cm}.

Coordinate differences provide perpendicular legs as well. Between (1,−2)(1,-2) and (7,6)(7,6), the horizontal difference is 66 and the vertical difference is 88, so the straight-line distance is 1010 coordinate units. Distance Between Two Points derives the general distance formula from this construction.

In a rectangular box with mutually perpendicular edges 22, 33 and 66, apply the theorem twice. A base diagonal has square 22+32=132^2+3^2=13. The space diagonal therefore has square 13+62=4913+6^2=49 and length 77. This works because the height is perpendicular to the base plane.

What the theorem does not allow

For a non-right triangle, a2+b2=c2a^2+b^2=c^2 is not the general side relation. Nor can the theorem be applied to three convenient lengths in a diagram without showing that they are sides of the same right triangle.

Squaring a sum is another frequent trap: (a+b)2=a2+2ab+b2(a+b)^2=a^2+2ab+b^2, not a2+b2a^2+b^2. The proof above uses the middle term deliberately; omitting it would destroy the area argument.

Before calculating, identify the right angle, label the opposite side, confirm common units and decide whether a sum or difference of squares is needed. After calculating, check that every leg is shorter than the hypotenuse.

Practice questions

  1. Find the hypotenuse when the legs are 9 cm9\text{ cm} and 12 cm12\text{ cm}.
  2. Find the other leg when the hypotenuse is 10 cm10\text{ cm} and one leg is 6 cm6\text{ cm}.
  3. Do sides 77, 2424 and 2525 form a right triangle?
Check your answers
  1. c=81+144=225=15 cmc=\sqrt{81+144}=\sqrt{225}=15\text{ cm}.
  2. The missing leg is 100−36=8 cm\sqrt{100-36}=8\text{ cm}. Adding the squares would wrongly treat the hypotenuse as a leg.
  3. Yes. The lengths form a triangle and 72+242=49+576=625=2527^2+24^2=49+576=625=25^2. The angle opposite the side of length 2525 is right.

Related topics

Use Distance Between Two Points for coordinate distances and Trigonometric Ratios when a right-triangle problem also involves acute angles. Proof in Geometry explains the difference between a theorem and its converse.

Sources and further reading