Quadratic forms of two matrices are equal then the matrices are equal $A,B\in M_n$, then prove that if $x^HAx=x^HBx$ for all $x\in C^n$, then $A=B$
 A: So that this question can finally be resolved, a formal answer:
First of all, this statement is true, though it does not hold in its restriction to real-valued matrices and vectors.  We have the following proof, as partially constructed by Falang:
Let $A$ be an $n\times n$ matrix with complex entries.  Let 
$$
e_i=\pmatrix{0&\cdots&0&1&0&\cdots&0}^T 
$$
Be the $i^{th}$ standard basis vector of $\mathbb C^n$ for $1\leq i\leq n$.  We note that when $x=e_i:$
$$
x^HAx=A_{ii}
$$
When $x=e_i+e_j$ for $i\neq j$, we have
$$
x^HAx=A_{ii}+A_{ij}+A_{ji}+A_{jj}
$$
And when $x=e_i+ie_j$ for $i\neq j$, we have
$$
x^HAx=A_{ii}+i(A_{ij}-A_{ji})-A_{jj}
$$
Now, suppose that $B$ is a matrix such that $x^HAx=x^HBx$ for all $x\in\mathbb C^n$. Setting the above products equal for each matrix, we have for all $i:$
$$
A_{ii}=B_{ii}
$$
which is to say that the matrices must share all diagonal entries, and for all $i,j:$
$$
\cases{
A_{ii}+A_{ij}+A_{ji}+A_{jj}=B_{ii}+B_{ij}+B_{ji}+B_{jj}\\
A_{ii}+i(A_{ij}-A_{ji})-A_{jj}=B_{ii}+i(B_{ij}-B_{ji})-B_{jj}\\
}\implies\\
\cases{
A_{ij}+A_{ji}=B_{ij}+B_{ji}\\
A_{ij}-A_{ji}=B_{ij}-B_{ji}\\
}\implies\\
\cases{
A_{ij}=B_{ij}\\
A_{ji}=B_{ji}\\
}
$$
Which is to say that all non-diagonal entries are equal. Thus, any two matrices $A,B$ such that $x^HAx=x^HBx$ must have identical entries and must therefore be the equal.
A: Yet another proof.  I assume $A$ and $B$ are hermitian and $x$ is complex. The idea is to prove that hermitian matrix $T=A-B$ has all zero eigenvalues and thus $T=0$ which readily implies $A=B$.
\begin{align}
\lambda_{min}(T)=\min_{x\in C^n,~||x||_2=1}x^H(A-B)x ~~~~~~~~~~~ \lambda_{max}(T)=\max_{x\in C^n,~~||x||_2=1}x^H(A-B)x
\end{align}
This follows from so called rayleigh ritz ratio. Now $x^HAx=x^HBx$ implies that $x^H(A-B)x=0$ for all $x$. Thus $\lambda_{min}(T)$ and $\lambda_{max}(T)$ are both zeros. Thus your required proof. 
