I attempt to prove:
Let $M$ and $N$ be two $n×n$ matrices over a field $F$. Then $M=N$ if $X^TMY=X^TNY$ for every $n×1$ matrices $X$ and $Y$.
Using the definition of matrix multiplication, I showed that
$\sum_{l=1}^{n}\sum_{k=1}^{n}X_{k1}M_{kl}Y_{l1}=\sum_{l=1}^{n}\sum_{k=1}^{n}X_{k1}N_{kl}Y_{l1}$
But since I am not comfortable with double sums, I cannot proceed from here to show $M_{kl}=N_{kl}$ for each $k,l$. Any suggestions would be appreciated.
Hint: Try plugging in specific vectors $X,Y$. See what happens, for instance, if both $X$ and $Y$ have a single entry which is a $1$ and all other entries equal to zero.