Problem: Suppose $X$ is a Hilbert space. $A,B$ are two linear operators from $X$ to $X$ such that $(Ax , y)=(x , By)$ holds for every $x , y \in X$ ((.) means inner product). Prove that $A,B$ are both bounded.
This is a midterm test problem from my school. I have some thoughts but I am so confused that all theorems used to solve this kind of problem needs a bounded operator so I was trying to prove it by contradiction but I have no idea how to use the unbounded and given Hilbert space conditions. I feel like it's some kind of symmetric related conclusion but still can't figure it out.