If we know $x^T A x$ for all vectors $x$, can we solve for the matrix $A$? Let $A$ be a symmetric $n\times n$ real matrix. Suppose we do not know what $A$ is, but we have access to the values of $x^TAx$ for all vectors $x\in\mathbb R^n$. Can we determine $A$ from this information?
If the answer is yes, I would also like to know explicit formulas to obtain the elements of $A$.
It is easy to get the diagonal elements of $A$, by using $x=e_i$, where $e_i$ is the cartesian unit vector in the $i$'th direction. Then $A_{ii}=e_i^TAe_i$. But I'm not sure how to get the non-diagonal elements.

HINT: Once you know the diagonal elements, consider $x=e_i+e_j$.
