# Trace of an endormorphism.

Let $n \in \mathbb{N}^*$ and $A \in \mathcal{M}_n(K)$ (the set of $n \times n$ matrices).

Find the trace of the endomorphism : \begin{array}{lrcl} f : & \mathcal{M}_n(K) & \longrightarrow & \mathcal{M}_n(K) \\ & M & \longmapsto & AM \end{array}

Ok, let's pick the basis $\{E_{ij}\}_{i=1...n,j=1...n}$ of $M_n(\mathbb{K}),$ with $$E_{ij}(k,l)=\left\{ \begin{array}{ll} \ 1 \ \text{if} \ i=k,j=l\\ \ 0 \ \text{otherwise} \end{array} \right.$$ (the standard basis of this space). Computing the product, you can see that $$A*E_{ij}= \begin{pmatrix} 0 &\cdots & a_{1,i} & \cdots & 0 \\ \vdots && \vdots && \vdots \\ 0 & \cdots & a_{n,i} & \cdots & 0 \end{pmatrix}$$ where the non-empty column is the $j$-th one, and $a_{i,j}=A(i,j).$ Now, you can decompose $A*E_{ij}$ in our basis: you obtain $$A*E_{ij}=\sum_{l=1}^n a_{l,i}E_{lj},$$ in particular, $E_{ij}$ has a factor $m_{i,i}$ in the decomposition. Summing for all $i=1 \dots n, \ j=1\dots n$, you obtain that the trace is equal to $n*\sum_{i=1}^{n} a_{i,i}=n*tr(A).$
• I understand all what you have written before "in particular", but after I don't understand : what is the factor "$m_{i,i}$ your talking about? Thank you very much for your help :) ! Commented Mar 22, 2017 at 17:05
• I had the impression not to be clear in that point :D. It's not easy to explain. Think about that from this point of view: when you have a vector space $V$, a basis $B=\{e_1,...,e_n\}$ and a function $f: V \to V$, the trace is the sum of diagonal of the matrix of $f$ read in that basis, which means that for every vector $e_i$ you have to see what is the factor of $e_i$ in the (unique) decomposition of $f(e_i)$ in the basis $B$, and this is one of the entries of the diagonal of the matrix; then you have to sum that all. Do you recognize this in what I did? Commented Mar 22, 2017 at 21:25