The matrix $\mathbf{A}$ is given by $\mathbf{A}=\begin{pmatrix}1&2&3\\4&k&6\\7&8&9\end{pmatrix}$.
a. Find the set of values of $k$ for which $\mathbf{A}$ is non-singular. [3]
b. Given that $\mathbf{A}$ is non-singular, find, in terms of $k$, the entries in the top row of $\mathbf{A}^{-1}$. [4]
c. Given that $\mathbf{B}=\begin{pmatrix}1&0&0\\0&1&0\end{pmatrix}$, give an example of a matrix $\mathbf{C}$ such that $\mathbf{BAC}=\begin{pmatrix}2&1\\k&4\end{pmatrix}$. [4]
d. Find the set of values of $k$ for which the transformation in the $x$-$y$ plane represented by $\begin{pmatrix}2&1\\k&4\end{pmatrix}$ has two distinct invariant lines through the origin. [6]