<s>[INST] 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
 [/INST] 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.
</s>