Suppose positive integers a, b and c satisfy a squared plus b squared equals c squared, and their common greatest divisor is one. This original UKMT proof extension explains why, after choosing b as the even leg, the sides have the form m squared minus n squared, two m n, and m squared plus n squared under appropriate restrictions. Producing examples is only the start; the aim is to account for every primitive triple.
Need help choosing a next step? Scan the contact QR code below or contact Hanlin on WeChat. Send UKMT-S3-1130 and tell us your school year and question.
Establish the parity pattern
The two legs cannot both be odd, because odd squares are one modulo four and their sum would be two, which is not a square modulo four. They cannot both be even in a primitive triple. Exactly one leg is even, so call it b; the other leg a and the hypotenuse c are odd.
Factor the difference of two squares
The equation gives b squared equals c squared minus a squared, or c minus a times c plus a. Dividing by four yields b over two squared equal to the product of c plus a over two and c minus a over two. Both factors are positive integers because c and a are odd and c is larger.
Show that the two factors are coprime
A common divisor of those two factors divides their sum c and their difference a. In a primitive right triangle, a and c are coprime: any prime dividing both would also divide b. Therefore the two factors have greatest common divisor one. This coprimality is essential; a product being square alone would not force both factors to be squares.
Use unique prime factorisation
Since the product of the two positive coprime factors is a square, each prime occurs in only one factor and must have even exponent there. Thus the factors are m squared and n squared, with m greater than n and both positive. Adding and subtracting gives c equals m squared plus n squared and a equals m squared minus n squared; the even leg is b equals two m n.
Specify restrictions and verify the converse
The parameters must be coprime and of opposite parity for the resulting triple to be primitive. If both were odd, both legs and the hypotenuse would be even; a shared parameter divisor would also create a shared side divisor. Conversely, coprime parameters of opposite parity produce a primitive integer triple, and expansion directly verifies the square equation.
Check an example without confusing it with completeness
With m equal to four and n equal to one, the sides are fifteen, eight and seventeen. Their squares satisfy the equation and their greatest common divisor is one. The example checks the formula, while the parity, factorisation and coprime-square argument prove that every primitive triple is represented. Nonprimitive triples are positive integer multiples and should be classified separately.
Continue reading: UKMT Number Proof: Three Consecutive Cubes Always Sum to a Multiple of Nine.
Contact Hanlin
Planning a first attempt or reviewing a topic you find difficult? Scan the QR code and send UKMT-S3-1130. Include your school year, country or competition region, experience and the question you want to discuss.

On your phone, use the button or save the QR image and scan it within WeChat.
Official information and further reading: Source 1
