Finding the unique solution of a system of linear equations

linear algebramatricessystems of equations

Find for what values of $ k $ the given system has a unique solution, and find the solution:
\begin{cases}
x_1-x_2=1 \\
x_1-x_2+kx_3 = -2 \\
kx_2+4x_3 = 6
\end{cases}

with the corresponding augmented coefficient matrix, with row reduction,
$$
\begin{bmatrix}
1 & -1 & 0 & 1 \\
1 & -1 & k & -2 \\
0 & k & 4 & 6
\end{bmatrix}\sim
\begin{bmatrix}
1 & -1 & 0 & 1 \\
0 & k & 4 & 6 \\
0 & 0 & k & -3
\end{bmatrix}.
$$

By writing the matrix as a system of equation again and by using elimination, I find that
\begin{cases}
x_1 = \frac{k^2+6k+12}{k^2} \\
x_2 = \frac{6k+12}{k^2} \\
x_3 = -3/k.
\end{cases}

I really do not need help with finding what the unique solution is, nor that is has a unique solution for $ k\neq0 $. But is there a way of finding the solution by only using row reductions on the augmented coefficient matrix? I seem to get stuck in my own thought process.

Best Answer

Yes. After getting$$\begin{bmatrix}1 & -1 & 0 & 1 \\0 & k & 4 & 6 \\0 & 0 & k & -3\end{bmatrix},$$you consider two cases. On of them is the case $k=0$:$$\begin{bmatrix}1 & -1 & 0 & 1 \\0 & 0 & 4 & 6 \\0 & 0 & 0 & -3\end{bmatrix}.$$It is easy to see that there is no solution then. If $k\neq0$, you divede the second line by $k$:$$\begin{bmatrix}1 & -1 & 0 & 1 \\0 & 1 & \frac4k & \frac6k \\0 & 0 & k & -3\end{bmatrix}.$$Then you add the second row to the first one:$$\begin{bmatrix}1 & 0 & \frac4k & \frac{k+6}k \\0 & 1 & \frac4k & \frac6k \\0 & 0 & k & -3\end{bmatrix}.$$Now, you divide the third line by $k$ (no problem, since $k\neq0$):$$\begin{bmatrix}1 & 0 & \frac4k & \frac{k+6}k \\0 & 1 & \frac4k & \frac6k \\0 & 0 & 1 & -\frac3k\end{bmatrix}.$$And finelly you add both to the first line and to the second line the third line times $-\frac4k$.