<s>[INST] Linear Algebra - elimination and linear systems By given this matrix:
\begin{pmatrix}1&1&1&0\\2&3&k&1\\3&k&5&1\end{pmatrix}
I need to find, what are the values of k the system has infinity/single/no solution.
So I did elimination and I got:
\begin{pmatrix}1&1&1&0\\0&1&k-2&1\\0&k-4&4-k&0\end{pmatrix}
As one can see, for k=4 there are infinity solutions and for any k which is not 4 there is only a single solution.
But my friend told me that for k=1 there's no solution.
So what I did wrong? I have a mistake at the elimination procces?
I'd like to get some help.
Thanks.
 [/INST] You have obtained
$$\left(\begin{array}{ccc|c}
  1 & 1 & 1 & 0 \\
  0 & 1 & k-2 & 1 \\
  0 & k-4 & 4-k & 0 
\end{array}\right)$$
and correctly explained what happens for $k=4$.
Now let us have a look at the case $k\ne 4$. In this case $k-4\ne0$ and you can divide the last row by $(k-4)$:
$$\left(\begin{array}{ccc|c}
  1 & 1 & 1 & 0 \\
  0 & 1 & k-2 & 1 \\
  0 & k-4 & 4-k & 0
\end{array}\right)\sim
\left(\begin{array}{ccc|c}
  1 & 1 & 1 & 0 \\
  0 & 1 & k-2 & 1 \\
  0 & 1 & -1 & 0
\end{array}\right)\sim
\left(\begin{array}{ccc|c}
  1 & 1 & 1 & 0 \\
  0 & 0 & k-1 & 1 \\
  0 & 1 & -1 & 0
\end{array}\right)
$$
Now for $k=1$, the second row corresponds to the equation $0x_1+0x_2+0x_3=1$; which obviously has no solution.
For $k\ne1$ you can divide the second row by $(k-1)$ and you get unique solution. 
You can even compute the solution if you with to do so:
$$
\left(\begin{array}{ccc|c}
  1 & 1 & 1 & 0 \\
  0 & 0 & k-1 & 1 \\
  0 & 1 & -1 & 0
\end{array}\right)\sim
\left(\begin{array}{ccc|c}
  1 & 1 & 1 & 0 \\
  0 & 0 & 1 & \frac1{k-1} \\
  0 & 1 & -1 & 0
\end{array}\right)\sim
\left(\begin{array}{ccc|c}
  1 & 1 & 0 & -\frac1{k-1} \\
  0 & 0 & 1 & \frac1{k-1} \\
  0 & 1 & 0 & \frac1{k-1}
\end{array}\right)\sim
\left(\begin{array}{ccc|c}
  1 & 0 & 0 & -\frac2{k-1} \\
  0 & 1 & 0 & \frac1{k-1} \\
  0 & 0 & 1 & \frac1{k-1} \\
\end{array}\right)
$$
So the unique solution (for $k\ne1,4$) is $x_1=-\frac2{k-1}$, $x_2=\frac1{k-1}$, $x_3=\frac1{k-1}$.
You can plug these values into the original system and check that $x_1+x_2+x_3=0$, $2x_1+3x_2+kx_3=\frac{-4+3+k}{k-1}=1$ and $3x_1+kx_2+5x_3=\frac{-6+k+5}{k-1}=1$; so it is indeed a solution. 
If you also want to describe the solution set for the parameter $k=4$, you have to solve this case separately.
</s>