Q:

Does $P^{-1} A P = P P^{-1} A$?

I hung up on the following step in a derivation I'm following and could use some guidance as to why it's true. I'm trying to show that the trace of a matrix is invariant under any similarity transformation, and I'm not sure why this step is legal. 
\begin{align}
    \text{Tr} (\mathbf{B}) = \text{Tr} (\mathbf{P}^{-1}\mathbf{AP}) =\text{Tr} (\mathbf{PP}^{-1}\mathbf{A})
\end{align}
From there, it's simply the identity matrix and therefore the matrix $\mathbf A$ is invariant under similarity transformations. But, matricies are not commutative. So, I'm not sure  the right hand side is true. 

A:

It is true because, for any two $n\times n$ matrices $A$ and $B$, $\operatorname{tr}(AB)=\operatorname{tr}(BA)$.

A:

With Einstein's notation, we have that
$$\text{Tr}(AB)=A_{ij}B_{ji}=B_{ji}A_{ij}=\text{Tr}(BA)$$
And for 3 matrices:
$$\text{Tr}(ABC)=A_{ij}B_{jk}C_{ki}=C_{ki}A_{ij}B_{jk}=\text{Tr}(CAB)$$

