Under what condition on matrix $Q$ we have $tr(AQ)=tr(BQ)$

183 Views Asked by At

Let $A,B$ are similar matrices. Then, under what condition on matrix $Q$, we have $tr(AQ)=tr(BQ)$

$A$ and $B$ are similar matrices, so there exist an invertible matrix $P$ such that $$A=P^{-1}BP\\ AQ=P^{-1}BPQ\quad \text {(taking $Q$ invertible matrix)}\\ tr(AQ)=tr(P^{-1}BPQ)$$ But unable to reach at result.What will happen if $Q$ is singular matrix?

I know that similar matrices have same eigenvalues but not getting a way to use this. Any help is appreciated. Thank you.

2

There are 2 best solutions below

0
On

The linear functional $\phi: Q \mapsto \text{tr}(AQ) - \text{tr}(BQ)$ on $n \times n$ matrices is nonzero if $A \ne B$, and so those $Q$ for which $\phi(Q) = 0$ form a linear subspace of the $n \times n$ matrices with codimension $1$. For any $n \times n$ matrix $X$, there is a scalar $z$ such that $X + z (A-B)^*$ is in this subspace. Here ${}^*$ denotes the Hermitian transpose (or the transpose in the real case).

3
On

$\def\tr#1{\operatorname{tr}\left(#1\right)}\tr{AQ}=\tr{BQ}$ is equivalent to $\tr{(A-B)Q}=0$. Thus the equality holds for all $Q$ in the orthogonal complement of $(A-B)^\top$ with respect to the Frobenius product. For $n\times n$ matrices, this has dimension $n^2-1$ (except if $A=B$).