# Pythagorean theorem The Pythagorean theorem: The sum of the areas of the two squares on the legs (a and b) equals the area of the square on the hypotenuse (c).
 Trigonometry Reference Euclidean theory Law of sines Law of cosines Law of tangents Pythagorean theorem Calculus

In mathematics, the Pythagorean theorem (American English) or Pythagoras' theorem (British English) is a relation in Euclidean geometry among the three sides of a right triangle. The theorem is usually written as an equation: $a^2 + b^2 = c^2\!\,$

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

The square of the hypotenuse of a right triangle is equal to the sum of the squares on the other two sides.

The Pythagorean theorem is named after the Greek mathematician Pythagoras, who by tradition is credited with its discovery and proof, although it is often argued that knowledge of the theory predates him. (There is much evidence that Babylonian mathematicians understood the principle, if not the mathematical significance).

## In formulae

If we let c be the length of the hypotenuse and a and b be the lengths of the other two sides, the theorem can be expressed as the equation: $a^2 + b^2 = c^2\,$

or, solved for c: $c = \sqrt{a^2 + b^2}. \,$

If c is already given, and the length of one of the legs must be found, the following equations can be used (The following equations are simply the converse of the original equation): $c^2 - a^2 = b^2\,$

or $c^2 - b^2 = a^2.\,$

This equation provides a simple relation among the three sides of a right triangle so that if the lengths of any two sides are known, the length of the third side can be found. A generalization of this theorem is the law of cosines, which allows the computation of the length of the third side of any triangle, given the lengths of two sides and the size of the angle between them. If the angle between the sides is a right angle it reduces to the Pythagorean theorem.

## Proofs

This is a theorem that may have more known proofs than any other (the law of quadratic reciprocity being also a contender for that distinction); the book Pythagorean Proposition, by Elisha Scott Loomis, contains 367 proofs.

Some arguments based on trigonometric identities (such as Taylor series for sine and cosine) have been proposed as proofs for the theorem. However, since all the fundamental trigonometric identities are proved using the Pythagorean theorem, there cannot be any trigonometric proof. (See also begging the question.)

### Proof using similar triangles

Like most of the proofs of the Pythagorean theorem, this one is based on the proportionality of the sides of two similar triangles.

Let ABC represent a right triangle, with the right angle located at C, as shown on the figure. We draw the altitude from point C, and call H its intersection with the side AB. The new triangle ACH is similar to our triangle ABC, because they both have a right angle (by definition of the altitude), and they share the angle at A, meaning that the third angle will be the same in both triangles as well. By a similar reasoning, the triangle CBH is also similar to ABC. The similarities lead to the two ratios..:

As $BC=a, AC=b, \text{ and } AB=c, \!$

so $\frac{a}{c}=\frac{HB}{a} \mbox{ and } \frac{b}{c}=\frac{AH}{b}.\,$

These can be written as $a^2=c\times HB \mbox{ and }b^2=c\times AH. \,$

Summing these two equalities, we obtain $a^2+b^2=c\times HB+c\times AH=c\times(HB+AH)=c^2 .\,\!$

In other words, the Pythagorean theorem: $a^2+b^2=c^2.\,\!$

### Euclid's proof

In Euclid's Elements, Proposition 47 of Book 1, the Pythagorean theorem is proved by an argument along the following lines. Let A, B, C be the vertices of a right triangle, with a right angle at A. Drop a perpendicular from A to the side opposite the hypotenuse in the square on the hypotenuse. That line divides the square on the hypotenuse into two rectangles, each having the same area as one of the two squares on the legs.

For the formal proof, we require four elementary lemmata:

1. If two triangles have two sides of the one equal to two sides of the other, each to each, and the angles included by those sides equal, then the triangles are congruent. (Side - Angle - Side Theorem)
2. The area of a triangle is half the area of any parallelogram on the same base and having the same altitude.
3. The area of any square is equal to the product of two of its sides.
4. The area of any rectangle is equal to the product of two adjacent sides (follows from Lemma 3).

The intuitive idea behind this proof, which can make it easier to follow, is that the top squares are morphed into parallelograms with the same size, then turned and morphed into the left and right rectangles in the lower square, again at constant area.

The proof is as follows:

1. Let ACB be a right-angled triangle with right angle CAB.
2. On each of the sides BC, AB, and CA, squares are drawn, CBDE, BAGF, and ACIH, in that order.
3. From A, draw a line parallel to BD and CE. It will perpendicularly intersect BC and DE at K and L, respectively.
4. Join CF and AD, to form the triangles BCF and BDA.
5. Angles CAB and BAG are both right angles; therefore C, A, and G are collinear. Similarly for B, A, and H.
6. Angles CBD and FBA are both right angles; therefore angle ABD equals angle FBC, since both are the sum of a right angle and angle ABC.
7. Since AB and BD are equal to FB and BC, respectively, triangle ABD must be equal to triangle FBC.
8. Since A is collinear with K and L, rectangle BDLK must be twice in area to triangle ABD.
9. Since C is collinear with A and G, square BAGF must be twice in area to triangle FBC.
10. Therefore rectangle BDLK must have the same area as square BAGF = AB2.
11. Similarly, it can be shown that rectangle CKLE must have the same area as square ACIH = AC2.
12. Adding these two results, AB2 + AC2 = BD × BK + KL × KC
13. Since BD = KL, BD* BK + KL × KC = BD(BK + KC) = BD × BC
14. Therefore AB2 + AC2 = BC2, since CBDE is a square.

This proof appears in Euclid's Elements as that of Proposition 1.47.

### Garfield's proof

James A. Garfield (later President of the United States) is credited with a novel algebraic proof:

The whole trapezoid is half of an (a+b) by (a+b) square, so its area = (a+b)2/2 = a2/2 + b2/2 + ab.

Triangle 1 and triangle 2 each have area ab/2.

Triangle 3 has area c2/2, and it is half of the square on the hypotenuse.

But the area of triangle 3 also = (area of trapezoid) - (areas of triangles 1 and 2)

= a2/2 + b2/2 + ab - ab/2 - ab/2
= a2/2 + b2/2
= half the sum of the squares on the other two sides.

Therefore the square on the hypotenuse = the sum of the squares on the other two sides.

### Proof by subtraction

In this proof, the square on the hypotenuse plus 4 copies of the triangle can be asssembled into the same shape as the squares on the other two sides plus 4 copies of the triangle. This proof is recorded from China.

### Similarity proof

From the same diagram as that in Euclid's proof above, we can see three similar figures, each being "a square with a triangle on top". Since the large triangle is made of the two smaller triangles, its area is the sum of areas of the two smaller ones. By similarity, the three squares are in the same proportions relative to each other as the three triangles, and so likewise the area of the larger square is the sum of the areas of the two smaller squares.

### Proof by rearrangement Proof of Pythagorean theorem by rearrangement of 4 identical right triangles: Since the total area and the areas of the triangles are all constant, the total black area is constant. But this can be divided into squares delineated by the triangle sides a, b, c, demonstrating that a2 + b2 = c2.

A proof by rearrangement is given by the illustration and the animation. In the illustration, the area of each large square is (a + b)2. In both, the area of four identical triangles is removed. The remaining areas, a2 + b2 and c2, are equal. Q.E.D.

This proof is indeed very simple, but it is not elementary, in the sense that it does not depend solely upon the most basic axioms and theorems of Euclidean geometry. In particular, while it is quite easy to give a formula for area of triangles and squares, it is not as easy to prove that the area of a square is the sum of areas of its pieces. In fact, proving the necessary properties is harder than proving the Pythagorean theorem itself (see Lebesgue measure and Banach-Tarski paradox). Actually, this difficulty affects all simple Euclidean proofs involving area; for instance, deriving the area of a right triangle involves the assumption that it is half the area of a rectangle with the same height and base. For this reason, axiomatic introductions to geometry usually employ another proof based on the similarity of triangles (see above).

A third graphic illustration of the Pythagorean theorem (in yellow and blue to the right) fits parts of the sides' squares into the hypotenuse's square. A related proof would show that the repositioned parts are identical with the originals and, since the sum of equals are equal, that the corresponding areas are equal. To show that a square is the result one must show that the length of the new sides equals c. Note that for this proof to work, one must provide a way to handle cutting the small square in more and more slices as the corresponding side gets smaller and smaller.

### Algebraic proof

An algebraic variant of this proof is provided by the following reasoning. Looking at the illustration which is a large square with identical right triangles in its corners, the area of each of these four triangles is given by an angle corresponding with the side of length C. $\frac{1}{2} AB.$

The A-side angle and B-side angle of each of these triangles are complementary angles, so each of the angles of the blue area in the middle is a right angle, making this area a square with side length C. The area of this square is C2. Thus the area of everything together is given by: $4\left(\frac{1}{2}AB\right)+C^2.$

However, as the large square has sides of length A + B, we can also calculate its area as (A + B)2, which expands to A2 + 2AB + B2. $A^2+2AB+B^2=4\left(\frac{1}{2}AB\right)+C^2.\,\!$
(Distribution of the 4) $A^2+2AB+B^2=2AB+C^2\,\!$
(Subtraction of 2AB) $A^2+B^2=C^2\,\!$

### Proof by differential equations

One can arrive at the Pythagorean theorem by studying how changes in a side produce a change in the hypotenuse in the following diagram and employing a little calculus.

As a result of a change da in side a, $\frac {da}{dc} = \frac {c}{a}$

by similarity of triangles and for differential changes. So $c\, dc = a\,da$

which results from adding a second term for changes in side b.

Integrating gives $c^2 = a^2 + \mathrm{constant}.\ \,\!$

When a = 0 then c = b, so the "constant" is b2. So $c^2 = a^2 + b^2.\,$

As can be seen, the squares are due to the particular proportion between the changes and the sides while the sum is a result of the independent contributions of the changes in the sides which is not evident from the geometric proofs. From the proportion given it can be shown that the changes in the sides are inversely proportional to the sides. The differential equation suggests that the theorem is due to relative changes and its derivation is nearly equivalent to computing a line integral.

These quantities da and dc are respectively infinitely small changes in a and c. But we use instead real numbers Δa and Δc, then the limit of their ratio as their sizes approach zero is da/dc, the derivative, and also approaches c/a, the ratio of lengths of sides of triangles, and the differential equation results.

### Proof by shear mapping

One of the plane transformations that preserves area is the shear mapping. Since the Pythagorean theorem is concerned with areas, it is interesting that a proof can be based on this type of planar mapping. Mike May of Saint Louis University has provided an animated version of such a proof through use of the GeoGebra facility.

## Converse

The converse of the theorem is also true:

For any three positive numbers a, b, and c such that a2 + b2 = c2, there exists a triangle with sides a, b and c, and every such triangle has a right angle between the sides of lengths a and b.

This converse also appears in Euclid's Elements. It can be proven using the law of cosines (see below under Generalizations), or by the following proof:

Let ABC be a triangle with side lengths a, b, and c, with a2 + b2 = c2. We need to prove that the angle between the a and b sides is a right angle. We construct another triangle with a right angle between sides of lengths a and b. By the Pythagorean theorem, it follows that the hypotenuse of this triangle also has length c. Since both triangles have the same side lengths a, b and c, they are congruent, and so they must have the same angles. Therefore, the angle between the side of lengths a and b in our original triangle is a right angle.

A corollary of the Pythagorean theorem's converse is a simple means of determining whether a triangle is right, obtuse, or acute, as follows. Where c is chosen to be the longest of the three sides:

• If a2 + b2 = c2, then the triangle is right.
• If a2 + b2 > c2, then the triangle is acute.
• If a2 + b2 < c2, then the triangle is obtuse.

## Consequences and uses of the theorem

### Pythagorean triples

A Pythagorean triple has three positive integers a, b, and c, such that a2 + b2 = c2. In other words, a Pythagorean triple represents the lengths of the sides of a right triangle where all three sides have integer lengths. Evidence from megalithic monuments on the Northern Europe shows that such triples were known before the discovery of writing. Such a triple is commonly written (a, b, c). Some well-known examples are (3, 4, 5) and (5, 12, 13).

### List of primitive Pythagorean triples up to 100

(3, 4, 5), (5, 12, 13), (7, 24, 25), (8, 15, 17), (9, 40, 41), (11, 60, 61), (12, 35, 37), (13, 84, 85), (16, 63, 65), (20, 21, 29), (28, 45, 53), (33, 56, 65), (36, 77, 85), (39, 80, 89), (48, 55, 73), (65, 72, 97)

### The existence of irrational numbers

One of the consequences of the Pythagorean theorem is that incommensurable lengths (ie. their ratio is irrational number), such as the square root of 2, can be constructed. A right triangle with legs both equal to one unit has hypotenuse length square root of 2. The proof that the square root of 2 is irrational was contrary to the long-held belief that everything was rational. According to legend, Hippasus, who first proved the irrationality of the square root of two, was drowned at sea as a consequence.

### Distance in Cartesian coordinates

The distance formula in Cartesian coordinates is derived from the Pythagorean theorem. If (x0, y0) and (x1, y1) are points in the plane, then the distance between them, also called the Euclidean distance, is given by $\sqrt{(x_1-x_0)^2 + (y_1-y_0)^2}.$

More generally, in Euclidean n-space, the Euclidean distance between two points, $A\,=\,(a_1,a_2,\dots,a_n)$ and $B\,=\,(b_1,b_2,\dots,b_n)$, is defined, using the Pythagorean theorem, as: $\sqrt{(a_1-b_1)^2 + (a_2-b_2)^2 + \cdots + (a_n-b_n)^2} = \sqrt{\sum_{i=1}^n (a_i-b_i)^2}.$

## Generalizations

The Pythagorean theorem was generalized by Euclid in his Elements:

If one erects similar figures (see Euclidean 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 is a special case of the more general theorem relating the lengths of sides in any triangle, the law of cosines: $a^2+b^2-2ab\cos{\theta}=c^2, \,$
where θ is the angle between sides a and b.
When θ is 90 degrees, then cos(θ) = 0, so the formula reduces to the usual Pythagorean theorem.

Given two vectors v and w in a complex inner product space, the Pythagorean theorem takes the following form: $\|\mathbf{v}+\mathbf{w}\|^2 = \|\mathbf{v}\|^2 + \|\mathbf{w}\|^2 + 2\,\mbox{Re}\,\langle\mathbf{v},\mathbf{w}\rangle.$

In particular,||v + w||2 =||v||2 +||w||2 if v and w are orthogonal, although the converse is not necessarily true.

Using mathematical induction, the previous result can be extended to any finite number of pairwise orthogonal vectors. Let v1, v2,…, vn be vectors in an inner product space such that <vi, vj> = 0 for 1 ≤ i < jn. Then $\left\|\,\sum_{k=1}^{n}\mathbf{v}_k\,\right\|^2 = \sum_{k=1}^{n} \|\mathbf{v}_k\|^2.$

The generalization of this result to infinite-dimensional real inner product spaces is known as Parseval's identity.

When the theorem above about vectors is rewritten in terms of solid geometry, it becomes the following theorem. If lines AB and BC form a right angle at B, and lines BC and CD form a right angle at C, and if CD is perpendicular to the plane containing lines AB and BC, then the sum of the squares of the lengths of AB, BC, and CD is equal to the square of AD. The proof is trivial.

Another generalization of the Pythagorean theorem to three dimensions is de Gua's theorem, named for Jean Paul de Gua de Malves: If a tetrahedron has a right angle corner (a corner like 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.

There are also analogs of these theorems in dimensions four and higher.

In a triangle with three acute angles, α + β > γ holds. Therefore, a2 + b2 > c2 holds.

In a triangle with an obtuse angle, α + β < γ holds. Therefore, a2 + b2 < c2 holds.

Edsger Dijkstra has stated this proposition about acute, right, and obtuse triangles in this language:

sgn(α + βγ) = sgn(a2 + b2c2)

where α is the angle opposite to side a, β is the angle opposite to side b and γ is the angle opposite to side c.

### The Pythagorean theorem in non-Euclidean geometry

The Pythagorean theorem is derived from the axioms of Euclidean geometry, and in fact, the Euclidean form of the Pythagorean theorem given above does not hold in non-Euclidean geometry. (It has been shown in fact to be equivalent to Euclid's Parallel (Fifth) Postulate.) For example, in spherical geometry, all three sides of the right triangle bounding an octant of the unit sphere have length equal to $\pi/2$; this violates the Euclidean Pythagorean theorem because $(\pi/2)^2+(\pi/2)^2\neq (\pi/2)^2$.

This means that in non-Euclidean geometry, the Pythagorean theorem must necessarily take a different form from the Euclidean theorem. There are two cases to consider — spherical geometry and hyperbolic plane geometry; in each case, as in the Euclidean case, the result follows from the appropriate law of cosines:

For any right triangle on a sphere of radius R, the Pythagorean theorem takes the form $\cos \left(\frac{c}{R}\right)=\cos \left(\frac{a}{R}\right)\,\cos \left(\frac{b}{R}\right).$

This equation can be derived as a special case of the spherical law of cosines. By using the Maclaurin series for the cosine function, it can be shown that as the radius R approaches infinity, the spherical form of the Pythagorean theorem approaches the Euclidean form.

For any triangle in the hyperbolic plane (with Gaussian curvature −1), the Pythagorean theorem takes the form $\cosh c=\cosh a\,\cosh b$

where cosh is the hyperbolic cosine.

By using the Maclaurin series for this function, it can be shown that as a hyperbolic triangle becomes very small (i.e., as a, b, and c all approach zero), the hyperbolic form of the Pythagorean theorem approaches the Euclidean form.

In hyperbolic geometry, for a right triangle one can also write, $\sin \bar a \sin \bar b = \sin \bar c$

where $\scriptstyle\bar a$ is the angle of parallelism of the line segment AB that $\mu(AB)\,=\,a$ where μ is the multiplicative distance function (see Hilbert's arithmetic of ends).

In hyperbolic trigonometry, the sine of the angle of parallelism satisfies $\sin \bar a = \frac{2a}{1+a^2}.$

Thus, the equation takes the form $\frac{2a}{1+a^2} \frac{2b}{1+b^2}=\frac{2c}{1+c^2}$

where a, b, and c are multiplicative distances of the sides of the right triangle (Hartshorne, 2000).

### In complex arithmetic: not valid

The Pythagoras formula is used to find the distance between two points in the Cartesian coordinate plane, and is valid if all coordinates are real: the distance between the points {a,b} and {c,d} is √((a-c)2+(b-d)2). But with complex coordinates: e.g. the distance between the points {0,1} and {i,0} would work out as 0, resulting in a reductio ad absurdum. This is because this formula depends on Pythagoras's theorem, which in all its proofs depends on areas, and areas depend on triangles and other geometrical figures separating an inside from an outside, which does not happen if the coordinates are complex.

## History

The history of the theorem can be divided into four parts: knowledge of Pythagorean triples, knowledge of the relationship among the sides of a right triangle, knowledge of the relationships among adjacent angles, and proofs of the theorem.

Megalithic monuments from circa 2500 BC in Egypt, and in Northern Europe, incorporate right triangles with integer sides. Bartel Leendert van der Waerden conjectures that these Pythagorean triples were discovered algebraically.

Written between 2000 and 1786 BC, the Middle Kingdom Egyptian papyrus Berlin 6619 includes a problem whose solution is a Pythagorean triple.

The Mesopotamian tablet Plimpton 322, written between 1790 and 1750 BC during the reign of Hammurabi the Great, contains many entries closely related to Pythagorean triples.

The Baudhayana Sulba Sutra, the dates of which are given variously as between the 8th century BC and the 2nd century BC, in India, contains a list of Pythagorean triples discovered algebraically, a statement of the Pythagorean theorem, and a geometrical proof of the Pythagorean theorem for an isosceles right triangle.

The Apastamba Sulba Sutra (circa 600 BC) contains a numerical proof of the general Pythagorean theorem, using an area computation. Van der Waerden believes that "it was certainly based on earlier traditions". According to Albert Bŭrk, this is the original proof of the theorem; he further theorizes that Pythagoras visited Arakonam, India, and copied it.

Pythagoras, whose dates are commonly given as 569–475 BC, used algebraic methods to construct Pythagorean triples, according to Proklos's commentary on Euclid. Proklos, however, wrote between 410 and 485 AD. According to Sir Thomas L. Heath, there was no attribution of the theorem to Pythagoras for five centuries after Pythagoras lived. However, when authors such as Plutarch and Cicero attributed the theorem to Pythagoras, they did so in a way which suggests that the attribution was widely known and undoubted.

Around 400 BC, according to Proklos, Plato gave a method for finding Pythagorean triples that combined algebra and geometry. Circa 300 BC, in Euclid's Elements, the oldest extant axiomatic proof of the theorem is presented.

Written sometime between 500 BC and 200 AD, the Chinese text Chou Pei Suan Ching (周髀算经), (The Arithmetical Classic of the Gnomon and the Circular Paths of Heaven) gives a visual proof of the Pythagorean theorem — in China it is called the "Gougu Theorem" (勾股定理) — for the (3, 4, 5) triangle. During the Han Dynasty, from 202 BC to 220 AD, Pythagorean triples appear in The Nine Chapters on the Mathematical Art, together with a mention of right triangles.

The first recorded use is in China, known as the "Gougu theorem" (勾股定理) and in India known as the Bhaskara Theorem.

There is much debate on whether the Pythagorean theorem was discovered once or many times. Boyer (1991) thinks the elements found in the Shulba Sutras may be of Mesopotamian derivation.

## Cultural references to the Pythagorean theorem

The Pythagorean theorem has been referenced in a variety of mass media throughout history.

• A verse of the Major-General's Song in the Gilbert and Sullivan musical The Pirates of Penzance, "About binomial theorem I'm teeming with a lot o' news, With many cheerful facts about the square of the hypotenuse", with oblique reference to the theorem.
• The Scarecrow of The Wizard of Oz makes a more specific reference to the theorem when he receives his diploma from the Wizard. He immediately exhibits his "knowledge" by reciting a mangled and incorrect version of the theorem: "The sum of the square roots of any two sides of an isosceles triangle is equal to the square root of the remaining side. Oh, joy, oh, rapture. I've got a brain!" The "knowledge" exhibited by the Scarecrow is incorrect. The accurate statement would have been "The sum of the squares of the legs of a right triangle is equal to the square of the remaining side."
• In an episode of The Simpsons, after finding a pair of Henry Kissinger's glasses in a toilet at the Springfield Nuclear Power Plant, Homer puts them on and quotes Oz Scarecrow's mangled version of the formula. A man in a nearby toilet stall then yells out "That's a right triangle, you idiot!" (The comment about square roots remained uncorrected.)
• Similarly, the Speech software on an Apple MacBook references the Scarecrow's incorrect statement. It is the sample speech when the voice setting 'Ralph' is selected.
• In Freemasonry, one symbol for a Past Master is the diagram from the 47th Proposition of Euclid, used in Euclid's proof of the Pythagorean theorem. President Garfield was a freemason.
• In 2000, Uganda released a coin with the shape of a right triangle. The coin's tail has an image of Pythagoras and the Pythagorean theorem, accompanied with the mention "Pythagoras Millennium". Greece, Japan, San Marino, Sierra Leone, and Suriname have issued postage stamps depicting Pythagoras and the Pythagorean theorem.
• In Neal Stephenson's speculative fiction Anathem, Pythagorean theorem are referred to as 'the Adrakhonic theorem'. A geometric proof of the theorem is displayed on the side of an alien ship to demonstrate their understanding of mathematics.