Logarithm of a matrix with zero diagonal elements. I want to calculate the natural logarithm of this matrix$$A=\begin{bmatrix}0&0&0&0\\0&\frac{1}{2}&\frac{i}{2}&0\\0&-\frac{i}{2}&\frac{1}{2}&0\\0&0&0&0\end{bmatrix}$$
After calculating the eigenvalues and eigenvectors I find: $\lambda_1=1,\lambda_2=0,\lambda_3=0,\lambda_4=0$. These values are the diagonal elements in  D of $A=M D M^{-1}$. Here $M$ is the modal matrix and $D$ the diagonal matrix looking like:$$D=diag(\lambda_1,\lambda_2,\lambda_3,\lambda_4)$$
Now taking the natural logarithm of the matrix would require me to take the natural logarithm of the elements of $D$. So what is my result? I should just say that three of the elements are undefined or that the logarithm of this matrix doesn't exists/diverges? Is there some pre requirement for A that I did not take into account?
 A: The same way $\log(0)$ doesn't exist means you can't find $x$ such that $e^x=0$, the matrix exponential also refuses to output singular matrices.
So finding a zero eigenvalue means $e^B=A$ has no solution.
A: There is no answer in real or complex matrices.
However you can get answer depending on what extension of complex numbers you allow.
On the projective complex numbers the answer is
$$\left(
\begin{array}{cccc}
 \infty  & 0 & 0 & 0 \\
 0 &\infty  &  \infty  & 0 \\
 0 &  \infty  & \infty  & 0 \\
 0 & 0 & 0 & \infty  \\
\end{array}
\right)$$
On oriented projective complex numbers the answer is
$$\left(
\begin{array}{cccc}
 -\infty  & 0 & 0 & 0 \\
 0 & -\infty  & i \infty  & 0 \\
 0 & -i \infty  & -\infty  & 0 \\
 0 & 0 & 0 & -\infty  \\
\end{array}
\right)$$
In terms of divergent integrals, the answer is
$$\left(
\begin{array}{cccc}
 -\int_0^1 \frac{dx}x  & 0 & 0 & 0 \\
 0 & -\int_0^1 \frac{dx}x  & i \int_0^1 \frac{dx}x & 0 \\
 0 & -i \int_0^1 \frac{dx}x  & -\int_0^1 \frac{dx}x  & 0 \\
 0 & 0 & 0 & -\int_0^1 \frac{dx}x  \\
\end{array}
\right)$$
