This problem is from "Notes on Geometry" by Rees.
I am studying the Euclidean Geometry Part in the book.
This problem is right below the definition of the orthogonal and orthonormal, so I assume that $A,B$ in this problem are matrices of $T:\mathbb{R}^n\to \mathbb{R}^n$ with respect to an orthonormal basis.
Moreover, this problem wants to use the fact "$a_{ij}=e_{i}^{t}Ae_j$", which seems like $a_{ij}$ is the element of the matrix $A$ and $e_i,e_j$ are elements of an orthonormal basis. Also, I think I have to use another fact "if $x=\sum_{i}^{n}x_ie_i $ and $y=\sum_{i}^{n}y_ie_i$, then $x\cdot y=\underline{x}^t\underline{y}$." Here, the underline indicates that $x,y$ are column vectors.
The book itself is a little vague for a beginner like me, so I would like to see if my answer is the right solution for this problem.
My answer:
Pick arbitrary $x,y \in \mathbb{R}^n$.
We have
$x^tAy=x^tBy$, so this becomes $x^te_ia_{ij}e_j^ty = x^te_ib_{ij}e_j^ty$ by the first fact listed above.
Then, by the second fact, the equation again becomes $(x\cdot e_i) a_{ij} (e_j\cdot y)=(x\cdot e_i) b_{ij} (e_j\cdot y)$.
Assuming that $x,y$ are non-zero for division, we get $a_{ij}=b_{ij}$.
Hence, $A=B$.
Is this the right approach?
Not quite. It's better to phrase it in the following way.
If $x^T A y = x^T B y$ for all $x,y \in \mathbb{R}^n$, then we may, in particular, set $x = e_i$ and $y = e_j$, so that we get $$a_{ij} = e_i^T A e_j = e_i^T B e_j = b_{ij}$$ This implies $A = B$.
Note that this differs from your answer in the following two ways: