Is it true that if ${\bf{x}}^\text{T}{\bf{Ay}}={\bf{x}}^\text{T}\bf{By}$ for all $\bf{x},\bf{y}$ then $\bf{A}=\bf{B}$? I am puzzled by the following problem:

Suppose all vectors and matrices are defined on $\Bbb R ^n$ and $\bf A,B$ are both $n\times n$ square matrices. Is it true that if ${\bf x}^\text{T} {\bf Ay} = \bf{x}^\text{T}\bf By$ for all $\bf x,y$ then $\bf A = B $?

I tried to prove this without success. Can anyone help me with a proof or provide a counterexample? Thank you!
 A: If $x=(x_1,\dots,x_n)^T,y=(y_1,\dots,y_n)^T$, and $A=[a_{ij}],B=[b_{ij}]$, then
$$ x^TAy=\sum_{i,j=1}^na_{ij}x_iy_j $$
and similarly for $B$.
In particular, for any pair $i,j$ we can choose $x$ to be the $i$th standard basis vector and $y$ to be the $j$th standard basis vector to obtain
$$ a_{ij}=x^TAy=x^TBy=b_{ij} $$
Therefore $A=B$.
A: Notice that if you choose $x$ to be $(1,0,0,...,0)$ and $y$ to be $(0,1,0,...,0)$, $x^T Ay$ is the $(1,2)$ entry of $A$. This means you can isolate the entries of $A$ using these basic vectors. Now formalise what this means if all you could do this for all choices of $x$ and $y$.
A: $$\begin{align}\mathbf{x}^T \mathbf{A} \mathbf{y} &= \mathbf{x}^T\mathbf{B}\mathbf{y} \Rightarrow \\
\mathbf{x}^T \left(\mathbf{A} - \mathbf{B}\right)\mathbf{y} &= \mathbf{0}\end{align}$$
Any operator that satisfies that second line for all vectors $\mathbf{x}^T$ and $\mathbf{y}$ is, by definition, mapping all $\mathbf{y}$ to the zero vector, and is therefor the $\mathbf{0}$ operator. Proceed from there.
