# 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)?

-
You should use \langle ($\langle$) and \rangle ($\rangle$) instead of < and >, which give the wrong spacing. – Arturo Magidin Aug 14 '11 at 4:00
Thanks, I fixed it. – Casey Aug 14 '11 at 4:41

## 1 Answer

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$
-
+1: Why is it though, apart from the algebra, if the problem were to state $A,B \in \mathbb{R}^{n \times n}$ and $x,y \in \mathbb{R}^{n \times 1}$, the statement turns out to be false? – user17762 Aug 14 '11 at 4:45
@Sivaram: Good question, but I don't have a good answer. Perhaps a good example in the real case is $A=\begin{bmatrix}0&-1\\1&0\end{bmatrix}$ and $B=\begin{bmatrix}0&1\\-1&0\end{bmatrix}$. Going from the reals to complexes often yields more than you'd expect, and I'm reminded of analyticity of complex differentiable functions, and of existence of complex zeros of polynomials, and of nonemptiness of spectra in complex Banach algebras. – Jonas Meyer Aug 14 '11 at 4:58
@Pierre: For instance, as I jave mentioned in the earlier comment that if the problem were to state $A,B \in \mathbb{R}^{n \times n}$ and $x,y \in \mathbb{R}^{n \times 1}$, then letting $A = \begin{pmatrix} 1 & 2 \\ 2 & 1\end{pmatrix}$ and $A = \begin{pmatrix} 1 & 3 \\ 1 & 1\end{pmatrix}$, we will that $2$ doesn't imply $1$ – user17762 Aug 14 '11 at 5:01
@Sivaram: In fact, all examples stem from the fact that over real inner product spaces there are nonzero linear transformations that map each vector to a perpendicular vector. To simplify my earlier example, take $A=\begin{bmatrix}0&-1\\1&0\end{bmatrix}$ (a rotation by $\pi/2$) and $B=0$. In your example, one of the matrices is obtained from the other by adding a rotation by $\pi/2$. – Jonas Meyer Aug 14 '11 at 5:15
@Sivaram: Thanks for answering my silly question! I think that over a field whose characteristic is not 2, two square matrices define the same quadratic form iff they have the same symmetrization. What Jonas’s argument shows is that sesquilinear forms are determined by their restriction to the diagonal (even if they are not symmetric). Is this right, or am I making another confusion? – Pierre-Yves Gaillard Aug 14 '11 at 5:52