Prove any orthogonal 2-by-2 can be written in one of these forms.... I'd like to prove that any orthogonal $2 \times 2$ matrix can be written 
$$\bigg(\begin{matrix}
   \cos x & -\sin x  \\ 
   \sin x & \cos x  
\end{matrix}\bigg) \hspace{1.0em} \text{or} \hspace{1.0em}
\bigg(\begin{matrix}
   \cos x & \sin x \\
   \sin x & -\cos x
\end{matrix}\bigg)$$ 
for $0 \le x < 2\pi$.
I have no idea how to do this. I feel like this is something I've missed and is really straightforward but I can't find it in my book...
 A: Let $M=\begin{pmatrix}a & b \\ c & d \end{pmatrix}$ be orthogonal, then we have $MM^T=I_2$ and thus
$$\begin{cases}a^2+b^2=1 \\ c^2+d^2 = 1 \\ac+bd=0\end{cases}$$
By the $2$ first equations, we know that there exists $\theta,\phi\in [0,2\pi)$ such that 
$$ a = \cos(\theta), \quad b = \sin(\theta),\quad c = \sin(\phi), \quad d = \cos(\phi).$$
To convince you of this fact, think that the vectors $(a,b)$ and $(c,d)$ in $\Bbb R^2$ are lying on the unit sphere in $\Bbb R^2$.
Now, the last equation implies
$$\sin(\theta+\phi)=\cos(\theta)\sin(\phi)+\sin(\theta)\cos(\phi)=0,$$
where we used an angle sum identity for the sinus.
Now, $\sin(\theta+\phi)=0$ implies that $\theta +\phi= k\pi$ for some $k\in \Bbb N$ because $\sin(0)=0$ and the periodicity of the sinus. In particular, since $\theta,\phi\in [0,2\pi)$, we have $\phi = -\theta + \delta \pi$ with $\delta\in\{0,1\}$. 
Now, note that
$$ \sin(\delta\pi-\theta)=(-1)^{1-\delta}\sin(\theta) \quad \text{and}  \quad\cos(\delta\pi-\theta)=(-1)^{\delta}\cos(\theta)\quad \text{for}\quad \delta \in\{0,1\}.$$


*

*If $\delta=0$, we get $\phi=-\theta$ and therefore


$$ a=\cos(\theta)=\cos(-\theta)=d \qquad \text{and}\qquad b=\sin(\theta)=-\sin(\phi)=-c.$$


*

*If $\delta=1$, we get $\phi=\pi-\theta$ and therefore


$$ a=\cos(\theta)=-\cos(\pi-\theta)=-d \;\text{and}\;b=\sin(\theta)=\sin(\pi-\phi)=c.$$
