The matrix $\mathbf{M}$ is given by
$$
\mathbf{M}=\begin{pmatrix}1&0\\0&k\end{pmatrix}\begin{pmatrix}1&0\\k&1\end{pmatrix},
$$
where $k$ is a constant and $k\ne0,1$.
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. Write $\mathbf{M}^{-1}$ as the product of two matrices, neither of which is $\mathbf{I}$. [2]
c. Show that the invariant points of the transformation represented by $\mathbf{M}$ lie on the line $y=\frac{k^2}{1-k}x$. [4]
d. The triangle $ABC$ in the $x$-$y$ plane is transformed by $\mathbf{M}$ onto triangle $DEF$. Find the value of $k$ for which the area of triangle $DEF$ is equal to the area of triangle $ABC$. [2]