Take the 2-minute tour ×  I'm trying to prove that de normalizer
$N(T)$ of the subgroup $T\subset GL_n$ of diagonal matrices is
the subgroup $P\in GL_n$ of generalized permutation matrices. I
guess my biggest problem is that I don't really know how
diagonal and permutation matrices (don't) commute. Because it is
not true that $DM=MD$ when $D\in T$ and $M\in P$ since the
permutation is either horizontal or vertical, but sometimes it
seems like you can do something like it.  So far, I have proved
that $P\subset N(T)$, in the following way. Let $M_\sigma\in P$.
Then $M_\sigma=VS_\sigma$, with $V\in T$ and $S_\sigma$ a
permutation matrix. So $M_\sigma DM^{-1}=VS_\sigma D S_\sigma^T
V^{-1}$. Thus if we prove that $S_\sigma D S_\sigma^T$ is
diagonal we are done. This is true since $S_\sigma D
S_\sigma^T=(x_1 e_{\sigma(1)} \dots x_n e_{\sigma(n)})
(e_{\sigma^{-1}(1)} \dots
e_{\sigma^{-1}(n)})=(x_{\sigma^{-1}(1)}e_1 \dots
x_{\sigma^{-1}(n)}e_n)$, where $e_i$ are the standard basis
vectors. Even this is hopelessly wri