[Math] Arbitrary variable in matrix, when there are 0 solutions, 1 solution, infinitely many solutions

linear algebramatricessystems of equations

For what value of the constants k does the system have (i) no
solutions, (ii) infinitely many solutions, (iii) a unique solution?

$$
x − 2y + z = 7\\
x − 2y − kz = k\\
kx − 2y + kz = 7
$$

At first I converted it to augmented matrix:
$$\left(\begin{array}{ccc|c}
1&-2&1&7\\
1&-2&-k&k\\
k&-2&k&7
\end{array}\right)$$

Then I did some row operations and got this:
$$\left(\begin{array}{ccc|c}
1&-2&1&7\\
0&1&0&\frac{-7-7k}{-2-2k}\\
0&0&1&\frac{k-7}{k-1}
\end{array}\right)$$

I have no idea what to do now, I tried looking for any ways to solve this on the internet but couldn't find any.
I only managed to figure out that with if division from 0 occurs on the right, then I have infinitely many solutions. (k = 1)

Answers for this exercise are:
$$(i) k = −1\\
(ii) k = 1.\\
(iii) k = ±1.$$
I want to know what are the steps to solve this.

Best Answer

Label the equations (1) $x-2y+z=7$, (2) $x-2y-kz=k$, (3) $kx-2y+kz=7$.

If $k=-1$, then (1) and (2) contradict, so there are no solutions. If $k=1$ the last equation is the same as the fist, so there are infinitely many solutions. So assume $k\ne\pm1$.

Taking $k$(1)-(3) we have $(-2k+2)y=7k-7$. Since $k\ne1$, we can divide by $k-1$ to get $y=-\frac{7}{2}$. Taking (1)-(2) we have $(k+1)z=7-k$. Since $k\ne-1$ we can divide by $k+1$ to get $z=\frac{7-k}{k+1}$. Then (1) gives $x=-z=\frac{k-7}{k+1}$. So in this case we have found a unique solution.

Related Question