Show that if $X^*AX\in \mathbb{R}$, then $A$ is hermitian As the title says the goal is to prove: If $X^*AX\in \mathbb{R}$ for all $X$, then $A$ is Hermitian.
This is my attempt:
$X^*AX=P\in \mathbb{R}$ then $(X^*AX)^*=(AX)^*X=X^*A^*X=P^*=P^t$. Furthermore, let $X$ be invertible, then $A=(X^*)^{-1}PX^{-1}$ and $A^*=(X^*)^{-1}P^tX^{-1}$. If I can show that $P=P^t$, then I am done, but I haven't been able to do that. I suspect one has to choose the right $X$ (since the above it is true for all invertible $X$.
I would appreciate if someone can give me a hint on how to go on or a different approach to prove the statement. Ideally, I don't want to invoke theorems. Thanks!
 A: First we show that if $\langle AX, X \rangle =0 ~~~\forall ~X$ then $A\equiv0$. It suffices to show that $\langle AX, Y \rangle =0~~~\forall ~X,Y$ , because \begin{align}
&\langle AX, Y \rangle =0~~~\forall~ Y \\
&\Rightarrow AX=0 ~~~\forall~ X \\
&\Rightarrow A \equiv0
\end{align}
Let $\alpha, \beta \in \mathbb{C}$ be arbitrary, by hypothesis $\forall ~X,Y$
\begin{align}
&\langle A(\alpha X+\beta Y),\alpha X+\beta Y \rangle =0\\
&\Rightarrow |\alpha|^2 \langle AX,X \rangle + |\beta|^2 \langle AY,Y\rangle+\alpha\bar\beta\langle AX,Y\rangle+ \bar\alpha\beta\langle AY,X \rangle=0 \\
&\Rightarrow \alpha\bar\beta\langle AX,Y\rangle+ \bar\alpha\beta\langle AY,X \rangle=0
\end{align}
Now putting $\alpha=\beta=1$ then $\alpha=i,~\beta=1$ in the above equation we get two equations in two unknowns, solving we get $\langle AX,Y \rangle=0~~~\forall~X,Y$ this implies $A\equiv 0$. Thus we get $\langle AX, X \rangle =0~~~\forall~X \Rightarrow A\equiv0$.
Note that $\overline{\langle X, AX \rangle}=\langle X, AX \rangle$.
\begin{align}
&\overline{\langle X, AX \rangle}=\langle AX, X\rangle ~~~\forall ~X\\
&\Rightarrow \langle X, AX \rangle =\langle X, A^*X \rangle ~~~\forall ~X\\
&\Rightarrow \langle X, (A-A^*)X \rangle =0 ~~~\forall ~X \\
&\Rightarrow (A-A^*)X=0 ~~~\forall ~X \\
&\Rightarrow A=A^*
\end{align}
