Solution (source code)

= Solution

An anticlockwise <rotation matrix> and reflection in the $x$-axis are
$$
\boxed{
R=\begin{pmatrix}\cos\theta&-\sin\theta\\
\sin\theta&\cos\theta\end{pmatrix}},
\qquad
\boxed{
M=\begin{pmatrix}1&0\\0&-1\end{pmatrix}}.
$$
The columns of $R$ are the images of the standard coordinate vectors, while $M(x,y)^T=(x,-y)^T$.