TITLE: $AB=BA$ implies $AB^T=B^TA$ when $A$ is normal
QUESTION [24 upvotes]: I am looking for an elementary proof (if such exists) of the following:
$$
AB=BA \quad\Longrightarrow\quad AB^T=B^TA,
$$
where $A$ and $B$ are $n\times n$ real matrices, and $A$ is a normal matrix, i.e., $AA^T=A^TA$  - it is true for complex matrices as well, with $A^T$ replaced by $A^*$.
There is a non-elementary proof of this using the exponential of a matrix and properties of entire functions.
Update. In the first version of the question, both $A$ and $B$ were supposed to be normal, but as Shlomi correctly pointed out, this is true even in the case when only one of them is normal.

REPLY [3 votes]: It suffices to prove the complex case.
Since $A$ is normal, $Ax=\lambda x$ if and only if $A^\ast x=\overline{\lambda}x$.
Now, let $(\lambda,v)$ be an eigenpair of $A$. Then $ABv=BAv=B(\lambda v)=\lambda Bv$. By applying our previous argument to the cases $x=Bv$ and $x=v$ separately, we get $A^\ast Bv=\overline{\lambda}Bv$ and $A^\ast v=\overline{\lambda}v$. Combining the two, we obtain $A^\ast Bv=\overline{\lambda}Bv=B(\overline{\lambda}v)=BA^\ast v$.
Thus $A^\ast B$ and $BA^\ast$ agree at every eigenvector $v$ of $A$. Since $A$ is normal, it has a full eigenbasis. Therefore $A^\ast B=BA^\ast$ or equivalently, $AB^\ast=B^\ast A$.

Remark. Note that the "normality" of $A$ in terms of existence of an orthonormal eigenbasis is essential to the validity of the problem statement. On a vector space where no inner product is defined, the algebraic relations $AA^T=A^TA$ and $AB=BA$ do not lead to the conclusion $AB^T=B^TA$. E.g. over $GF(2)$, if one defines
$$
A=\pmatrix{1&1&1\\ 0&0&1\\ 0&0&1}\ \text{ and }\, B=\pmatrix{0&0&0\\ 0&0&1\\ 0&0&1},
$$
one may verify that $AA^T=A^TA$ (= the all-one matrix) and $AB=BA\,(=B)$, but
$$
AB^T=\pmatrix{0&1&1\\ 0&1&1\\ 0&1&1}\ne0=B^TA.
$$