<s>[INST] Study the sign of the quadratic matrix. Let $Q$ be the quadratic form associated with the matrix :
$$
    \begin{pmatrix}
    2 & 1 & 1 \\
    1 & k & 0 \\
    1 & 0 & 1 \\
    \end{pmatrix}
$$
I reduced the matrix to the row echelon form and obtain :
$$
    \begin{pmatrix}
    1 & 0 & 1 \\
    0 & 1 & -1 \\
    0 & 0 & k-1 \\
    \end{pmatrix}
$$
So for $k=1$, $\operatorname{rank}(A)=2$. 
I inserted $k=1$ in the matrix and solved for eigenvalues which are : $\lambda = 0$ with multiplicity $2$ and 
$\lambda = 1$ , so the signature is $(1,0)$ then the sign is  positive semi definite.
Is that enough to study the sign if the quadratic matrix in this case ? 
 [/INST] Careful, eigenvalues of row echelon form are in general not equal to the eigenvalues of the original matrix. In this case the eigenvalues are not easy to calculate so we can directly consider the form $Q$ itself.
We have
$$Q(x,y,z) = \left\langle \begin{pmatrix}
    2 & 1 & 1 \\
    1 & k & 0 \\
    1 & 0 & 1 \\
    \end{pmatrix}\begin{pmatrix}
    x \\
    y \\
    z \\
    \end{pmatrix},\begin{pmatrix}
    x \\
    y \\
    z \\
    \end{pmatrix}\right\rangle = (x+y)^2+(x+z)^2+(k-1)y^2$$


*

*Assume $k > 1$.
Let $(x,y,z) \ne 0$. If $y \ne 0$, clearly $Q(x,y,z) \ge (k-1)y^2 > 0$. 
If $y = 0$ then $Q(x,y,z) = x^2+(x+z)^2$ so if $x \ne 0$ clearly $Q(x,y,z) \ge x^2 > 0$, and if $x = 0$ then $Q(x,y,z) = z^2 > 0$ because it must be $z \ne 0$.
Therefore $Q(x,y,z) > 0$ so we conclude that $Q$ is positive definite.

*Assume $k = 1$. Then $$Q(x,y,z) = (x+y)^2+(x+z)^2 \ge 0$$
but $Q(1,-1,-1) = 0$ so $Q$ is positive semidefinite.

*Assume $k < 1$. Then $Q(1,0,0) = 2 > 0$ and $Q(1,-1,-1) = k-1 < 0$ so $Q$ is indefinite.

</s>