Trace of permutation matrix

matricespermutation-matrices

If we have the symmetric group $S_k$ I know we can represent this as a permutation matrix and that this representation is a group homomorphism defined by say $f$. Where $f$ sends the symmetric group to an $n \times n$ matrix.

I was wondering how to show that the trace of $f$ was equal to the number of $x={1,… k}$ such that $h(x)=x$, where $h$ is our permutation?

So I can see for example that $(1,4,2,5,3)$ there are no elements on the diagonal so the trace is zero as no elements sends itself to itself. However I was wondering if there was a better way to show this more generally?

Best Answer

If $\sigma \in S_n$, the corresponding permutation matrix is $$ P_\sigma = \begin{pmatrix} e_{\sigma(1)}\\ \vdots\\ e_{\sigma(n)} \end{pmatrix} $$ where the $e_k$'s are standard basis row vectors: $e_k (j) = \delta_{k,j} = \begin{cases} 1 \ k = j \\ 0 \ k \neq j \end{cases}$. So $$ \text{tr}(P_\sigma) = \sum_{i = 1}^nP_\sigma(i, i) = \sum_{i = 1}^n e_{\sigma(i)}(i) = \sum_{i = 1}^n \delta(\sigma(i), i) = \sum_{i = 1 : \sigma(i) \neq i}^n 0 + \sum_{i = 1 : \sigma(i) = i}^n 1 $$ which is just $\#\{1 \leq i \in \mathbb N \leq n : \sigma(i) = i\}$.

Related Question