The number of solutions to a system of equations 
Find the value of $k$ for which the system of equations 
$x-3y-z=0  $
$3x-5y-z=0$
$-x+ky+2z=k^2-4$
has:
(i) no real solutions
(ii) infinitely many solutions
(iii) a unique solution

I rewritten the system of equations in the augmented matrix form and simplified to $z= \frac{k^2-4}{-k+5}$. Now I think that the answers are as follows:
(i) $k=5$, because the denominator will be zero
(ii) I believe there is no such a possibility because for infinitely many  solutions it should be rewritten as $ az=b $ and both $a$ and $b$ would have to be zero - but it's not possible if written as $z(-k+5)=k^2-4$. 
(iii) Any $k \ne 5 $.
Please correct me if I'm wrong in any of the parts of the exercise, I am especially not sure about (ii).
 A: Let $A$ denote the coefficient matrix of the system and $b$ denote the vector of constants. The augmented matrix $(A\lvert b)$ is as follows;
$$
(A\lvert b) = \left(\begin{array}{rrr|r}
    1 & -3 & -1 & 0 \\
    3 & -5 & -1 & 0 \\
    -1 & k & 2  & k^2 - 4
  \end{array}\right).
$$
In order to check the number of solutions of the system, we take $(A \lvert b)$ to row-echelon form and study its rank. The row-echelon form of $(A \lvert b)$, which I will henceforth denote by $P$ is;
$$
P = \left(\begin{array}{rrr|r}
    1 & -3 & -1 & 0 \\
    0 & 4 & 2 & 0 \\
    0 & 0 & \frac{1}{2}(5-k) & k^2 - 4
  \end{array}\right).
$$
(Somebody please correct me if any errors are found).
Now we consider the cases.
$(i)$ No solutions; if we can find a $k$ such that $\frac{1}{2}(5-k) = 0$ while $k^2 – 4 \neq 0$ then we have that $\text{rank}(A\lvert b) > \text{rank}(A)$ and, as such, that there are no solutions. Indeed, if $k = 5$ then we have that
$$0x + 0y + 0z = 21$$
which is clearly nonsense.
$(ii)$ Exactly one solution; in this case we have only to find any $k$ such that $\text{rank}(A\lvert b) = \text{rank}(A) = 3$. In other words, a value of $k$ such that we can reduce the matrix further to reduced row-echelon form.
$(iii)$ Infinitely many solutions; in this case, we look for a $k$ such that $\frac{1}{2}(5-k) = k^2 - 4 = 0$. However since $k^2 - 4 = (k-2)(k+2)$, there is clearly no way for both to be zero simultaneously. Hence, there exists no $k$ such that there are infinitely many solutions to the system.
Hopefully this helps.
A: Let's work on the first and second equations:
$$\begin{cases}
x-3y-z & = 0\\
3x-5y-z & = 0
\end{cases} \Rightarrow 
\begin{cases}
x = & y\\
z = & -2y
\end{cases}. 
$$
Substitute this solution in the third equation:
$$-y+ky+2(-2y)=k^2-4 \Rightarrow y(k-5) = k^2-4.$$
If $k \neq 5$, then you have a unique solution:
$$\begin{cases}
x = & \frac{k^2-4}{k-5} \\
y = & \frac{k^2-4}{k-5} \\
z = & -2 \frac{k^2-4}{k-5}
\end{cases}
$$
On the other hand, if $k = 5$, then the equation $y(k-5) = k^2-4$ becomes:
$$y(5-5) = 5^2-4 \Rightarrow 0 = 21,$$
which, obviously, is impossible, and hence the whole system is impossible.
Summarizing:


*

*One solution for $k \neq 5$

*No solution for $k = 5$

