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!

• If $X$ is $n\times 1$, $A$ is $n\times n$ then $X^*AX$ is $1\times 1$, i.e. it is in $\Bbb R$. When you say $P = X^*AX$, it goes without saying that $P^t = P$ and $P^* = P$, since $P$ is just a number! Mar 16, 2021 at 2:50
• How can $X$ be invertible if it's not square? If it is square then how can $X^{\ast}AX$ be a scalar?
– anon
Mar 16, 2021 at 3:03
• @runway44 that's a good point. Then the argument presented won't work. Mar 16, 2021 at 3:07

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}
• why is $\overline{\langle X, AX \rangle}=\langle X, AX \rangle$ true? Mar 16, 2021 at 4:25