Why $(2m)^2 + (m^2 - 1)^2 = (m^2 + 1)^2$ results in pythagorean triples? As you increase the value of n, you will generate all pythagorean triples whose first square is even. Is there any visual proof of the following explicit formula and where does it come from or how to derive it?
$(2n)^2 + (n^2 - 1)^2 = (n^2 + 1)^2$




$(2n)^2+(n^2-1)^2=(n^2+1)^2$
$(2n)^2+(n^2-1)^2=(n^2+1)^2$
$(2n)^2+(n^2-1)^2=(n^2+1)^2$




$(2*0)^2+(0^2-1)^2=(0^2+1)^2$
$(2*1)^2+(1^2-1)^2=(1^2+1)^2$
$(2*2)^2+(2^2-1)^2=(2^2+1)^2$


$(2*0)^2+(0-1)^2=(0+1)^2$
$(2*1)^2+(1-1)^2=(1+1)^2$
$(2*2)^2+(4-1)^2=(4+1)^2$


$0^2+1^2=1^2$
$2^2+0^2=2^2$
$4^2+3^2=5^2$


$0+1=1$
$4+0=4$
$16+9=25$


$1=1$
$4=4$
$25=25$




This formula can be derived in various ways, and with connections to different areas of mathematics. One way of seeing why it generates all the triples is to note that the unit circle $$x^2+y^2=1$$ in polar co-ordinates has $y=\sin \theta, x=\cos \theta$ so this takes in all the points of the circle (for angles $-\pi\le \theta \lt \pi$ it traverses the circle once).
Now, with $t = \tan \frac {\theta}2$ we have the half angle formulae $y=\dfrac {2t}{1+t^2}, x=\dfrac {1-t^2}{1+t^2}$ which parametrise the unit circle with rational functions (the point at $x=-1, y=0$ corresponds to the singularity in the tangent function).
If we substitute back into the original equation for the circle, and multiply through by $(1+t^2)^2$ we get a pythagorean relationship $$(1-t^2)^2+(2t)^2 = (2t)^2+(t^2-1)^2=(t^2+1)^2$$
We can do this for every rational point on the unit circle, and for each integer $t$ we recover such a rational point.
There are "more elementary" ways of showing how pythagorean triples work, but this is worth noting as an example of the rational parametrisation of a curve - a topic which has its own theory, generalising the case of the circle. You can draw a diagram to show how a pythagorean triangle with integer sides corresponds to a rational point on the unit circle.
