I want to prove that if $A$ and $B$ are similar matrices, then
$trace(A) = trace(B).$

By the definition of trace, I can see that there exists an invertible
matrix $Q$ such that $A = Q^{-1}BQ.$ Thus, for this particular matrix $Q$,
$$trace(A) = trace(Q^{-1}BQ).$$

However, I am having difficulty figuring out how to make
$trace(Q^{-1}BQ) = trace(B).$ Are there particular properties of the trace
that I need to consider to make this work?