The trace , written tr(A) of an nxn matrix A is the sum of
thediagonal elements. It can be shown that, if A and B are
nxnmatrices then tr(AB) = tr(BA).
Prove that if A is similar to B then tr(A) = tr(B).