The **Pythagorean theorem** or **Pythagoras' theorem** is named after and commonly attributed to the 6th century BC Greek philosopher and mathematician Pythagoras, though the facts of the theorem were known before he lived. The theorem states:

The sum of the areas of the squares on the legs of a right triangle is equal to the area of the square on the hypotenuse.

(A right triangle is one with a right angle; the legs are the two sides that make up the right angle; the hypotenuse is the third side opposite the right angle; the square on a side of the triangle is a square, one of whose sides is that side of the triangle).

Since the area of a square is the square of the length of a side, we can also formulate the theorem as:

Given a right triangle, with legs of lengthsaandbandhypotenuseof lengthc, then

**Proof:** *(see image, right)* Draw a right triangle with sides *a*, *b*, and *c* as above. Then take a copy of this triangle and place its *a* side in line with the *b* side of the first, so that their *c* sides form a right angle (this is possible because the angles in any triangle add up to two right angles -- think it through). Then place the *a* side of a third triangle in line with the *b* side of the second, again in such a manner that the *c* sides form a right angle. Finally, complete a square of side (*a+b*) by placing the *a* side of a fourth triangle in line with the *b* side of the third. On the one hand, the area of this square is **(a+b) ^{2}** because (

Note that this proof does not work in non-Euclidean geometries, since, say, on a sphere, the angles of a triangle don't add up to 180 degrees, and the above "square" cannot be formed. (See the external links below for a sampling of the many different proofs of the Pythagorean theorem.)

There are many different proofs of the Pythagorean theorem; United States President Garfield developed one himself. One of the more interesting alternatives is the calculus proof based on Euler's formula (establishing the Pythagorean identity).

The converse of the Pythagorean theorem is also true:

For any three positive numbersa,b, andcsuch thata, there exists a triangle with sides^{2}+b^{2}=c^{2}a,bandc, and every such triangle has a right angle between the sides of lengthsaandb.

This can be proven using the law of cosines which is a generalization of the Pythagorean theorem applying to *all* (Euclidean) triangles, not just right-angled ones.

Another generalization of the Pythagorean theorem was already given by Euclid in his *Elements*:

If one erects similar figures (see geometry) on the sides of a right triangle, then the sum of the areas of the two smaller ones equals the area of the larger one.

The Pythagorean theorem stated in Cartesian coordinates is the formula for the distance between points in the plane -- if (*a*, *b*) and (*c*, *d*) are points in the plane, then the distance between them is given by

The Pythagorean theorem also generalizes to higher-dimensional simplexes. If a tetrahedron has a right angle corner (a corner of a cube), then the square of the area of the face opposite the right angle corner is the sum of the squares of the areas of the other three faces. This is called **de Gua's theorem**.

Since the Pythagorean theorem is derived from the axioms of Euclidean geometry, and physical space may not always be Euclidean, it need not be true of triangles in physical space. One of the first mathematicians to realize this was Carl Friedrich Gauss, who then carefully measured out large right triangles as part of his geographical surveys in order to check the theorem. He found no counterexamples to the theorem within his measurement precision. The theory of general relativity holds that matter and energy cause space to be non-Euclidean and the theorem does therefore not strictly apply in the presense of matter or energy. However, the deviation from Euclidean space is small except near strong gravitational sources such as black holes. Whether the theorem is violated over large cosmological scales is an open problem of cosmology.

Given two vectors, *A* and *B*, the Pythagorean Theorem states

||A+B||^{2}= ||A||^{2}+ ||B||^{2}if and only if the two vectors are orthogonal.

See also:

- pythagorean triple, orthogonality, linear algebra, synthetic geometry, Fermat's last theorem, parallelogram law

- http://www.cut-the-knot.org/pythagoras/index.html
- How to calculate the sides of a octagon using Microsoft Windows calculator and the pythagorean theorem. http://buster2058.netfirms.com/octagon/octagon.htm