Quadratic Form as Sum of Squares

I’ve been trying to prove the following:

Let $$k$$ be an algebraically closed field with $$\text{char}(k)\neq2$$, and let $$Q$$ be a non-singular quadratic form on $$k^n$$. Show that for some choice of basis of $$k^n$$ we can write $$Q=r_1X_1^2+\cdots+r_nX_n^2$$.

Here is my approach so far:

We can construct an $$n\times n$$ matrix $$A=(a_{ij})$$ such that $$Q(v)=v^TAv$$ by setting $$a_{ii}$$ as the coefficient of $$X_i^2$$ in $$Q$$, and $$a_{ij}=a_{ji}$$ as $$\frac{1}{2}$$ the coefficient of $$X_iX_j$$. We also have an associated bilinear form $$b(u,v)=\frac{1}{2}[Q(u+v)-Q(u)-Q(v)]=v^TAu$$

Then with respect to the standard basis $$e_1,\ldots,e_n$$, we have $$a_{ij}=b(e_i,e_j)$$.

Now, by induction on $$n$$ we can find a basis $$f_1,\ldots f_n$$ of $$k^n$$ which is orthogonal with respect to $$b$$.

(The $$n=0$$ case is trivial, then if $$b(v,v)=0$$ for all $$v\in k^n$$ we have $$Q(v)=0$$ for all $$v$$ and so any basis is orthogonal. Otherwise we have some $$b(f_1,f_1)\neq0$$, consider $$kf_1\oplus(kf_1)^\perp$$. It can be shown that $$n=\dim{kf_1}+\dim{(kf_1)^\perp}$$ since $$Q$$ is non-singular, so $$k^n=kf_1\oplus(kf_1)^\perp$$ and we apply the induction hypothesis to $$(kf_1)^\perp$$.)

Let $$S$$ be the change of basis matrix for this basis. I would like to conclude that $$(Sv)^TA(Sv)=v^TDv$$ for some diagonal matrix $$D$$. But I believe all we have shown is that $$S^{-1}AS=D$$.

If we could prove that $$S^T=S^{-1}$$ then we could make this final deduction, but I’m struggling to show that it is. Any help would be much appreciated.

I think you're overcomplicating matters. You have $$\ f_1, f_2, \dots, f_n\$$ orthogonal with respect to $$\ b\$$, so if you write an arbitrary member $$\ x\$$ of $$\ k^n\$$ as $$\ x=\sum_{i=1}^n X_i\,f_i\$$, then you have $$\ Q\left(x\right) = b\left(x,x\right)\$$. What happens if you now substitute $$\ x=\sum_{i=1}^n X_i\,f_i\$$ into $$\ b\left(x,x\right)\$$ and use the bilinearity of $$\ b\$$ to expand this expression out in terms of the $$\ X_i\$$?
• Ah so then $Q(x)=\sum_{i=1}^{n}x_i^2b(f_i,f_i)$, and so using our new coordinates we have $Q=\sum_{i=1}^{n}b(f_i,f_i)\bar{X_i}^2$. Many thanks – Dave Mar 10 at 10:51