An introduction to optimization by Edwin K. P. Chong and Stanislaw H. 2ak. Page-32. The question is that how to prove the following statement.
If $Q$ is a real symmetric matrix, then there exists an upper triangle matrix $V$ with diagonal entries $\alpha_{ii}$ s.t. $$ V^TQV=\left( \begin{array}{cccc} \alpha_{11} & 0 & \cdots & 0 \\ 0 & \alpha_{22} & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & \alpha_{nn} \end{array} \right) $$
where $$ V=\left( \begin{array}{cccc} \alpha_{11} & \alpha_{21} & \cdots & \alpha_{n1} \\ 0 & \alpha_{22} & \cdots & \alpha_{n2} \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & \alpha_{nn} \end{array} \right) $$