Proof (normalised diagonal matrix of bilinear form)
Pick a basis $C = \set{c_1, \ldots, c_n}$ such that $[\phi]_C = \mathrm{diag}(a_1, \ldots, a_n)$.
For a symmetric bilinear form $\phi$,
-
For $\mathbb{F}=\C$, reorder the indices so that the non-zero $a_i$'s come first, i.e. $a_i\neq 0$ iff $i\leq r = \rk(\phi)$. Then set $$ \begin{align*} b_i ={}& \frac{1}{\sqrt{a_i}} c_i, &&i\leq r, \\ b_i ={}& c_i, &&i\geq r+1. \end{align*} $$
-
For $\mathbb{F} = \R$, reorder the indices so that the positive $a_i$'s come first, then the negative ones, then zeros, i.e. $a_i>0$ for $i\leq p$, $a_i<0$ for $p+1\leq i\leq p+q$, and $a_i=0$ for $i\geq p+q+1$. Then set $$ \begin{align*} b_i ={}&\frac{1}{\sqrt{a_i}} c_i, &&i\leq p, \\ b_i ={}& \frac{1}{\sqrt{-a_i}} c_i, &&p+1\leq i\leq p+q, \\ b_i ={}& c_i, &&i\geq p+q+1. \end{align*} $$
For a Hermitian sesquilinear form $\phi$, recall that $\phi(v,v)\in \R$. Do the same thing as the second case above.