Matrix equation using determinant This question got me thinking and confused on how to solve it.
If $$\begin{align}k(x-a)+2x-z&=0\\k(y-a)+2y-z&=0 \\ k(z-a)-x-y+2z&=0\end{align}$$ 
Show that $$x = \frac{ak(k+3)}{k^2+4k+2}.$$
So far so good, I could only solve it simultaneously.
 A: Note that the system remains the same if you interchange $x$ and $y$. Therefore $x = y$ for any solution that is unique. This means that there are only two equations:
$$
k(x-a) + 2x - z = 0 \\
k(z-a) - 2x + 2z = 0 
$$ 
Solve the first equation for $z$, substitute into the second equation, and solve for $x$. 
A: Straightforward, using Cramer’s rule, see https://en.wikipedia.org/wiki/Cramer%27s_rule#Explicit_formulas_for_small_systems:
$$\begin{align}
{}&\det\begin{pmatrix}
2+k&0&-1\\
0&2+k &-1\\
-1&-1&2+k
\end{pmatrix}\\
&\qquad=(2+k)^2\det\begin{pmatrix} 
1&0&-1/(2+k)\\
0&1 &-1/(2+k)\\
-1&-1&2+k
\end{pmatrix}\\
&\qquad=(2+k)^2\det\begin{pmatrix}
1&0&-1/(2-k)\\
0&1 &-1/(2+k)\\
0&-1&2+k-1/(2+k)
\end{pmatrix}\\
&\qquad=(2+k)^2\det\begin{pmatrix}
1&0&-1/(2-k)\\
0&1 &-1/(2+k)\\
0&0&2+k-2/(2+k)
\end{pmatrix}\\
&\qquad=(2+k)^2(2+k-2/(2+k))\\
&\qquad=(k+2)(k^2+4k +2)=:D.
\end{align}$$
Now
$$\begin{align}
\det\begin{pmatrix}
ka&0&-1\\ ka &2+k&-1\\ ka &-1&2+k
\end{pmatrix}
&=ka\det\begin{pmatrix}
1&0&-1\\ 1&2+k&-1\\ 1&-1&2+k
\end{pmatrix}\\
&=ka\det\begin{pmatrix}
1&0&0\\ 1&2+k&0\\ 1&-1&3+k
\end{pmatrix}\\
&=ka(2+k)(3+k)=:D_x.
\end{align}
$$
Hence $x=D_x/D$ in case $k\notin\{-2,-2\pm\sqrt2\}$.
