[Math] How to compute the trace of an exponential and diagonal matrix

linear algebramatrices

I would like to understand how to compute the trace of an exponential and diagonal matrix. For instance, what is:
$$
\mathrm{Tr}\left[ \exp \begin{pmatrix} 5 & 0 \\ 0 & 8 \end{pmatrix} \right] = \; ?
$$
I've tried to Google it, but couldn't find anything that answers this question.

Best Answer

In general for complex $m \times m$ matrices, if $f$ is defined by a power series $\sum a_nz^n$, the disk of convergence of which contains all eigenvalues $\lambda_1,...,\lambda_m$ of $A$, then

$$\mathrm{Tr}(f(A)) = \sum_{j =1}^mf(\lambda_i)$$

Where $f(A)$ is defined as $\sum a_nA^n$. This fact is fairly clear for diagonalizable matrices, and can be seen in general either by density or by Jordan canonical form.