Pythagorean triples and Fermat's margin
Tonight's idea
\(3^2 + 4^2 = 5^2\). \(5^2 + 12^2 = 13^2\). Three positive whole numbers with \(a^2 + b^2 = c^2\) are a Pythagorean triple. A Babylonian tablet from 1800 BC lists fifteen, including \(12709^2 + 13500^2 = 18541^2\). There is a recipe.
Euclid's formula. Pick whole numbers \(m \gt n \gt 0\). Then \(a = m^2 - n^2\), \(b = 2mn\), \(c = m^2 + n^2\) is a Pythagorean triple.
Why: \((m^2 - n^2)^2 + (2mn)^2 = m^4 + 2m^2n^2 + n^4 = (m^2 + n^2)^2\). Try \(m = 2, n = 1\): \((3, 4, 5)\). A triple is primitive if \(a, b, c\) share no common factor; \((6, 8, 10)\) is not. Euclid's recipe gives every primitive triple exactly once if \(m\) and \(n\) are coprime (no common factor) and one of them is even.
Where does it come from? Divide \(a^2 + b^2 = c^2\) by \(c^2\): \((a/c)^2 + (b/c)^2 = 1\). A triple is a point on the unit circle with fractional coordinates, and the worked example finds all of those.
And the margin. Around 1637 Fermat wrote beside this topic that \(a^n + b^n = c^n\) has no positive whole-number solutions for \(n \gt 2\), claiming a proof the margin was too narrow to hold. Andrew Wiles proved it in 1995, in over a hundred pages.
Watch one: every rational point on the circle
Start at \((-1, 0)\) on the circle \(x^2 + y^2 = 1\) and draw the line of slope \(t\) through it: \(y = t(x + 1)\). Substitute:
\[x^2 + t^2(x+1)^2 = 1 \quad\Rightarrow\quad (1 + t^2)x^2 + 2t^2x + (t^2 - 1) = 0.\]
We know \(x = -1\) is one root, so it factors as \((x + 1)\big((1+t^2)x + (t^2 - 1)\big) = 0\), and the other root is
\(x = \dfrac{1 - t^2}{1 + t^2}, \qquad y = \dfrac{2t}{1 + t^2}.\)
A rational slope gives a rational point, and every rational point except \((-1, 0)\) itself comes from a rational slope. Put \(t = n/m\): \(x = \dfrac{m^2 - n^2}{m^2 + n^2}\), \(y = \dfrac{2mn}{m^2 + n^2}\), which is Euclid's formula. \(t = \tfrac12\) gives \((\tfrac35, \tfrac45)\), which is \((3, 4, 5)\).
Your turn
- Use Euclid's formula with \((m, n) = (4, 1)\), \((5, 2)\) and \((7, 4)\). Check each triple by squaring. Which are primitive?
- Use the slope trick with \(t = \tfrac13\). Which triple do you get? Then go backwards: what slope \(t\) produces \((8, 15, 17)\)?
- In a primitive triple exactly one of \(a, b\) is even. Prove it: explain why they cannot both be even, then show that if both are odd, \(a^2 + b^2\) leaves remainder 2 on division by 4, which no square does.
- Find two different primitive triples with hypotenuse 65. (Hint: \(65 = m^2 + n^2\) in two ways.)
Stretch: 3 is always there
Prove that in every Pythagorean triple one side is a multiple of 3. Squares leave remainder 0 or 1 on division by 3 (check \(0, 1, 2\)). Suppose neither \(a\) nor \(b\) is a multiple of 3 and look at \(a^2 + b^2\). (The same idea with 4 and 5 shows \(abc\) is always a multiple of 60.)
Answers
- \((4,1)\): \((15, 8, 17)\), \(225 + 64 = 289\). \((5,2)\): \((21, 20, 29)\), \(441 + 400 = 841\). \((7,4)\): \((33, 56, 65)\), \(1089 + 3136 = 4225\). All primitive: each pair is coprime with one even.
- \(t = \tfrac13\): \(x = \tfrac{8/9}{10/9} = \tfrac45\), \(y = \tfrac35\): \((3, 4, 5)\) with the legs swapped. For \((8, 15, 17)\) the point is \((\tfrac{15}{17}, \tfrac{8}{17})\), so \(t = y/(x+1) = \tfrac{8/17}{32/17} = \tfrac14\), matching \(m = 4, n = 1\).
- Both even would make \(c\) even too, so 2 divides all three: not primitive. \((2k+1)^2 = 4k(k+1) + 1\) has remainder 1 on division by 4 and an even square has remainder 0, so two odd squares add to remainder 2, which \(c^2\) cannot be. Hence exactly one leg is even.
- \(65 = 8^2 + 1^2 = 7^2 + 4^2\). \((8,1)\): \((63, 16, 65)\). \((7,4)\): \((33, 56, 65)\).
Stretch. Squares of \(0, 1, 2\) are \(0, 1, 4\): remainders \(0, 1, 1\) on division by 3. If neither leg is a multiple of 3 then \(a^2 + b^2\) has remainder 2, but \(c^2\) has 0 or 1: contradiction. So a leg is a multiple of 3. Check: \(3 \cdot 4 \cdot 5 = 60\) and \(5 \cdot 12 \cdot 13 = 780 = 13 \cdot 60\).