# For complex matrices, if $\langle Ax,x\rangle=\langle Bx,x\rangle$ for all $x$, then $\langle Ax,y\rangle=\langle Bx,y\rangle$ for all $x$ and $y$?

Given $A$ and $B$, $n\times n$ complex matrices. If $\langle x,y\rangle =y^{*}x$ for all $x,y\in \mathbb C^{n}$, then the following are equivalent:

(1) $\langle Ax,y\rangle=\langle Bx,y\rangle$, for all $x,y\in \mathbb C^{n}$.

(2) $\langle Ax,x\rangle=\langle Bx,x\rangle$, for all $x,y\in \mathbb C^{n}$.

(1) implies (2) is easy, how to prove (2) implies (1)?

#### Solutions Collecting From Web of "For complex matrices, if $\langle Ax,x\rangle=\langle Bx,x\rangle$ for all $x$, then $\langle Ax,y\rangle=\langle Bx,y\rangle$ for all $x$ and $y$?"

Hint: Use the algebraic properties of the inner product to expand each side of the following equations:

• $\langle A(x+y),x+y\rangle=\langle B(x+y),x+y\rangle$
• $\langle A(x+iy),x+iy\rangle=\langle B(x+iy),x+iy\rangle$