Let $A,B\in\mathbb{M}_{n\times n}(\mathbb{R})$ and $A,B$ are symmetric matrics. Prove that if $\vec{x}^TA\vec{x} = \vec{x}^TB\vec{x}$ $\forall\vec{x}$, then $A=B$.
Since $A,B$ are symmetric, they are orthogonally diagonizable, I'm not sure how to use that fact to prove the expression.
For any ${\rm x,y}\in {\mathbb R}^n$, one have that $$({\rm x+y})^tA({\rm x+y}) = ({\rm x+y})^tB({\rm x+y}).$$
So as ${\rm x}^tA{\rm x}={\rm x}^tB{\rm x}$, ${\rm y}^tA{\rm y}={\rm y}^tB{\rm y}$, ${\rm x}^tA{\rm y}={\rm y}^tA{\rm x}$ and ${\rm x}^tB{\rm y}={\rm y}^tB{\rm x}$, so one have that ${\rm x}^tA{\rm y}={\rm x}^tB{\rm y}$. Now let ${\rm x}={\rm e}_i$ and ${\rm B}={\rm e}_j$, then $$ A_{ij} = {\rm e}_i^tA{\rm e}_j={\rm e}_i^tB{\rm e}_j=B_{ij} $$ which proves that $A=B$.