How to show that $a,\ b\in {\mathbb Q},\ a^2+b^2=1\Rightarrow a=\frac{s^2-t^2}{s^2+t^2},\ b= \frac{2st}{s^2+t^2} $ I want show the following $$a,\ b\in {\mathbb Q},\ a^2+b^2=1\Rightarrow a=\frac{s^2-t^2}{s^2+t^2},\ b= \frac{2st}{s^2+t^2},\ s,\ t\in{\mathbb Q} $$
How can we prove this ?
[Add] Someone implies that we must use pythagorean triple :
Let $$ a=\frac{n}{m},\ b= \frac{s}{k},\ (m,n)=(s,k)=1$$
Then $$ k^2n^2+s^2m^2=m^2k^2 \Rightarrow n^2|(k^2-s^2),\ k^2|m^2
  $$ so that we have $$n^2+ s^2=k^2,\ (n,s)=1,\ k=m$$ We complete the proof by the following
Proof of pythagorean triple : $$a^2+
b^2=c^2,\ (a,b)=1$$ Then which form do $a,\ b,\ c$ have ? We have $$
\frac{c+a}{b}=\frac{A}{B}=\frac{b}{c-a},\ (A,B)=1$$
So $$ (c+a)B^2=bAB=(c-a)A^2 $$
So $$ c-a=B^2t,\ c+a=A^2t$$ That is $$ b=tAB,\
c=\frac{t}{2}(A^2+B^2),\ a= \frac{t}{2}(A^2-B^2)
$$
$(a,b)=1 \Rightarrow t=2$ or $1$ If $t=1$, then $AB$ is odd. So we can derive a contradiction.

Set $a=\cos\theta$ and $b=\sin\theta$ rational. Then, 
Set $s=1$ and $t=\tan(\frac{\theta}{2})$ then $a=\frac{s^2-t^2}{s^2+t^2}$ and $b=\frac{2st}{s^2+t^2}$.
To show that $t$ is rational, remark that $\tan\frac{\theta}{2}=\frac{\sin\theta}{1+\cos\theta}$.
Q.E.D.
And actually it works for all $a,b\in\mathbb R$.
