Proof (similar matrices have equal trace)

$$ \begin{align*} \op{tr}(PAP\inv) = \op{tr}(P\inv PA) = \op{tr}(A). \end{align*} $$