Is $\langle A,B\rangle =\operatorname{trace}(AB^T)$ an inner product in $\mathbb R^{n\times m}$? I don't understand why one should take transpose of $\operatorname{tr}(AB^T)$ and why we use the fact that $\operatorname{tr}(M)=\operatorname{tr}(M^T)$ for any $M$ that is a square matrix to solve the problem.  

If you grind through the details, you will see that
$\operatorname{tr} (A B^T) = \sum_{i,j} [A]_{ij} [B_{ij}]$, hence
this is the 'standard' inner product if you view the matrices
$A,B$ as giant columns.
