Let $\mathbf{M}$ be a matrix in $V = M_n(\mathbb{R})$ and $T:V \rightarrow V$ be a linear operator so that $T(\mathbf{X}) = \mathbf{MX}$, $\forall \, \mathbf{X} \in V$. Considering the following inner product in $V$:
$\langle \mathbf{A},\mathbf{B} \rangle = \mathrm{tr}(\mathbf{AB}^T)$
how can I prove that, if $T$ is an isometry, then $\mathbf{M}$ is an orthogonal matrix?
$T$ is an isometry means for all matrices $\mathbf{A}, \mathbf{B}\in V$:
\begin{align} \langle T(\mathbf{A}), T(\mathbf{B}) \rangle = \langle \mathbf{A}, \mathbf{B} \rangle \end{align}
But, by cyclicity of trace: \begin{align} \langle T(\mathbf{A}), T(\mathbf{B}) \rangle =\mathrm{tr}(\mathbf{M}\mathbf{AB}^T \mathbf{M}^T) = \mathrm{tr}(\mathbf{M}^T\mathbf{MAB}^T) \end{align}
So we require:
\begin{align} \mathrm{tr}((\mathbf{M}^T\mathbf{M})\mathbf{AB}^T) = \mathrm{tr}(\mathbf{AB}^T) \end{align}
This requires that $\mathbf{M}^T\mathbf{M} = \mathbf{I}_n$, ie $\mathbf{M}$ is orthogonal.
Edit: As additional explanation for the last implication, subtracting the RHS of the equation gives, by linearity of trace: $\mathrm{tr}((\mathbf{M}^T\mathbf{M} - \mathbf{I}_n)\mathbf{AB}^T) = 0$. Now assume for contradiction $(\mathbf{M}^T\mathbf{M} - \mathbf{I}_n) \neq \mathbf{0}$. Then it has a non-zero eigenvalue, $\lambda$, with normalized eigenvector $\mathbf{v}$. Then I can let $\mathbf{AB}^T = \mathbf{vv}^T$ (ie, be the projector onto this eigenspace), giving $\mathrm{tr}((\mathbf{M}^T\mathbf{M} - \mathbf{I}_n)\mathbf{AB}^T) = \mathrm{tr}(\lambda \mathbf{vv}^T) = \mathrm{tr}(\lambda \mathbf{v}^T\mathbf{v}) = \lambda |\mathbf{v}|^2 =\lambda \neq 0$.