Using the standard basis of $\mathbb R^2$, determine the matrix of a reflection in a line forming an angle $\frac{\theta}{2}$ with the $x$-axis. #2 Using the standard basis of $\mathbb R^2$, determine the matrix of a reflection in a line forming an angle $\frac{\theta}{2}$ with the $x$-axis.
This question is related to the following question.
Using the standard basis of $\mathbb R^2$, determine the matrix of a reflection in a line forming an angle $\frac{\theta}{2}$ with the $x$-axis.
Since the last question, I have managed to make significant progress.
My solution follows.



My calculations follow.
$f(e_1) = (cos(\theta), sin(\theta))$
The following is my reasoning for $f(e_2)$.
$\sin(\theta) =$ opposite/hypotenuse $=$ opposite/1 = opposite
Since opposite is in the negative $y$ direction, $-\sin(\theta) =$ opposite.
$\cos(\theta) =$ adjacent/hypotenuse $=$ adjacent/1 $=$ adjacent.
Since adjacent is in the positive $x$ direction, $\cos(\theta) =$ adjacent
Therefore, $f(e_2) =$ $(cos(\theta), -\sin(\theta))$.
However, the solutions say that the correct answer for $f(e_2)$ is $(\sin(\theta),-\cos(\theta))$. Why is my reasoning incorrect? What is the correct reasoning to get the correct solution? Thank you.
 A: The problem here is that you've lost track of what $\theta$ originally represented, and introduced a new angle $\theta_2$ for some reason. This should explain it:

A: I have to agree with Adriano in his answer: you’ve introduced a lot of potential for error by using the name $\theta$ for three different angles. Call the angle that the line makes with the $y$-axis $\theta_2=\pi/2-\theta/2$. Use a different name for the angle in the final diagram as well, say $\theta_3$. You then have $f(\vec e_2)=\vec e_1\cos\theta_3+\vec e_2 \sin\theta_3$, but $\theta_3=\pi/2-2\theta_2=\theta-\pi/2$, so $$f(\vec e_2)=\vec e_1\cos{(\theta-\pi/2)}+\vec e_2\sin{(\theta-\pi/2)}=\vec e_1\sin\theta-\vec e_2\cos\theta.$$
A: If you know how to change bases:
Define another basis $\vec u_1 = (\cos \theta/2, \sin \theta/2), \vec u_2 = (-\sin \theta/2, \cos \theta/2)$. These two vectors are orthogonal, so the reflections of $\vec u_1$ and $\vec u_2$ are $\vec u_1$ and $-\vec u_2$, respectively. So the matrix of the reflection in this basis is $\bigl[\begin{smallmatrix}1&0\\0&-1\end{smallmatrix}\bigr]$, and the change of basis matrix from the new basis to the standard basis is $\bigl[\begin{smallmatrix}\cos \theta/2 & -\sin \theta/2 \\ \sin \theta/2 & \cos \theta/2\end{smallmatrix}\bigr]$. Thus the matrix of the reflection in the standard basis is
\begin{align}
& \begin{bmatrix}\cos \frac\theta2 & -\sin \frac\theta2 \\ \sin \frac\theta2 & \cos \frac\theta2\end{bmatrix}
\begin{bmatrix}1&0\\0&-1\end{bmatrix}
\begin{bmatrix}\cos \frac\theta2 & -\sin \frac\theta2 \\ \sin \frac\theta2 & \cos \frac\theta2\end{bmatrix}^{-1}
\\
={}& \begin{bmatrix}
\cos^2 \frac\theta2 - \sin^2 \frac\theta2 &
2 \sin\frac\theta2 \cos\frac\theta2 \\
2 \sin\frac\theta2 \cos\frac\theta2 &
\sin^2 \frac\theta2 - \cos^2 \frac\theta2
\end{bmatrix} = \begin{bmatrix}
\cos \theta & \sin \theta \\
\sin \theta & -\cos \theta
\end{bmatrix}. \end{align}
A: You could easily "cheat" on this one. The thing is, in $\mathbb R^2$, reflections with respect to a line are the same as rotation by $2\varphi$ where $\varphi$ is (directed) angle between a vector and the line. This follows from elementary geometry (you get two congruent triangles).
Now, if the angle between $e_1$ and the line is $\frac\theta 2$, then the angle between $e_2$ and the line is $\frac\theta 2 - \frac\pi 2$ (this is because the angle between $e_2$ and $e_1$ is $-\frac\pi 2$, so add to it the angle between $e_1$ and the line). We get that $e_1$ should be rotated by $\theta$ and $e_2$ by $\theta -\pi$:
$e_1 = (\cos 0,\sin 0)\mapsto (\cos(0+\theta),\sin(0+\theta)) = (\cos\theta,\sin\theta)$
$e_2 = (\cos(\frac\pi 2),\sin(\frac\pi 2))\mapsto (\cos(\frac\pi 2 + \theta - \pi),\sin(\frac\pi 2+\theta - \pi)) = (\sin\theta,-\cos\theta)$
