I am studying some linear algebra and I've learned one algorithm to transform a bilinear symmetric form in a diagonal matrix, i.e., it is a sum of squares. But to do this, I am using a kind of Gramm-Schimdt process, I mean:
Take $\{e_1,\ldots,e_n\}$ basis for $V$ a vector field, and consider $f : V\times V \to V$ a symmetric bilinear form. How to find a basis in a such way that $f$ is a sum of squares?
What I've learned is:
Take $e_1$, then make:
$v_1 = e_1.$
Do then
$$v_2 = e_2 - \frac{f(v_1,e_2)}{f(v_1,v_1)}v_1,$$
$$v_3 = e_3 - \frac{f(v_1,e_3)}{f(v_1,v_1)}v_1 - \frac{f(v_2,e_3)}{f(v_2,v_2)}v_2$$
proceed as the same way. Then we get the searched basis.
But my question is, how to do this procedure using only the matrix of $f$? Is this equivalent to find a basis formed by eingenvectors?