Trace of log of matrix 
How to prove that $$\operatorname{Tr}(\log B) = \sum_i \log b_i \tag{1}$$ where the $b_i$ are the eigenvalues of matrix $B$?

Question background:

*

*This question arises from quantum field theory in particle physics. Where $B$ is $i\not\partial - m$ in continuous Hilbert space(this space of four dimensional spacetime). And $\not\partial=\partial_{\mu}\gamma^{\mu}$, $\gamma^{\mu}$ is four dimensional Dirac Gamma matrix, there also a four dimensional identity matrix with $m$. You can specify this as each point in Hilbert space, there is a four dimensional matrix， or each element of B is a four dimensional matrix in Hilbert space;


*About logarithm of matrix definition, I use Peskin and Schroeder’s QFT book, they define the logarithm of matrix as Taylor series expansion.
Below is my navie attempt (sorry for my insufficient math knowledge), suppose $B$ can be diagonalized as:
$$B = U^{-1}\Lambda U \tag{2}$$
where $U$ is some unitary matrix and $\Lambda$ is diagonal matrix. Then
$$\operatorname{Tr} (\log B) = \operatorname{Tr} (\log (U^{-1}\Lambda U)) \tag{3}$$
I expect that
$$ \operatorname{Tr} (\log (U^{-1}\Lambda U)) = \operatorname{Tr} (\log (\Lambda)) \tag{4}$$
But how to proceed from ($3$)?
 A: Let's say you have a complex function $f$ defined by a power series centred at some point $z_0 \in \Bbb{C}$, converging on some open disc $D$ centred at $z_0$. That is,
$$f(z) = \sum_{n=0}^\infty a_n (z - z_0)^n$$
for all $z \in D$, for some sequence of coefficients $(a_n)$. We can then extend this definition to certain $m \times m$ matrices, by defining:
$$f(B) = \sum_{n=0}^\infty a_n (B - z_0I)^n.$$
Now, there is a matter of convergence here. The above will not necessarily converge for all matrices; it depends on the original series, or more precisely, its region of convergence. But, let's brush over that, and suppose that $f$ is not only well-defined at $B$, it is also continuous (the latter is not an unreasonable assumption).
Then, if $U$ is an invertible $m \times m$ matrix, we have:
\begin{align*}
U^{-1} f(B) U &= U^{-1} \left(\sum_{n=0}^\infty a_n (B - z_0I)^n\right) U \\
&= U^{-1} \left(\lim_{N \to \infty} \left(\sum_{n=0}^N a_n (B - z_0I)^n\right) \right) U \\
&= \lim_{N \to \infty} \left(U^{-1}\left(\sum_{n=0}^N a_n (B - z_0I)^n\right) U\right) &\text{since $A \mapsto U^{-1} A U$ is continuous} \\
&= \lim_{N \to \infty} \left(\sum_{n=0}^N a_n U^{-1}(B - z_0I)^n U\right) &\text{since $A \mapsto U^{-1} A U$ is linear} \\
&= \lim_{N \to \infty} \left(\sum_{n=0}^N a_n \left(U^{-1}(B - z_0I)U \right)^n \right) &\text{since $(U^{-1} A U)^n = U^{-1} A^n U$, by induction} \\
&= \lim_{N \to \infty} \left(\sum_{n=0}^N a_n \left(U^{-1}BU - z_0I \right)^n \right) & \text{linearity again, and $U^{-1} I U = I$}\\
&= \sum_{n=0}^\infty a_n \left(U^{-1}BU - z_0I \right)^n = f(U^{-1} B U)
\end{align*}
This will work when $f$ is any Taylor series for the natural logarithm. All that is assumed is that $f(B)$ exists. If we assume $U$ diagonalises $B$, and take the trace of both sides, we get $(D)$, as required.
A: The formula you seek to demonstrate is nothing but the formula for the determinant of the matrix exponential inversed.
Let $A$ be a $n\cdot n$ matrix, then
$$\det(\exp A) = \exp(\operatorname{Tr} A)$$
If we define $B = \exp(A)$, we obtain,
$$\ln(\det B) = \operatorname{Tr}(\ln B)$$
Since the determinant is independent of the base in which it is computed, we can compute it in a diagonal basis of eigenvalues $b_i$ (assuming $A$ is diagonalizable and its eigenvalues have no multiplicities), and then $\det B = \prod_{i= 1}^{n} b_i$, and therefore we obtain your formula.
