= Solution
Put $H=A-B$. This is a nonzero <Hermitian matrix>. By the <finite-dimensional spectral theorem>, it has a unit eigenvector $v$ with a nonzero real eigenvalue $lambda$. Define the rank-one <orthogonal projection matrix>
$$
P=vv^\dagger.
$$
The cyclic property of the <matrix trace> gives
$$
\operatorname{Tr}(PA)-\operatorname{Tr}(PB)
=\operatorname{Tr}(PH)
=\operatorname{Tr}(vv^\dagger H)
=v^\dagger Hv
=\lambda\ne0.
$$
\b[Hence this $P$ distinguishes $A$ and $B$ through the required traces.]
Back to article page