The system of equations is: kx+y+z=1 −(1), x+ky+z=k −(2), x+y+kz=k2 −(3).
The coefficient matrix is A=k111k111k.
Computing det(A): add all three columns to the first column: C1→C1+C2+C3, giving k+2k+2k+21k111k.
Factor out (k+2): det(A)=(k+2)1111k111k.
Apply R2→R2−R1 and R3→R3−R1: =(k+2)1001k−1010k−1=(k+2)(k−1)2.
For no solution, we need det(A)=0, so k=−2 or k=1.
When k=1: all three equations become x+y+z=1, which has infinitely many solutions (not "no solution").
When k=−2: the equations become −2x+y+z=1, x−2y+z=−2, x+y−2z=4. Adding all three: 0=3, which is a contradiction. So the system has no solution.
Therefore k=−2, which matches Option D.