## Archive for the ‘Number Theory’ Category

### Pythagorean Triples

November 21, 2011

A Pythagorean triple is a triplet $(a,b,c)$, where $a, b, c$ are integers such that $a^2+b^2=c^2$.

It is called a Pythagorean triple because it can represent 3 sides of a right triangle. You probably already know two Pythagorean triples: $(3,4,5)$ and $(5,12,13)$. Are there other triples? How do we find them?

Let’s consider the equation
$a^2+b^2=c^2$
where $a, b, c$ are integers. If $a, b, c$ have a common factor $d$, say $a=da_1$, $b=db_1$, and $c=dc_1$. Then we have
$d^2a_1^2+d^2b_1^2=d^2c_1^2$
which is true if and only if
$a_1^2+b_1^2=c_1^2.$
So let’s assume that $a, b, c$ have no common factors. Such triples will be called primitive. Since odd perfect squares are congruent to 1 mod 4 and even squares are congruent to 0 mod 4, then $c$ must be odd and exactly one of $a$ or $b$ is even. Let’s suppose that $b$ is even: $b=2k$ for some integer $k$. Then
$4k^2=b^2=c^2-a^2=(c+a)(c-a).$
So both $c + a$ and $c - a$ must be even. Say $c + a = 2r$ and $c - a = 2s$. Then $rs=k^2$ and we have $c = r + s$ and $a = r - s$. Since $a$ and $c$ have no common factors, we must have that $r$ and $s$ have no common factors. Since $rs$ is a square, then both $r$ and $s$ are squares. Say $r=m^2$ and $s=n^2$. So $a=m^2-n^2, b=2mn, c=m^2+n^2$ if (a,b,c) is a primitive triple.

Hence, any Pythagorean triple, with $b$ even, is either of the form $(m^2-n^2,2mn,m^2+n^2)$ or it is a multiple of that form. You can plug in different values for $m$ and $n$ to get different right triangles with integer sides. Fun!