The matrix $\mathbf{M}$ is given by
$$
\mathbf{M}=\begin{pmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{pmatrix}\begin{pmatrix}3&0\\0&1\end{pmatrix}.
$$
a. The matrix $\mathbf{M}$ represents a sequence of two geometrical transformations. State the type of each transformation, and make clear the order in which they are applied. [2]
b. Find the values of $\theta$, for $0\le\theta\le\pi$, for which the transformation represented by $\mathbf{M}$ has exactly one invariant line through the origin, giving your answers in terms of $\pi$. [9]