---
tag: 8195EFVX2N
kind: proof
name: Proof of Fermat's right triangle theorem by infinite descent
msc: [11D25]
proves: 086BE0J3FZ
uses: [01G1WY1GVX, 0KF3J2KAER, 0EFYCFHYFG, 01BX15HSRR, 0GFKP8F8AG, 051VYKA1EX, 04VCPS30ZE, 0850JJMJYZ, 084HH1NDCB, 0VP3A1290K]
sources:
  - url: https://en.wikipedia.org/wiki/Fermat%27s_right_triangle_theorem
    locator: Fermat's proof
---

## Proof

We argue by [[infinite descent|0EFYCFHYFG]]: we take a solution with smallest $x$ and build a smaller one.

**Lemma.** If pairwise [[coprime|0GFKP8F8AG]] positive integers $u_1, \dots, u_r$ have a square product, then each $u_i$ is a square.

1. Let $p$ be a prime and $\nu_p$ the [[p-adic valuation|04VCPS30ZE]]. By the [[valuation of a product|0850JJMJYZ]], $\sum_i \nu_p(u_i)$ is even. At most one $u_i$ is divisible by $p$, so each $\nu_p(u_i)$ is even.
2. By the [[fundamental theorem of arithmetic|084HH1NDCB]], each $u_i$ is the square of $\prod_p p^{\nu_p(u_i)/2}$.

**The equation $x^4 - y^4 = z^2$ has no solution in positive integers.**

3. Suppose there are solutions. By the [[well-ordering principle|01BX15HSRR]], choose one with $x$ smallest.
4. If a prime $q$ divides $x$ and $y$, then $q^4 \mid z^2$. So $2\nu_q(z) \ge 4$, and $q^2 \mid z$. Then $(x/q, y/q, z/q^2)$ is a solution with smaller $x$. So $\gcd(x, y) = 1$.
5. Now $(y^2)^2 + z^2 = (x^2)^2$. A prime dividing $y^2$ and $x^2$ divides $y$ and $x$ by [[Euclid's lemma|051VYKA1EX]]. So this [[Pythagorean triple|01G1WY1GVX]] is primitive.
6. Case 1: $y$ odd. In a primitive triple not both legs are odd, since a sum of two odd squares is $2$ modulo $4$. As $y^2$ is odd, $z$ is even.
7. So by the [[classification of Pythagorean triples|0KF3J2KAER]] with $b = z$, there are coprime $m > n \ge 1$ with $y^2 = m^2 - n^2$, $z = 2mn$ and $x^2 = m^2 + n^2$.
8. Then $m^4 - n^4 = (m^2 - n^2)(m^2 + n^2) = (xy)^2$. So $(m, n, xy)$ is a solution in positive integers.
9. But $m^2 < m^2 + n^2 = x^2$, so $m < x$. This contradicts the choice of $x$.
10. Case 2: $y$ even. Then $z$ is odd, since a primitive triple has not both legs even. So the classification with $b = y^2$ gives coprime $m > n \ge 1$, with $m - n$ odd, such that $z = m^2 - n^2$, $y^2 = 2mn$ and $x^2 = m^2 + n^2$.
11. Exactly one of $m, n$ is even. Call it $e$ and the other one $o$. Then $o^2 + e^2 = x^2$, and this triple is primitive because $\gcd(m, n) = 1$.
12. By the classification with $b = e$, there are coprime $g > h \ge 1$ with $o = g^2 - h^2$, $e = 2gh$ and $x = g^2 + h^2$.
13. Then $y^2 = 2oe = 4gh(g^2 - h^2)$, so $gh(g^2 - h^2) = (y/2)^2$ is a square.
14. The factors $g$, $h$ and $g^2 - h^2$ are pairwise coprime. Indeed, a prime dividing $g$ and $g^2 - h^2$ divides $h^2$, hence $h$; similarly for $h$.
15. By the lemma, $g = X^2$, $h = Y^2$ and $g^2 - h^2 = Z^2$ with positive integers $X, Y, Z$. Hence $X^4 - Y^4 = Z^2$.
16. But $X \le X^2 = g \le g^2 < g^2 + h^2 = x$. This contradicts the choice of $x$.
17. Both cases are impossible. So $x^4 - y^4 = z^2$ has no solution in positive integers.

**No right triangle with integer sides has square area.**

18. Suppose a right triangle has integer legs $a, b$, integer hypotenuse $c$, and area $ab/2 = d^2$ with $d$ a positive integer. By the [[Pythagorean theorem|0VP3A1290K]], $a^2 + b^2 = c^2$.
19. Then $c^4 - (2ab)^2 = (a^2 + b^2)^2 - 4a^2b^2 = (a^2 - b^2)^2$, and $2ab = 4d^2$. So $c^4 - (2d)^4 = (a^2 - b^2)^2$.
20. If $a = b$, then $a^2 = 2d^2$. The exponent of $2$ in $a^2$ is even and in $2d^2$ is odd, which is impossible. So $a \ne b$.
21. Then $(c, 2d, \abs{a^2 - b^2})$ is a positive solution of $x^4 - y^4 = z^2$, which contradicts step 17.
22. Conversely, let $(x, y, z)$ be a positive solution. Put $L_1 = x^4 - y^4 = z^2$, $L_2 = 2x^2y^2$ and $L_3 = x^4 + y^4$. Then $L_1^2 + L_2^2 = L_3^2$.
23. The triangle with vertices $(0, 0)$, $(L_1, 0)$ and $(0, L_2)$ in $\R^2$ has a right angle at the origin, sides $L_1, L_2, L_3$, and area $L_1 L_2 / 2 = (xyz)^2$. So the two forms of the statement are equivalent, and both hold.

## Idea

A solution of $x^4 - y^4 = z^2$ gives a Pythagorean triple with legs $y^2$ and $z$. Parametrizing it, and if needed a second triple, produces a new solution with a smaller $x$. An infinite decreasing chain of positive integers is impossible, so there is no solution, and a right triangle with square area would give one.
