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.
Your elimination is correct, For k=4 there are infinite solutions because the last row disappears. For k=1, there is no solution, because the second and third row contradict. You would get in terms of the variables $x_1,x_2,x_3$ the following: In the second row $x_2 -x_3 = -1$ and in the third row $-3(x_2-x_3) = 0$, which shows there is no such $x_2$ and $x_3$.
A good way to answer this, is by building the determinant of the system matrix $A$. Represent your system as $Ax=b$, where \begin{align} A &= \begin{pmatrix}1&1&1\\0&1&k-2\\0&k-4&4-k\end{pmatrix}\\ b &= \begin{pmatrix}0\\1\\0\end{pmatrix}. \end{align} Building the determinant gives you $det(A) = (4-k)-(k-4)(k-2) = (4-k)(k-1)$ and has the roots $k=1$ and $k=4$. This means for every $k\neq 1,4$ there is a solution, since your system matrix $A$ is is invertible, thus $x = A^{-1}b$. For $k=1$ and $k=4$, you have to check if the vector $b$ lies in the range of $A$, which you can do as I mentioned above.