In mathematics, the **Pythagorean theorem** — or **Pythagoras’ theorem** — is a relation in Euclidean geometry among the three sides of a right triangle (*right-angled triangle*). In terms of areas, it states:

In any right-angled triangle, the area of the square whose side is the hypotenuse (the side opposite the right angle) is equal to the sum of the areas of the squares whose sides are the two legs (the two sides that meet at a right angle).

The theorem can be written as an equation relating the lengths of the sides *a*, *b* and *c*, often called the *Pythagorean equation*:^{[1]}

where *c* represents the length of the hypotenuse, and *a* and *b* represent the lengths of the other two sides.

The Pythagorean theorem is named after the Greek mathematician Pythagoras (*ca.* 570 BC—*ca.* 495 BC), who by tradition is credited with its discovery and proof,^{[2]}^{[3]} although it is often argued that knowledge of the theorem predates him. There is evidence that Babylonian mathematicians understood the formula, although there is little surviving evidence that they used it in a mathematical framework.^{[4]}^{[5]}

The theorem has numerous proofs, possibly the most of any mathematical theorem. These are very diverse, including both geometric proofs and algebraic proofs, with some dating back thousands of years. The theorem can be generalized in various ways, including higher-dimensional spaces, to spaces that are not Euclidean, to objects that are not right triangles, and indeed, to objects that are not triangles at all, but *n*-dimensional solids. The Pythagorean theorem has attracted interest outside mathematics as a symbol of mathematical abstruseness, mystique, or intellectual power; popular references in literature, plays, musicals, songs, stamps and cartoons abound.