I want to diagonalize an arbitrary quadratic form $$\sum_{i\leq j \leq n} a_{i,j}x_ix_j$$ over an algebraically closed field of characteristic not equal to $2$. If $x_n^2$ appears in the form with nonzero coefficient, we can "complete the square" to get the square of a linear form plus a quadratic form of dimension $n-1$. If all $x_i^2$'s appear with nonzero coefficient, doing this successively will diagonalize the form and we'll end up with a total of $n$ squares of linear forms. However if $x_i^2$ does not appear, it seems we have to write $$x_i \sum_{k<i}a_{k,i}x_{k} = \bigg(\frac{1}{2}(x_i +\sum_{k<i}a_{k,i}x_{k})\bigg)^2 + \bigg(\frac{i}{2}(x_i -\sum_{k<i}a_{k,i}x_{k})\bigg)^2. $$
which is fine except that it requires two linear forms instead of one. This seems to throw the dimension off so that we end up with more than $n$ squares of linear forms at the end. How do you fix this?
Context: This is exercise 5.4.J in Ravi Vakil's Fundamentals of Algebraic Geometry
am I missing something or are these contradictory?
– bart Apr 25 '19 at 09:35