# Who first proved necessity of Euclid's formula for pythagorean triples?

The following well-known formula for pythagorean triples is commonly called Euclid's formula:

If $$a, b, c$$ are three natural numbers with $$a,c$$ odd, $$b$$ even, $$\gcd(a,b,c)=1$$ and $$a^2+b^2=c^2$$, then there exist $$n,m$$ natural, coprime, and with exactly one of them odd, such that $$a=m^2-n^2,\ b=2mn,\ c=m^2+n^2$$. Furthermore, For any choice of $$m,n$$ satisfying the above conditions, a triple $$a, b, c$$ satisfying the above conditions is generated by these formulae.

Euclid in fact discusses this in lemma 1 to proposition 29, book X of The Elements. When one translates the geometric argument Euclid gives there to algebra, the formula above is indeed recovered. However, what is also immediately apparent from Euclid's proof is that he only proves sufficiency of the formula, not necessity - i.e. he only proves that given $$m,n$$ as above, a pythagorean triple is indeed generated.

Who first proved the necessity of Euclid's formula? I could not find the answer anywhere, most sources seem to simply credit Euclid for the whole theorem. I'm also interested in what proof was used to prove necessity - I can find two common proofs, one using rational points on the unit circle, and one using just algebraic manipulation and a lemma (which follows from the FTA) that two coprime numbers whose product is a square, are squares. Which of these proofs came first?

Nobody. This happens quite often, one author does something that does not measure up to modern specifications of "proving X", but, after a succession of such authors, the result is trivial when it is finally "proved". So nobody gets the credit.

In this case, the idea of rational parametrization goes back to problem $$II.8$$ of Diophantus's Arithmetica:"Partition a given square into two squares". Kind of. Diophantus does not substitute $$y=tx-a$$ into $$y^2=a^2-x^2$$ with parameter $$t$$. He only substitutes $$y=2x-4$$ into $$y^2=16-x^2$$, but makes clear that $$16$$ is just an example. In $$III.19$$ this is referred to as "We have learned how to decompose the given square into two squares in an infinite number of ways".

In modern times, people sometimes describe $$II.8$$ as "rational parametrization", see e.g. History of the study of rational points on the circle. Abu Kamil and later Fermat, with the advantage of 17th century algebraization, extracted something like that from there, at least as far as finding rational points ($$II.8$$ is where Fermat's famous remark on the margins appears). For more on what happened in between see Bashmakova, Diophantus and Diophantine Equations.

As for explicit parametrization, it came much later. According to Lemmermeyer's Parametrizing Algebraic Curves:

"The first known geometric parametrization of an algebraic curve is due to Newton, and is contained in an article published only in 1971. The nowadays ubiquitous parametrization of the unit circle first appeared at the beginning of the 20th century in textbooks such as Kronecker's."

Fermat was not big on proving and considered finding rational solutions to quadratic Diophantine equations (like the Pythagorean or the Pell equation) a triviality. Kronecker would not claim credit for Pythagorean triples either. But Diophantus had no clue about parametrizations or rational points, and showed little interest in exhausting all solutions to Diophantine equations altogether, see Schappacher, Diophantus of Alexandria: a Text and its History:

"The fact that other linear substitutions $$y = kx−4$$ would have yielded a solution to the original problem as well, tends not to be mentioned. Nor, to be sure, does he ever show any indication of being aware of the geometric interpretation of this or similar problems as that of finding rational points on a circle of rational radius, and of his operations, as intersecting the circle with the line $$y = 2x − 4$$.

[...] Such a forming of right triangles from two numbers is what is treated nowadays — apparently as a late echo of a historical attribution made in the fifth century AD by Proclus — under the name of ‘pythagorean triples.’ This basic technique is used by Diophantus in many places, in particular in the problems of book “VI”... But note that it is not evident from the text of the Arithmetica, whether Diophantus knew that all right triangles with rational sides can be obtained in this way (a fact which we ‘simply’ like to see today as the parametrization of the rational points on the unit circle via stereographic projection from a chosen rational point $$P$$: the rational points on the unit circle are the second points of intersections with the circle of lines with rational slope passing through $$P$$). This kind of statement, aiming at exhausting all solutions of a problem, seems in fact alien to the very style of Diophantus’s problems."