2

$$\DeclareMathOperator{\tr}{\operatorname{tr}} \tr(\log A) = \log \det A$$

because of its well-known identity. Importantly, it is easier for a computer to find the log determinant than to compute the matrix logarithm.

I want to rewrite $\tr(B \log A)$ in the same way. We apply the power rule the same way as for scalars to get $\tr(\log A^B)$. Then, we use the well-known identity to get $\log \det A^B$.

I need help completing this solution. In its current state, I still need to compute the matrix logarithm to evaluate it.

2 Answers2

3

If you could compute $\DeclareMathOperator{\tr}{\operatorname{tr}}\tr(B \log A)$ easily for $n \times n$ matrices, you could use it to compute $\log A$. Namely, if $E_{ij}$ is the $n \times n$ matrix with $1$ in position $(i,j)$ and $0$ elsewhere, and $M = (m_{ij})$ is any $n \times n$ matrix, $\tr(E_{ij} M) = m_{ji}$.

Robert Israel
  • 448,999
0

Starting from their singular value decompositions, we discover that:

\begin{align}\DeclareMathOperator{\tr}{\operatorname{tr}} \tr(A \log B) &= \tr(U_A \Sigma_A V^\top_A \log(U_B \Sigma_B V^\top_B)) \\ &= \tr(U_A \Sigma_A V^\top_A(\log U_B + \log \Sigma_B + \log V^\top_B)) \\ &= \tr(U_A \Sigma_A V^\top_A \log U_B + U_A \Sigma_A V^\top_A \log \Sigma_B + U_A \Sigma_A V^\top_A\log V^\top_B) \\ &= \tr(U_A \Sigma_A V^\top_A \log U_B) + \tr(U_A \Sigma_A V^\top_A \log \Sigma_B) + \tr(U_A \Sigma_A V^\top_A\log V^\top_B) \\ &= 0 + \tr(\Sigma_A \log \Sigma_B) + 0 \\ &= \tr(\Sigma_A \log \Sigma_B) \end{align}

Since $\Sigma$ is diagonal, its matrix logarithm is equivalent to its element-wise logarithm. Additionally, calculating their singular values is far cheaper especially when the matrices are symmetrical.