Linear Transformation using Trig Identities 
Let $T:\mathbb{R}^2\longrightarrow \mathbb{R}^2$ and $ S:\mathbb{R}^2\longrightarrow \mathbb{R}^2$ be linear transformation defined by

$$
T(x) =Rx \;\text{and} \;S(x)=Qx
$$
Where $$R = \begin{bmatrix}
       \cos\theta & -\sin\theta \\
       \sin\theta & \cos\theta 
     \end{bmatrix}$$
and $$Q= \begin{bmatrix}
       \cos\theta & \sin\theta \\
       \sin\theta & -\cos\theta 
     \end{bmatrix}$$

Show that $T$ represents a rotation of $\theta$ counterclockwise around the origin and S represents a reflection in the line $y=mx$ with $m=\tan(\theta/2)$

I have absolutely no clue how to do this question and my textbook does not have any similar example. Please help
 A: Here are $2$ tricks you can use. Suppose you have $2$ vectors $(a, b)$ and $(c, d)$ and $\theta$ is the angle from $(a, b)$ to $(c, d)$ measured in counterclockwise direction. Then :
$$ac + bd =|(a,b)||(c,d)|cos(\theta)$$
$$ad-bc=|(a,b)||(c,d)|sin(\theta)$$
This should help with the first one.
Reflection by the line $y = tan(\theta/2)x$ is given by the matrix $M = R_{\theta/2} \times S_{Ox} \times R_{-\theta/2}$, where 
$$
R_{-\theta/2} = \begin{bmatrix}
       \cos(-\theta/2) & -\sin(-\theta/2) \\
       \sin(-\theta/2) & \cos(-\theta/2) 
     \end{bmatrix}
$$
$$
S_{Ox} = \begin{bmatrix}
       1 & 0 \\
       0 & -1 
     \end{bmatrix}
$$
$$
R_{\theta/2} = \begin{bmatrix}
       \cos(\theta/2) & -\sin(\theta/2) \\
       \sin(\theta/2) & \cos(\theta/2) 
     \end{bmatrix}
$$
Basically rotation by $-\theta/2$ to make $y = tan(\theta/2)x$ become vertical, then symmetry by $Ox$ and then rotation back to the initial slope of the line. So calculate $M$ and check if it's equal to $Q$.
A: Take an arbitrary vector $v=\begin{pmatrix} x\\ y\end{pmatrix}$, and find the solutiuon $T(v)$ and $S(v)$.
For the first one we get $T(v)=\begin{pmatrix}\cos\theta & -\sin\theta\\ \sin\theta & \cos\theta \end{pmatrix} \begin{pmatrix} x\\ y\end{pmatrix}=\begin{pmatrix}x\cos\theta-y\sin\theta\\ x\sin\theta + y\cos\theta\end{pmatrix}$.
We can show that this is a rotation of $\theta$ degrees about the origin. Let $\phi$ be an angle such that $(x^2+y^2)\cos\phi=x$ and $(x^2+y^2)\sin\phi=y$. Now we wish to move this by a degree $\theta+\phi$. The new coordinates are then $(x^2+y^2)\cos(\theta+\phi)=(x^2+y^2)(\cos\theta\cos\phi-\sin\theta\sin\phi)$. But this is simply $(x^2+y^2)\cos\theta\cos\phi -(x^2+y^2)\sin\theta\sin\phi= x\cos\theta - y\sin\theta$.
We can do a similar explanation for the $y$ component (I leave this to you).
As for  $S(v)=\begin{pmatrix}\cos\theta & \sin\theta\\ \sin\theta & -\cos\theta \end{pmatrix} \begin{pmatrix} x\\ y\end{pmatrix}=\begin{pmatrix}x\cos\theta+y\sin\theta\\ x\sin\theta - y\cos\theta\end{pmatrix}$.
Now the angle from the $x$ axis to the line $y=\tan\frac{\theta}{2}x$ is simply $\frac{\theta}{2}$. If we wish to reflect a point $(x,y)$ across this line, we need to take the angle of a line passing through the origin and this point to the line $y=\tan\frac{\theta}{2}x$, and then add this to the angle from the $x$ axis to the line $y=\tan\frac{\theta}{2}x$. Sorry if that sounds wordy, I had to explain it to myslef!
So let $\phi$ be the angle such that for an arbitrary point $p=(x,y)$ we have $(x^2+y^2)\cos\phi=x$ and $(x^2+y^2)\sin\phi=y$. Now we wish to reflect this so we need to let $\psi=\frac{\theta}{2}-\phi$. Then a reflection is the equivalent of to $\frac{\theta}{2}+\psi=\theta-\phi$. Then $(x^2+y^2)\cos(\theta-\phi)=(x^2+y^2)(\cos\theta\cos\phi+\sin\theta\sin\phi)=x\cos\theta+y\sin\theta$.
Again, I leave the $y$-component to you.
