This site is supported by donations to The OEIS Foundation.

# Pythagorean theorem

Consider a right triangle, with short "leg" ${\displaystyle \scriptstyle a\,}$, long "leg" ${\displaystyle \scriptstyle b\,}$ and hypotenuse ${\displaystyle \scriptstyle c\,}$, and have it stand on its short "leg" ${\displaystyle \scriptstyle a\,}$;
Add a congruent triangle standing on its long "leg" ${\displaystyle \scriptstyle b\,}$, with each hypotenuse meeting at a common vertex;
By joining the top vertices of both triangles, you get a trapezium made up of three triangles;
The trapezium has base ${\displaystyle \scriptstyle a+b\,}$ and parallel sides ${\displaystyle \scriptstyle a\,}$ and ${\displaystyle \scriptstyle b\,}$, with area ${\displaystyle \scriptstyle (a+b)\cdot {\frac {(a+b)}{2}}\,}$;
The three triangles are our two former congruent triangles, each with area ${\displaystyle \scriptstyle {\frac {ab}{2}}\,}$;
And since the two acute angles of a right triangle are complementary;
The third triangle is a right triangle with both sides ${\displaystyle \scriptstyle c\,}$, and area ${\displaystyle \scriptstyle {\frac {c^{2}}{2}}\,}$;
Equating the areas, we have
${\displaystyle \scriptstyle (a+b)\cdot {\frac {(a+b)}{2}}\,=\,2\,{\frac {ab}{2}}+{\frac {c^{2}}{2}}\,}$;
or
${\displaystyle \scriptstyle {\frac {a^{2}+2ab+b^{2}}{2}}\,=\,{\frac {2ab+c^{2}}{2}}\,}$;
yielding[1]

 Pythagoras theorem ${\displaystyle a^{2}+b^{2}=c^{2}\,}$

The Pythagorean theorem provides a way to calculate the length of the longest side of a right triangle (one with a right angle for one of the vertices) in the Euclidean plane if we only know the lengths of the two shorter sides.

## A classic proof

The classic proof by Euclid is Proposition 47 of Book I of The Elements.[2] It requires results from earlier in the book, like the triangle side-angle equality. Since we want to get to the number-theoretic relevance of the theorem more quickly, we will instead present a proof that relies on much fewer geometrical axioms and theorems.

Theorem (Pythagorean theorem). (Pythagoras)

Given a right triangle with the two shorter sides (the "legs") being ${\displaystyle a}$ and ${\displaystyle b}$, and the longest side (the hypotenuse) being ${\displaystyle c}$, the equality ${\displaystyle c^{2}=a^{2}+b^{2}}$ holds. In other words, if ${\displaystyle a}$ and ${\displaystyle b}$ are known, then ${\displaystyle c}$ can be computed as ${\displaystyle \scriptstyle c\,=\,{\sqrt {a^{2}+b^{2}}}\,}$.

Proof. [by dissection][3] (Bhāskara).

1. Draw a right triangle of whatever size you wish, the only constraint being that one of the angles must be precisely 90 degrees (${\displaystyle \scriptstyle {\frac {\pi }{2}}\,}$ radians). Label the shorter sides ${\displaystyle a}$ and ${\displaystyle b}$, and the longest side ${\displaystyle c}$.

2. ${\displaystyle a}$ is a line segment: extend it ${\displaystyle b}$ units. (This can be accomplished with straightedge and compass by drawing a circle centered where ${\displaystyle a}$ meets ${\displaystyle b}$ with radius ${\displaystyle b}$).
3. Next, use the segment you just extended to construct a square with each side measuring ${\displaystyle a+b}$, thus having area ${\displaystyle (a+b)^{2}}$; the triangle's area should be within the square's area.
4. Draw a line perpendicular to ${\displaystyle b}$ that touches ${\displaystyle b}$ where ${\displaystyle b}$ meets ${\displaystyle c}$.
5. Extend ${\displaystyle b}$ by ${\displaystyle a}$ units (this is easy now thanks to the square).

6. Observe that the square now contains two smaller squares, as well as two non-square rectangles. The area of one square is ${\displaystyle a^{2}}$, the area of the other is ${\displaystyle b^{2}}$. Both rectangles have an area of ${\displaystyle ab}$. Therefore, ${\displaystyle (a+b)^{2}=a^{2}+b^{2}+2ab}$.
7. Since the area of the triangle is ${\displaystyle \scriptstyle {\frac {ab}{2}}\,}$ and the combined area of the two rectangles is ${\displaystyle 2ab}$, this means we can easily break both rectangles into four triangles of the same size as our original triangle. While maintaining the size and shape of the larger square, rearrange the four triangles so that the shorter sides of each triangle are all on the perimeter of the larger square.

8. Note that this rearrangement has created a new square inside the larger square, and each side of the new square is the hypotenuse of one of the four triangles. Therefore, ${\displaystyle c^{2}=(a+b)^{2}-2ab}$ (the ${\displaystyle 2ab}$ being the combined area of the four triangles, per Step 7). Using the equality obtained in Step 6, substitute ${\displaystyle (a+b)^{2}}$ to obtain ${\displaystyle c^{2}=(a^{2}+b^{2}+2ab)-2ab}$. Obviously, ${\displaystyle -2ab}$ cancels out ${\displaystyle +2ab}$, thus leaving us with ${\displaystyle c^{2}=a^{2}+b^{2}}$ as specified by the theorem.[4]

There are many other proofs of this theorem, and even a President of the United States has done one[1], and there is an entire book of different proofs.

## Garfield's proof of the Pythagorean theorem

See (a stylized rendition of!) Garfield's proof at the top of this page. James Garfield, the 20 th president of the United States, gave this proof (via trapezium) of the Pythagorean Theorem in 1876.

## Pythagorean triples

One aspect of the Pythagorean theorem that is of particular interest to number theorists is those cases of ${\displaystyle \scriptstyle c\,\in \,\mathbb {Z} ^{+}\,}$ where the equation has integer solutions; the three integers are then called "Pythagorean triples" (see A046083, A046084 and A009000).

## Euclidean 2-space and Euclidean distance

In Euclidean 2-space, the Euclidean distance between two points with Cartesian coordinates ${\displaystyle \scriptstyle p_{1}\,=\,(x_{1},\,y_{1})\,}$ and ${\displaystyle \scriptstyle p_{2}\,=\,(x_{2},\,y_{2})\,}$ is defined as the length of the hypotenuse of the the right triangle with sides (or "legs") of length equal to ${\displaystyle \scriptstyle |x_{2}-x_{1}|\,}$ and ${\displaystyle \scriptstyle |y_{2}-y_{1}|\,}$, i.e.

${\displaystyle d_{12}\equiv {\sqrt {(x_{2}-x_{1})^{2}+(y_{2}-y_{1})^{2}}}.\,}$

### Euclidean 3-space and Euclidean distance

In Euclidean 3-space, we obtain the Euclidean distance between two points with Cartesian coordinates ${\displaystyle \scriptstyle p_{1}\,=\,(x_{1},\,y_{1},\,z_{1})\,}$ and ${\displaystyle \scriptstyle p_{2}\,=\,(x_{2},\,y_{2},\,z_{2})\,}$ by applying the Pythagorean theorem twice, giving

${\displaystyle d_{12}\equiv {\sqrt {(x_{2}-x_{1})^{2}+(y_{2}-y_{1})^{2}+(z_{2}-z_{1})^{2}}}.\,}$

The definition for Euclidean distance in Euclidean ${\displaystyle \scriptstyle n\,}$-space follows by applying the Pythagorean theorem ${\displaystyle \scriptstyle n-1\,}$ times.

• Fermat's last theorem (${\displaystyle \scriptstyle a^{n}+b^{n}\,=\,c^{n},\,n\,\geq \,1,\,}$ has no solutions in positive integers ${\displaystyle \scriptstyle a,\,b,\,c,\,\,}$ for ${\displaystyle \scriptstyle n\,\geq \,3\,}$)

## Notes

1. James Garfield, the 20 th president of the United States, gave this proof by dissection, which dissects a trapezium in one way only (i.e. into three triangles), of the Pythagorean Theorem in 1876. (Could there be an even more economical proof?)
2. See Pythagoras's Theorem/Classic Proof on Proof Wiki.
3. Bhāskara's proof by dissection dissects a square in two different ways, first into two squares and two rectangles, then into one square and four triangles. (Compare with Garfield's much more economical proof by dissection, which dissects a trapezium in one way only, i.e. into three triangles!)
4. This proof is adapted from the one given in K. O. Friedrichs, From Pythagoras to Einstein Washington D. C.: Mathematical Association of America (1965): 7 - 8. Some details have been spelled out more, others deemphasized, but the basic approach is exactly the same.