# Unique Pythagorean Triples

I’m revising for my upcoming exams and this is an unseen part from a previous exam:

In previous parts I’ve shown that the solutions to $x^2 +y^2=z^2$ are $$(x,y,z)=(a^2 -b^2,2ab,a^2+b^2)$$ and $$(x,y,z)=(2ab,a^2-b^2,a^2+b^2)$$ where $a$ and $b$ are positive integers. However the unseen part is, “Determine to what extent these integers $a$ and $b$ are uniquely determined”. Unfortunately I don’t even understand the question let alone how to attempt it. I’m not sure whether $a$ and $b$ are coprime, and if they are if that assumption helps at all. Any help explaining the question and giving a hint how to continue would be appreciated.

• Fix $(x,y,z)$ such that $x^2+y^2=z^2$, then find $(a,b)$ such that one of these representations holds. – Did Mar 17 '18 at 11:31
• "Fermat’s Last Theorem" Related? How? – Did Mar 17 '18 at 11:32
• Sorry if it isn’t related to Fermat’s Last Theorem. It’s just in that chapter in the notes so I assumed it was related. Thank you for the hint. So if I chose $(x,y,z)$ to be $(3,4,5)$ then $a=2$ and $b=1$ as the integers need to be positive. So how would I conclude to show they are uniquely determined? – MichealAlex456 Mar 17 '18 at 11:36
• " if I cho[o]se (x,y,z) to be (3,4,5) then a=2 and b=1" How did you compute the (a,b) solution in this case? – Did Mar 17 '18 at 11:38
• I’ve done some working and I’ve concluded that $a>b$, hcf$(a,b)=1$ so $a$ and $b$ are coprime and $a-b$ has to be odd. Therefore the Pythagorean triples are primitive. This is ok? – MichealAlex456 Mar 17 '18 at 12:05

## 1 Answer

https://en.wikipedia.org/wiki/Pythagorean_triple discusses the general formula of
$(x,y,z) = (k\times[a^2-b^2], k\times 2ab, k\times[a^2+b^2])$ or
$(x,y,z) = (k\times 2ab, k\times[a^2-b^2], k\times[a^2+b^2]),$
where $k = \gcd(x,y).$

Following this convention, when $x,y$ are coprime, exactly one of the two will be even (i.e. if $x,y$ both odd then $z^2 = x^2 + y^2$ will be congruent to 2, mod 4, which is impossible), and the solution should be chosen that sets 2ab to whichever of $x$ and $y$ is even. It is clear that under these constraints, assuming that $x,y$ coprime with (for example), $x$ odd, $a,b$ are uniquely determined by $2b^2 = (z-x), a^2 = x+b^2.$

Two things to note:
(1) Absent the $\gcd$ factor $k,$ some pythagorean triples, such as (9, 12, 15), can not be expressed.
(2) Just because $x,y$ not coprime does not mean that the k factor is required.
Counterexample is (x,y,z) = (6,8,10), with $a=3, b=1.$

• Thank you for that. That actually answers another question I was struggling with so thank you so much! – MichealAlex456 Mar 17 '18 at 13:54
• Sleepily overlooked addt'l relevant comment. In the wikipedia article, in the "Enumeration of primitive Pythagorean triples" section, there is a proof that for every primitive pythagorean triple, there exists co-prime integers m,n that will generate the triple. – user2661923 Mar 17 '18 at 20:06