When are matrix logarithms diagonal? Is this true: "$P$ is diagonal if and only if there exists a diagonal $\log P$"? This is the matrix logarithm. I just want to make sure of my reasoning.
If $\log P$ is diagonal, then $P$ is diagonal because
\begin{align*}
P &= \exp(\log P) \\
&= I + \log P + \frac{1}{2}(\log P)^2 + \cdots.
\end{align*}
On the other hand if $P$ is diagonal, then $\log P$ is diagonal because
$$
\log P = 
\left[
\begin{array}{ccc}
\log P_{11} & 0 & 0\\
0 & \ddots & 0\\
0 & 0 & \log P_{nn}
\end{array}
\right].
$$
On the second one, is the logarithm unique? What happens if I change $P$ to orthogonal? What about invertible?

If $\log P$ is diagonal, clearly $P$ must also be diagonal, because $P=\exp(\log P)$ is a power series in $\log P$.
But then each diagonal entry of $P$ is the exponential of its counterpart $\log P$. Therefore, $P$ has a diagonal matrix logarithm if and only if $P$ is a diagonal matrix with an entrywise nonzero diagonal.
