The matrix $\mathbf{M}$ represents the sequence of two transformations in the $x$-$y$ plane given by a rotation of $60^\circ$ anticlockwise about the origin followed by a one-way stretch in the $x$-direction, scale factor $d$ ($d\ne0$).
a. Find $\mathbf{M}$ in terms of $d$. [4]
b. The unit square in the $x$-$y$ plane is transformed by $\mathbf{M}$ onto a parallelogram of area $\frac12d^2$ units$^2$. Show that $d=2$. [2]
The matrix $\mathbf{N}$ is such that
$$
\mathbf{MN}=\begin{pmatrix}1&1\\\frac12&\frac12\end{pmatrix}.
$$
c. Find $\mathbf{N}$. [3]
d. Find the equations of the invariant lines, through the origin, of the transformation in the $x$-$y$ plane represented by $\mathbf{MN}$. [5]