Is $$ 2x_1^2 + 5x_2^2 + 5x_3^2 + 4x_1x_2 - 4x_1x_3 - 8x_2x_3 $$ positively (semi)definite, negatively (semi)definite or indefinite?
My attempt: $$2x_1^2 + 5x_2^2 + 5x_3^2 + 4x_1x_2 - 4x_1x_3 - 8x_2x_3,$$ is equal to $$(x_1 + 2x_2)^2 + (x_1 - 2x_3)^2 + (x_2 - 4x_3)^2 - 15x_3^2.$$ I've got three positive squares and a negative one, so the expression could be both negative and positive so I would answer indefinite. However, the answer is supposed to be positively definite. Why?
Writing that expression in matrix form, we get $$\begin{bmatrix}x_1&x_2&x_3\end{bmatrix}A\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix},$$ where, if I'm not mistaken, $A=\begin{bmatrix}2&2&-2\\2&5&-4\\-2&-4&5\end{bmatrix}$.
There are a number of ways we can attempt to prove the positive definiteness of $A$. My personal favorite is using good old Gaussian elimination to see if all three pivots of $A$ are positive; if they are, $A$ is positive definite. Three row operations $\left(R_2\rightarrow R_2-R_1, R_3\rightarrow R_3+R_1, R_3\rightarrow R_3+\frac{2}{3}R_2\right)$ yield the following reduced matrix:$$A\rightarrow\begin{bmatrix}2&2&-2\\0&3&-2\\0&0&\frac{1}{3}\end{bmatrix}$$ Since all three pivots of $A$ are positive, we can conclude that $A$ is indeed positive definite.