Transformation law for matrices

Consider linear map $\alpha: \C^m \to \C^n$ with associated $n\times m$ matrix $A$.

To transform to a matrix that takes the input in the new basis and output a vector in the new basis, if $P$ is the change-of-basis matrix of $\C^m$ and $Q$ is that of $\C^n$, use $$ A' = Q\inv A P. $$ (Derivation)

For $\alpha: \C^n\to\C^n$, we usually transform to the same basis in domain and codomain, so $$ A' = P\inv AP. $$