To reduce a quadratic form $q: \mathbb R^n \longrightarrow \mathbb R$, one can:
$1)$ Use the method of Gauss. For instance, if we have: $q: \mathbb R^3 \longrightarrow \mathbb R$: $q(x_1,x_2,x_3) = x_1^2 - x_2x_3 + x_2^2$, we do:
$$q(x_1,x_2,x_3) = x_1^2 + x_2^2 - x_2x_3 + \frac{x_3^2}{4} - \frac{x_3^2}{4} = x_1^2 + (x_2 - \frac{x_3}{2})^2 - \frac{1}{4}x_3^2$$
$2)$ Use matrices (by the way, what do we call this method?). For instance, if $q: \mathbb R^2 \longrightarrow \mathbb R$: $q(x_1,x_2) = x_1^2 - 2x_1x_2 $. First, we find the representative matrix of $q$ relative to the canonical basis $\{(1,0), (0,1)\}$:
$$\begin{bmatrix} 1 & -1 \\ -1 & 0 \\ \end{bmatrix}$$
Then, we introduce:
$$ \left[ \begin{matrix} 1 & -1 \\ -1 & 0 \\ \end{matrix} \right| \left| \begin{matrix} 1 & 0 \\ 0 & 1 \\ \end{matrix} \right] $$
Now, we start performing row operations proceeded by corresponding column operations in order to preserve the symmetry of the matrix. Eventually the matrix on the LHS becomes a diagonal matrix and that on the RHS is the transition matrix from the initial representative basis into the new basis.
My questions are:
Are there other (faster) tricks in order to reduce a quadratic form?
In method $2$, should one perform the corresponding column operation after each row operation, or can one do all the required row operations then do each corresponding column operation? Does it make a difference? Does it work at all?
Thank you.