You are given that \(\mathbf{A} = \begin{pmatrix} 1 & -2 & k \\ 2 & 1 & 2 \\ 3 & 2 & -1 \end{pmatrix}\) and \(\mathbf{B} = \begin{pmatrix} -5 & -2+2k & -4-k \\ 8 & -1-3k & -2+2k \\ 1 & -8 & 5 \end{pmatrix}\) and that \(\mathbf{AB}\) is of the form \(\mathbf{AB} = \begin{pmatrix} k-n & 0 & 0 \\ 0 & k-n & 0 \\ 0 & 0 & k-n \end{pmatrix}\).
- Find the value of \(n\). [2]
- Write down the inverse matrix \(\mathbf{A}^{-1}\) and state the condition on \(k\) for this inverse to exist. [4]
- Using the result from part (ii), or otherwise, solve the following simultaneous equations.
\begin{align}
x - 2y + z &= 1
2x + y + 2z &= 12
3x + 2y - z &= 3
\end{align} [5]