For real valued matrices, is the trace of the outer product of a matrix always equal to the trace of the inner product of a matrix?
In other words, given matrices $A$ and $B$, is $\operatorname{trace}(A^TB) = \operatorname{trace}(AB^T)$?
This question was asked in a comment here and I couldn’t find further resources.
Technically this is related somewhat to the trace of the outer product of two vectors being equal to the dot product, in quantum computing. What I’d like to know is if some variation holds for matrices of an arbitrary size, not just $1 \times m$ or $n \times 1$.