Canonical form of a Quadratic form. I've been given the following quadratic form to find the canonical form of:
$$
Q(\bf{z})= z_1z_2 + 2z_2z_3 − 3z_3z_4
$$
through the method of forming perfect squares.
The method I've been taugh/show is to look at terms consisting of a specific variable, say $z_1$ and form the perfect square. We then set the canonical basis as the inside of the square (hopefully that makes sense...)
Until we get the quadratic form to look like:
$$
Q(z)=\alpha_1(\eta^1)^2+\alpha_2(\eta^2)^2+\alpha_3(\eta^3)^2+\alpha_4(\eta^4)^2
$$
where the alphas are the canonical coefficients.
Now I am stuck with the above problem as there is no square term. Typically my approach in these problems has been to start with a term that has a square term, and go from there. In this case, whenever I get to the final $\eta$ to find, I am left with two square terms, say $z_3$ and $z_4$
Is there something im missing?
 A: When you don’t have any squared terms, a common trick is to pick one of the cross terms $z_iz_j$ and make the change of variables $z_i=\frac12(y_1+y_2)$, $z_j=\frac12(y_1-y_2)$. This change of variables comes from a polarization identity for quadratic forms. You then have a difference of squares with which you can continue.  
Here, we can try $z_1=\frac12(y_1+y_2)$, $z_2=\frac12(y_1-y_2)$, obtaining $\frac14y_1^2-\frac14y_2^2+y_1z_3-y_2z_3-3z_3z_4$. After completing the squares a couple of times, you’ll once more be left with only a cross term, so apply another change of variables to it. When you’re all done, substitute for the $y_i$. (The factor of $\frac12$ in the change of variables is there to make this final substitution for the original variables “nicer.”)
A: Gantmacher's version of Lagrange's method leads to
$$ \left( \frac{1}{2} x_1 +  \frac{1}{2} x_2 + x_3 \right)^2 - \left( -\frac{1}{2} x_1 +  \frac{1}{2} x_2 - x_3 \right)^2  +  \left( \frac{1}{2} x_2 +  \frac{1}{2} x_3   -\frac{3}{2} x_4 \right)^2 -  \left( -\frac{1}{2} x_2 +  \frac{1}{2} x_3   +\frac{3}{2} x_4 \right)^2$$




A: Without spelling out all the computations; your quadratic form is given by the symmetric matrix
$${\bf z}\begin{pmatrix}
0&\tfrac12&0&\hphantom{-}0\\
\tfrac12&0&1&\hphantom{-}0\\
0&1&0&-\tfrac32\\
0&0&-\tfrac32&\hphantom{-}0
\end{pmatrix}{\bf z}^{\top}=0,$$
and you want to find a linear transformation $T$ such that
$$(T{\bf z})\begin{pmatrix}
\alpha_1&0&0&0\\
0&\alpha_2&0&0\\
0&0&\alpha_3&0\\
0&0&0&\alpha_4
\end{pmatrix}(T{\bf z})^{\top}=0,$$
so it suffices to diagonalize the symmetric matrix above.
