[Number Theory] Pythagorean Triples
By: Tao Steven Zheng(鄭濤)
【Problem】
A Pythagorean triple is a set of three positive integers that satisfies the Pythagorean theorem
. The earliest table of Pythagorean triples can be found on an ancient Babylonian clay tablet called ''Plimpton 322'' (c. 1800 BC). However, the clay tablet does not indicate any knowledge of the Pythagoean triples formula.

Derive the formula for generating primitive Pythagorean triples
where and
.

【Solution】
The Pythagorean theorem states that for a right triangle with sides , where
is the longest side,
.
Subtract on both sides and factorize:
Then divide on both sides:
If is a rational number, then
and
, where
.
Subsequently, and
.
(1) By adding the two expressions, it can be shown that
For primitive Pythagorean triples, ; therefore,
and
.
(2) By subtracting the two expressions, it can be shown that
For primitive Pythagorean triples, ; therefore,
and
.
Therefore, the primitive Pythagorean triples formula is
To generate all Pythagorean triples, one can scale each side by a common factor that is a positive integer.
