Determine if the quadratic form is positive definite, negative definite or undefinite "Determine if the following quadratic form is positive definite, negative definite or undefinite
$Q:\mathbb R^3\to \mathbb R, \,Q(u)=x_1^2+4x_1x_2-2x_2^2+2x_1x_3-2x_3^2$"
$$Q=\begin{bmatrix}
        1&2&1 \\\ 2&-2&0 \\\ 1&0&-2
     \end{bmatrix}$$  


*

*I tried to compute the diagonal matrix but the eigenvalues are not integers, thus it's a bit hard to calculate by hand. UPDATE: Seemingly, I've done something wrong previously.

*I tried to group them to form squares, however there is nothing that guarantees is either positive or negative. Plugging in numbers results in both positive and negative results.

*What else to try?

 A: Notice that if you add two times the identity matrix to $Q$ then the bottom-right $2\times 2$-submatrix will be $0$.
This shows that $-2$ is an eigenvalue--a corresponding eingenvector is $[0,1,-2]$.
Now use polynomial division to divide the characteristic polynomial by $(\lambda+2)$.
The zeros of the resulting quadratic polynomial are the two remaining eigenvalues.
A: The first vector of the canonical basis being positive and the second negative, the form is indefinite.
EDIT A. More careful phrasing: 
The restriction of $Q$ to the first coordinate axis being positive definite, and its restriction to the second coordinate axis being negative definite, $Q$ is indefinite.
EDIT B. If the matrix of a quadratic form on $\mathbb R^n$ has a positive ($ > 0$) diagonal entry and a negative ($ < 0$) diagonal entry, then it is indefinite.
A: The principal determinant method is easy to apply, the eigenvalue method
is more tedious 
A: Another way is by looking at the $Q$ directly. If $Q$ is going to be definite, then it must be negative definite, or else it is indefinite and this comes from the fact that setting $x_1=0$ we get $Q = -2x_2^2-2x_3^2$ which is always negative. Since we have no terms of the form $x_2x_3$, the rest is easy. If it is negative definite thus it must be of the form 
$$-\left( \frac{x_1}{\sqrt{2}} \pm a x_2\right)^2-\left( \frac{x_1}{\sqrt{2}} \pm bx_3\right)^2 -cx_1^2-dx_2^2-ex_3^2$$
Fortunately we just need to check that $\left( -\frac{1}{2} - \frac{1}{2}-c\right)x_1^2 = x_1^2 \Rightarrow c=-2$ and thus $Q$ is indefinite.
