<s>[INST] Is the matrix $A$ positive (negative) (semi-) definite? Given, $$A = \begin{bmatrix}
2 &-1  & -1\\ 
 -1&2  & -1\\ 
 -1&  -1& 2
\end{bmatrix}.$$
I want to see if the matrix $A$ positive (negative)  (semi-) definite.
Define the quadratic form as $Q(x)=x'Ax$. 
Let $x \in \mathbb{R}^{3}$, with $x \neq 0$.
So, $Q(x)=x'Ax = \begin{bmatrix}
x_{1} &x_{2}  &x_{3} 
\end{bmatrix} \begin{bmatrix}
2 &-1  & -1\\ 
 -1&2  & -1\\ 
 -1&  -1& 2
\end{bmatrix} \begin{bmatrix}
x_{1}\\x_{2} 
\\x_{3} 
\end{bmatrix}$.
After multiplying out the matrices I am left with $$Q(x) = 2(x_{1}^{2}+x_{2}^{2}+x_{3}^{2}-x_{1}x_{2} - x_{1}x_{3}-x_{2}x_{3}).$$
Not sure what I can do with this result. Any suggestions on how to proceed would be appreciated.
 [/INST] If you want to proceed with this solution, you should complete the square. It is important that you "complete one variable completely every time". We write
$$\begin{aligned}
x_1^2+x_2^2+x_3^2-x_1x_2-x_1x_3-x_2x_3&=\Bigl(x_1-\frac{1}{2}x_2-\frac{1}{2}x_3\Bigr)^2+\frac{3}{4}x_2^2+\frac{3}{4}x_3^2-\frac{3}{2}x_2x_3\\
&=\Bigl(x_1-\frac{1}{2}x_2-\frac{1}{2}x_3\Bigr)^2+\frac{3}{4}\bigl(x_2-x_3\bigr)^2.
\end{aligned}
$$
Can you conclude from here?
</s>