Let $A=\begin{pmatrix} 0 & -2 & 1 \\ -2 & 1 & 2 \\ 1 & 2 & 0 \end{pmatrix} \in M\_3(\mathbb{R})$.

I want to find an invertible matrix $C$ such that $C^TAC=\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & -1 \end{pmatrix}$, since there are three eigenvalues, two of them are positive, one is negative.

I want to use completing the square with the bilinear form $s(v,v)=\langle v,Av \rangle$:

$s(v,v)= \langle v,Av \rangle=(v\_1,v\_2,v\_3)\begin{pmatrix} 0 & -2 & 1 \\ -2 & 1 & 2 \\ 1 & 2 & 0 \end{pmatrix}\begin{pmatrix} v\_1\\v\_2\\v\_3 \end{pmatrix}=-4v\_1v\_2+2v\_1v\_3+v\_2^2+4v\_2v\_3$

Now I tried to use the formula $ax^2+bx=a(x+\frac{b}{2a})^2-\frac{b^2}{2a}$, but there is no $v\_1^2$.

So I started with $v\_2^2$:

$s(v,v)=(v\_2+2v\_3)^2-4v\_1v\_2+2v\_1v\_3-4v\_3^2$

Here I don't see how to use completing the square again with $-4v\_1v\_2+2v\_1v\_3$, since $v\_1^2$ is not available. Is there a method how to continue?