solutions of $a^2+b^2=c^2$ I am trying to figure the following out.
If you have $a^2+b^2=c^2$ and let $x=a/c$ and $y=b/c$
how can you show that 
$x=\frac{m^2-n^2}{m^2+n^2}$ and $y=\frac{2mn}{m^2+n^2}$ for some relatively prime numbers $m,n \in \mathbb{Z}$ 

The substitution turns the problem into finding rational points $(x,y)$ on $$x^2 + y^2 = 1,$$ given any two rational points the line through them will have rational gradiant ($\Delta y/\Delta x$). In fact we have a sort of converse: if you have one point and a line with rational gradiant through that point, then the intersection of it with the circle will have two points (because every quadratic has two roots) both rational (because the conjugate of a rational number is rational).
If we picked $(1,0)$ and intersect the line $y = (m/n)x - m/n$ with the circle $x^2 + y^2 - 1 = 0$ we get $x^2 + ((m/n)x - m/n)^2 - 1 = 0$ which must be divisible by $x-1$ since that is $x=1$ is a root, so after performing the long division we get $x = (m^2 - n^2)/(m^2 + n^2)$, back substituting that gives $y = (-2nm)/(m^2 + n^2)$ thus $(a:b:c) = (m^2-n^2:2mn:m^2+n^2)$ gives all solutions of $a^2 + b^2 = c^2$.
