For every symmetric matrix A there exists B not singular matrix s.t. $B^{−1}AB$ is diagonal matrix.

Presumably the inner product is real. Let $A$ be an $n\times n$ real symmetric matrix. Then $q:x\mapsto\langle Ax,x\rangle$ is a quadratic form on $\mathbb R^n$. By the stated theorem, there is an orthogonal basis $v_1,v_2,\ldots,v_n$ of $\mathbb R^n$ with respect to which $q$ has a canonical form, i.e., there exist $n$ real numbers $\lambda_1,\ldots,\lambda_n$ such that $q\left(\sum_ix_iv_i\right)=\sum_i\lambda_ix_i^2$ for all $x_1,\ldots,x_n\in\mathbb R$. In terms of matrices this means $x^TV^TAVx=x^T\Lambda x$ for all $x\in\mathbb R^n$, where $V$ is the augmented matrix $\pmatrix{v_1&\cdots&v_n}$ and $\Lambda$ is the diagonal matrix $\operatorname{diag}(\lambda_1,\ldots,\lambda_n)$. It follows from the polarisation identity that $V^TAV=\Lambda$.

Since $V$ has mutually orthogonal columns, $V=QD$ for some orthogonal matrix $Q$ and diagonal matrix $D$ (more specifically, the $j$-th column of $Q$ is $v_j/\|v_j\|$ and the $j$-th diagonal entry of $D$ is $\|v_j\|$). Therefore $Q^TAQ=D^{-1}\Lambda D^{-1}$. Note that $D^{-1}\Lambda D^{-1}$ is a diagonal matrix and $Q^T=Q^{-1}$. The result now follows.