Proof (matrix of symmetric bilinear or Hermitian sesquilinear form can be diagonal)

For a bilinear form $\phi$, if $[\phi]_B$ is diagonal, then it is symmetric, so $\phi$ is symmetric. For a sesquilinear form $\phi$, so if $[\phi]_B$ is diagonal and real, then it is Hermitian.

We prove the converse by induction on $n=\dim(V)$. It is clear for $n=0$ or $n=1$.

Suppose the theorem is true for any $\mathbb{F}$-vector space of dimension $n-1$. If $\phi(v,v) = 0$ for all $v\in V$, then by the polarisation identity, $\phi\equiv 0$, so $[\phi]_B = 0$.

Otherwise, let $v_1 \in V$ such that $\phi(v_1, v_1)\neq 0$. Let $U = {^\perp\set{v_1}} = \ker(\phi_R(v_1))$. By rank-nullity, $\dim(U) + \rk(\phi_R(v_1): V\to\mathbb{F}) = n$, and since $\phi_R(v_1)(v_1) \neq 0$, $\rk(\phi_R) = 1$, so $\dim(U) = n-1$.

The restriction $\phi|_{U}: U\times U\to \mathbb{F}$ is still a symmetric bilinear form/Hermitian sesquilinear form, so by induction hypothesis, there exists a basis $B_U = \set{v_2, \ldots, v_n}$ for $U$ such that $[\phi|_U]_{B_U}$ is diagonal.

Since $\phi(v_1, v_i) = \phi(v_i, v_1) = 0$ for $i=2,\ldots,n$ and $\phi(v_1, v_1) = 0$, the set $B = \set{v_1, \ldots, v_n}$ is a basis for $V$, and $$ \begin{align*} [\phi]_B = \pmat{\phi(v_1, v_1) & 0 & \ldots & 0 \\ 0 \\ \vdots & & [\phi|_U]_{B_U} \\ 0} \end{align*} $$ is diagonal.