# diagonalize quadratic form without square term and find signature

I just learn how to complete square of a quadratic form and then I met a problem without square term: we work over the field of read numbers. Reduce the quadratic form $$q(x_1,x_2,x_3,x_4)=x_1x_2+x_2x_3+x_3x_4$$ to the diagonal form and calculate its signature.

I do it in this way and I don't know whether it is right or wrong:

Since there is no square terms, I set $y_1=x_1,y_2=x_2-x_1,y_3=x_3,y_4=x_4$. So I have $q=y_1(y_2+y_1)+(y_2+y_1)y_3+y_3y_4$. Then I complete the square $q=(y_1+\frac{y_2+y_3}{2})^2-\frac{1}{4}(y_3-(y_2+2y_4))^2+\frac{1}{4}(y_2+2y_4)^2-\frac{1}{4}y_2^2$.

Is it the right way to do the diagonalization and conclude that the signature is $n_+-n_-=2-2=0$?

Thank you very much!

The standard way (Gauß's reduction) consists, when there are no square terms, in using repeatedly the identity: $$ab=\frac14(a+b)^2-\frac14(a-b)^2$$ so as to eliminate the variables one after the other.
In detail: \begin{align*} x_1x_2+x_2x_3+x_3x_4&=(x_1+x_3)x_2+x_3x_4\\ &=\frac14(x_1+x_2+x_3)^2-\frac14(x_1-x_2+x_3)^2+x_3x_4\\ &=\frac14(x_1+x_2+x_3)^2-\frac14(x_1-x_2+x_3)^2+\frac14(x_3+x_4)^2-\frac14(x_3-x_4)^2 \end{align*} The signature of the quadratic form is $(2,2)$ (the signature is a pair of natural numbers).