# For what valus of $k$, the system of equations $kx+y+z=1\;,x+ky+z=1\;,x+y+kz=1\;,$have (i) unique solution (ii) more than one solution (iii) no solution.

Toolbox:
Step 1
The matrix equation is $\begin{bmatrix} k & 1 & 1 \\ 1 & k & 1 \\ 1 & 1 & k \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix}=\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}$
The angmented matrix
$[A,B] = \begin{bmatrix} k & 1 & 1 & 1 \\ 1 & k & 1 & 1 \\ 1 & 1 & k & 1 \end{bmatrix} \sim \begin{bmatrix} 1 & 1 & k & 1 \\ 1 & k & 1 & 1 \\ k & 1 & 1 & 1 \end{bmatrix}R_1 \leftrightarrow R_3$
$\sim \begin{bmatrix} 1 & 1 & k & 1 \\ 0 & k-1 & 1-k & 0 \\ 0 & 1-k & 1-k^2 & 1-k \end{bmatrix}R_2 \rightarrow R_2-R_1$
$R_3 \rightarrow R_3=kR_1$
Step 2
When $k=1$
$[A,B] \sim \begin{bmatrix} 1 & 1 & 1 & 1 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{bmatrix}$ which is in echelon form with one nonzero row.
$\rho(A)=\rho[A,B]=1 \therefore$ is more than one solution.
When $k \neq 1$
$[A,B] \sim \begin{bmatrix} 1 & 1 & k & 1 \\ 0 & -1 & 1 & 0 \\ 0 & 1 & 1+k & 1 \end{bmatrix} R_2 \rightarrow \large\frac{1}{1-k} R_1$
$R_3 \rightarrow \large\frac{1}{1-k} R_3$
$\sim \begin{bmatrix} 1 & 1 & k & 1 \\ 0 & -1 & 1 & 0 \\ 0 & 0 & 2+k & 1 \end{bmatrix}$ which is in echelon form.
Step 3
When $k \neq 1, k \neq -2$ there are three nonzero rows $\rho(A)=\rho(A,B)=3$ and the system has a unique solution.
Step 4
When $k=-2$
$[A,B] \sim \begin{bmatrix} 1 & 1 & -2 & 1 \\ 0 & -1 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}$ which is in echelon form.
Now $\rho(A) = 2$ (no: of nonzero rows = 2)
and $\rho(A,B)=3$ ( 3 nonzero rows)
$\therefore \rho(A) \neq \rho(b)$ and the system has no solution.
Step 5
$\therefore$ the system has (i) a unique solution when $k \neq 1, -2$ (ii) more than one solution when $k = 1$ (iii) no solution when $k = -2$
1. Last line of step 1 should read as R3→R3=kR1 and should be placed below R2→R2−R1
2. In Step 2, R2→1/(1−k)R1 to read as R2→1/(1−k)R2
3. In Step 2, R3→1/(1−k)R3 to be placed below R2→1/(1−k)R2
I get k =1 or k ≠-1,where does -2 come from