# Matrix Logarithms

Let $I$ be identity matrix, $T$ be anti-identity matrix (anti-diagonals are $1$s) and $S$ be the diagonal matrix with same entries as $I$ except when the rows are even. If $i$ is even, then $S(i,i)=-1$. For all other $i,j$ we have $S(i,j)=I(i,j)$.

For both even and odd sized matrices, how do you calculate the Logarithms of these matrices? What are the Logarithms?

-
Do you care whether you're working over the complexes or the reals? Matrix logarithms aren't generally unique-and sometimes a matrix may have a complex logarithm, or infinitely many, but no real one. – Kevin Carlson Aug 5 '12 at 0:19
What you call a "anti-identity matrix" is more conventionally known as an exchange matrix. – J. M. Aug 5 '12 at 3:35

The $n \times n$ anti-diagonal matrix $T$ satisfies $T^2 = I$, so its eigenvalues are $-1$ and $1$.
Eigenvectors for $-1$ are of the form $e_i - e_{n+1-i}$, $i = 1 \ldots \lfloor n/2\rfloor$, while eigenvectors for $1$ are $e_i + e_{n+1-i}$, $i=1 \ldots \lfloor n/2 \rfloor$ and (if $n$ is odd) $e_{(n+1)/2}$, where $e_i$ are the standard unit vectors.
If $\lfloor n/2 \rfloor$ is even, you can get a real matrix logarithm using the fact that $\exp \pmatrix{0 &\pi\cr-\pi & 0\cr} = -I$. Thus for $n=4$, a logarithm of $T$ is $L$ where \eqalign {L (e_1 - e_4) &= \pi (e_2 - e_3)\cr L (e_2 - e_3) &= -\pi (e_1 - e_4)\cr L (e_1 + e_4) &= 0\cr L (e_2 + e_3) &= 0\cr} And thus $$L = \pmatrix{ 0 & -\pi & 0 & 0\cr \pi & 0 & 0 & 0\cr -\pi & 0 & 0 & 0\cr 0 & \pi & 0 & 0\cr} \pmatrix{1 & 0 & 1 & 0 \cr 0 & 1 & 0 & 1\cr 0 & -1 & 0 & 1 \cr -1 & 0 & 1 & 0\cr}^{-1} =\pmatrix{0 & -\pi/2 & \pi/2 & 0\cr \pi/2 & 0 & 0 & -\pi/2\cr -\pi/2 & 0 & 0 & \pi/2\cr 0 & \pi/2 & -\pi/2 & 0 \cr}$$
Your first and third cases don't take much doing. As you can see directly by the power series expansion, $\exp(0)=I+0+\frac{0^2}{2}+...=I$. You can see that exponentials of diagonal matrices are simply the exponentials of diagonal entries, so that we can find a logarithm of any exponential matrix, for instance your $S$, by taking logs of each diagonal entry. You'll notice in particular that $S$ only has a logarithm over the complexes. This will generally be true when we have negative eigenvalues in a real matrix.
As to the anti-identity matrix, things get a bit more complicated. These are all symmetric, and so they're unitarily diagonalizable over the complexes. Then you may write $T'=V^{-1}TV$ for $V$ unitary, and $\log(T)=V^{-1}\log(T')V$, where we've already seen how to get a logarithm of a diagonal matrix. Yet I'm not sure you'll find an expression for this in arbitrary dimension, if that's what you're after.