Artificial intelligent assistant

If two matrices pre- and post-multipied by same vector yield same number, then are they the same? I have two matrices $\mathbf{A}$ and $\mathbf{B}$ and a vector $\mathbf{u}$, and I know that $$\mathbf{u'Au}=\mathbf{u'Bu}$$ May I conclude from this that $\mathbf{A}=\mathbf{B}$? If not please provide a counterexample.

No. Let $$u=\begin{bmatrix}1\\\1\end{bmatrix}$$ $$A=\begin{bmatrix}1 & 0 \\\ 0 & 2\end{bmatrix}$$ $$B=\begin{bmatrix}2 & 0 \\\ 0 & 1\end{bmatrix}$$ Then $$u'Au=u'Bu=3$$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 937feb48529115ab4941057b80334d47