nonlinear diophantine equation $x^2+y^2=z^2$ how to solve a diophantine equation $x^2+y^2=z^2$ for integers $x,y,z$
i strongly believe there is a geometric solution ,since this is a pythagoras theorem form
or a circle with radius $z$
$x^2+y^2=z^2$
$(\frac{x}{z})^2+(\frac{y}{z})^2=1\implies x=y=\pm z$ or $0$
so we consider a line passing through  points $P_1(- z,0)$ and  $P(x,y)$ both on the circle
$m=\frac{y}{x+z}$
$x^2+m^2(x+z)^2=z^2$
$(m^2+1)x^2+2xzm^2+(m^2-1)z^2=0$
$((m^2+1)x+(m^2-1)z)(x+z)=0$
$\frac{x}{z}=-\frac{m^2-1}{m^2+1}$ or $-1$
let $m=\frac{a}{b}\implies \frac{x}{z}=\frac{b^2-a^2}{b^2+a^2}$
$\frac{y}{z}=\frac{2a^2}{b^2+a^2}$
how to get explicit $z,x,y$
 A: Euclid's Formula says that in essence, $(m^2 - n^2)^2 + (2mn)^2 = (m^2 + n^2)^2$ for all positive integers $m > n$. 
This is basically a parametrization of Pythagorean Triplets with two parameters.
A: Generally, if a conic curve with rational coefficients has one rational point $\rm\:P\:$ then it has infinitely many, since any rational line through $\rm\:P\:$ will intersect the curve in another point, necessarily rational, since if one root of a rational quadratic is rational then so is the other. Therefore, by sweeping lines of varying rational slopes through $\rm\:P\:$ we obtain infinitely many rational points on the conic.  Projecting these points onto a line leads to a rational parametrization of the conic. For a very nice exposition see Chapter $1$ of Silverman and Tate: Rational Points on Elliptic Curves. There are also many online expositions, e.g. search on "rational parametrization Pythagorean triple".
For Pythagorean Triples there is even more beautiful geometrical structure. One may generate Ternary Tree of Pythagorean Triples using arithmetical reflections.  
