Pythagorean Triangles

Pythagorean Triangles

A Pythagorean triangle (or Pythagorean triple) is a right-angle triangle containing sides with lengths x, y, and z, where $x, y, z, \in \mathbb{Z^+}$, that is, all of the side lengths of the triangle are positive integers. Hence, these values x, y, and z satisfy Pythagorean's theorem that $x^2 + y^2 = z^2$. The smallest Pythagorean triangle is the set 3, 4, 5. We note that the greatest integer is always going to by the hypotenuse, hence it is true that $3^2 + 4^2 = 5^2$. Hence, any positive integer solution to $x^2 + y^2 = z^2$ will be a set that is a Pythagorean triple.


We will first distinguish what is called a fundamental solution to $x^2 + y^2 = z^2$, that is, a solution where $(x, y) = 1$ (x and y must be relatively prime). Suppose x and y are not relatively prime, and that $(x, y) = d$. Hence it follows that d divides both x and y. Hence d must also divide z, and we obtain that $(x/d)^2 + (y/d)^2 = (z/d)^2$. Since $(x/d, y/d) = 1$, we know that the solution cannot be reduced further. For example, (3, 4, 5) is a fundamental solution. However (6, 8, 10) is not, since (6, 8) = 2, and in fact, we can divide each term in this Pythagorean triangle by 2 to get (3, 4, 5) again. In essence, a fundamental solution is unique in that the ratio a:b:c is unique and cannot be reduced by a factor d.

Lemma 1: If a, b, and c is a fundamental solution to x2 + y2 = z2, then either a or b is even.

  • Proof: Suppose that both a and b are even. Then both a and b are divisible by 2, and hence (a, b) ≥ 2, which implies that a, b, and c is only a regular solution and not a fundamental solution.
  • Additionally, suppose that both a and b are odd. Then $a \equiv 1 \pmod 4$ and $b \equiv 1 \pmod 4$. Hence $a^2 + b^2 \equiv 2 \pmod 4$. But we note that $a^2 + b^2 = c^2$, hence $c^2 \equiv 2 \pmod 4$. This is impossible though, since c2 can only be congruent to 0 or 1 (mod 4). Hence both a and b cannot be odd.

Corollary 1: If a, b, and c is a fundamental solution, then c must be odd.

  • Proof: We know that one of a or b is even. Let's say a is even without loss of generality. Then b is odd. Hence $a \equiv 0 \pmod 2$ and $b \equiv 1 \pmod 2$. Hence $c^2 = a^2 + b^2 \equiv 1 \pmod 2$, and hence c is odd.

Lemma 2: If r2 = st and (s, t) = 1, then both s and t are squares.

This will be a valuable proof in deriving an expression for all fundamental solutions to Pythagoras' theorem.

  • Proof: We know that s and t can be written in terms of their prime power decompositions, that is $s = p_1^{e_1}p_2^{e_2}...p_k^{e_k}$ and $t = q_1^{f_1}q_2^{f_2}...q_r^{f_r}$ where all p and q are primes.
  • Since s and t are relatively prime, we know that $p_i ≠ p_j$ for each i, j. Hence if r2 = st, then it follows that $r^2 = p_1^{e_1}p_2^{e_2}...p_k^{e_k}q_1^{f_1}q_2^{f_2}...q_r^{f_r}$. Since r2 is a square, then all of the exponents must be even, that is $e_i \equiv f_j \equiv 0 \pmod 2$ for each i, j. Hence s and t must also be squares.

Lemma 3: Properties of Fundamental Solutions

Lemma: Suppose that a, b, and c is a fundamental solution to $x^2 + y^2 = z^2$ where a is even and b is odd. There exists positive integers m and n where m > n, m and n are relatively prime, and one of m and n are even such that $a = 2mn$, $b = m^2 - n^2$, and $c = m^2 + n^2$.
  • Proof: We stated that a is even, hence a = 2r for some integer r. Hence a2 = 4r2. We know that $a^2 = c^2 - b^2$, so it follows that $4r^2 = (c + b)(c - b)$. We know that b is odd, and from corollary 1 we know that c is also odd. Hence (c + b) is even and (c - b) is even. Let's say c + b = 2s, and c - b = 2t. It thus follows that $4r^2 = (2s)(2t) = 4st$, and hence $r^2 = st$. By lemma 2, we know that s and t must both be squares.
  • Now let's add the equations c + b = 2s, and c - b = 2t together. We hence get c = s + t.
  • We now want to show that (s, t) = 1. Suppose t hat d | s and d | t. Hence d | b and d | c. But (b, c) = 1, hence d = 1, and (s, t) = d = 1.
  • From all of this, we gather from lemma 2 that s = m2 and t = n2. Hence we get that since $a^2 = 4st = 4m^2n^2$, then $a = 2mn$. We also get that $b = m^2 - n^2$ and $c = m^2 + n^2$.
  • Now we know that m > n since $b = m^2 - n^2$, so m > n, otherwise b is negative, which is NOT a fundamental solution.
  • Additionally, (m, n) = 1. Suppose that d | m and d | n for some integer d. Hence d | a and d | b. But (a, b) = 1 since a, b, and c are a fundamental solution, and hence, (m, n) = 1.
  • Lastly, we know that one of m and n are odd. Suppose that both are even. Then $c^2 = m^2 + n^2$ does not work as proven in lemma 1. Suppose that both are odd. This implies that b is even and c is even, which is incorrect as we defined a to be even, so b must be odd, and we know that c is always odd in a fundamental solution.

Lemma 4

Lemma: If $a = 2mn$, $b = m^2 - n^2$, and $c = m^2 + n^2$, and a, b, c is a solution to $x^2 + y^2 = z^2$, where m > n, m and n are both positive and relatively prime, and one of m or n is odd, then a, b, c is a fundamental solution.

We will now prove that given these conditions the solution a, b, c is fundamental.

  • Proof: Algebraically we obtain that:
\begin{align} a^2 + b^2 = (2mn)^2 + (m^2 - n^2)^2 \\ a^2 + b^2 = 4m^2n^2 + m^4 - 2m^2n^2 + n^4 \\ a^2 + b^2 = m^4 + 2m^2n^2 + n^4 \\ a^2 + b^2 = (m^2 + n^2)^2 \end{align}
  • Since $a^2 + b^2 = c^2$, then $c^2 = (m^2 + n^2)^2$. Square rooting both sides we obtain that $c = m^2 + n^2$.
  • We will omit the rest of the proof at this time.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License