# Is the inner product of matrices invariant under rotation?

Given two matrices $A,B\in \mathcal{R}^{m\times n}$ and one matrix $C\in \mathcal{R}^{m\times m}$, let $\langle A,B\rangle$ denote the inner product of matrices $A$ and $B$. Then does the following equation hold? $$\langle CA,B\rangle=\langle A,CB\rangle$$

Thank you!

• Which inner product? $(A, B) \mapsto \operatorname{tr}(B^T A)$? Nov 4 '15 at 16:56
• Yes. Just this definition. Nov 4 '15 at 17:23

No. Consider the simple example $$A = \Bbb I_2, \quad B = \pmatrix{0&1\\0&0}, \quad C = B^T.$$ Then, $$\langle CA, B \rangle = 0 \neq 1 = \langle A, CB \rangle.$$
On the other hand, there's a similar equation that does hold: By definition we have: $$\langle A, CB \rangle = \operatorname{tr}[(CB)^T A] = \operatorname{tr}(B^T C^T A) = \operatorname{tr}[B^T (C^T A)] = \langle C^T A, B \rangle .$$ This just says that left multiplication by $C^T$ is the operator adjoint to left multiplication by $C$ with respect to the natural inner product $\langle\,\cdot\, ,\,\cdot\,\rangle$.