Real logarithms of special orthogonal matrices In continuation to the following question: 
Let $P\in\text{SO}(2)$ and let $X$ be a real matrix such that $P = e^X$. Is $X$ necessarily skew-symmetric? No. The above-mentioned thread gives counter examples. However, are there counter examples in which $P$ is neither $I_2$ nor $-I_2$? 
More generally, in higher dimension, what can be said about special orthogonal matrices that have non-skew-symmetric real logarithms? 
 A: A matrix $A \in \operatorname{SO}(n)$ (or $U(n)$) will have a real logarithm with is not skew-symmetric (or skew-Hermitian) if and only if $A$ has a complex eigenvalue of multiplicity greater than one. The basic idea is that if $e^X = A$ then by conjugating with $P$ we get $e^{P^{-1}XP} = P^{-1}e^XP = P^{-1}AP$. Hence, if we start with a skew-symmetric logarithm of $A$ and conjugate it by any $P$ which commutes with $A$ we'll get another (sometimes different) logarithm. If $A$ has a repeated eigenvalue the space of matrices which commute with $A$ will be large enough so that if we start with a skew-symmetric root, we'll be able to conjugate it by a (necessarily non-orthogonal/unitary) matrix $P$ which commutes with $A$ to a non-skew-symmetric logarithm. I'll do the complex case first because it is technically easier and I want to use part of the argument for the real case.

Let me start with a few general observations:


*

*We can explicitly compute the exponential of a $k \times k$ Jordan block $X = \lambda I + N$ (where $N$ has $k - 1$ ones above the diagonal and zero elsewhere) as $$e^{\lambda I + N} = e^{\lambda I}e^{N} = \sum_{i=0}^{k-1} \frac{e^{\lambda}}{i!} N^i. $$
Since $e^{\lambda} \neq 0$, this matrix has rank $k - 1$ and so it is similar to $e^{\lambda} I + N$. This shows that the list of block sizes in the Jordan form of $X$ and $e^X$ is the same and in particular, $e^X$ is diagonalizable if and only if $X$ is diagonalizable.

*If $P \in \operatorname{O}(n)$ is orthogonal, then a matrix $X \in M_n(\mathbb{R})$ is skew-symmetric/symmetric/normal if and only if the matrix $P^TXP$ is skew-symmetric/symmetric/normal. Similarly if $P \in \operatorname{U}(n)$ is unitary then a matrix $X \in M_n(\mathbb{C})$ is Hermitian/skew-Hermitian/normal iff $U^{*}XU$ is Hermitian/skew-Hermitian/normal. 



Proof of the complex case:
First note that if $A,U$ are unitary then all the logarithms of $A$ are skew-Hermitian iff all the logarithms of $U^{*}AU$ are skew-Hermitian. In one direction, if all the logarithms of $A$ are skew-Hermitian and $e^X = U^{*}AU$ then $A = Ue^{X}U^{*} = e^{UXU^{*}}$ so $UXU^{*}$ is skew-Hermitian which by $(2)$ implies that $X$ is skew-Hermitian. The other direction is identical. 
Since any unitary matrix is unitarily diagonalizable, it is enough to investigate the diagonal matrices. So assume $A = \operatorname{diag}(z_1,\dots,z_n) \in \operatorname{U}(n)$ is diagonal and $e^X = A$. By $(1)$, the matrix $X$ is diagonalizable and since $z_i \in S^1$ the eigenvalues of $X$ lie in $i\mathbb{R}$ so $X$ is similar to a diagonal skew-Hermitian matrix $\hat{X}$ with $e^{\hat{X}} = A$. Set $X = P^{-1} \hat{X} P$. Then
$$ A = e^{X} = e^{P^{-1} \hat{X} P} = P^{-1} e^{\hat{X}} P = P^{-1} AP. $$
Hence, we see that any logarithm of $A$ is obtained from a skew-Hermitian (diagonal) logarithm of $A$ by conjugation with an arbitrary matrix $P$ which leaves $A$ invariant. Now we have two cases:


*

*If all the eigenvalues of $A$ are distinct then any matrix which satisfies $PA = AP$ must be diagonal but then $P$ also commutes with $\hat{X}$ and $X = P^{-1} \hat{X} P = \hat{X}$ is skew-Hermitian.

*If $A$ has a repeated eigenvalue, transform $A$ unitarily to make the first two diagonal entities identical. They form a $2 \times 2$ complex matrix
$$ A' = \begin{pmatrix} e^{i\theta} & 0 \\ 0 & e^{i \theta} \end{pmatrix}. $$
for which we can take the skew-Hermitian logarithm
$$ X = \begin{pmatrix} 0 & i\theta \\ -i(\theta + 2\pi) & 0 \end{pmatrix}. $$
The matrix $A'$ is diagonal so any complex matrix commutes with it. However, $X$ is diagonal with two distinct eigenvalues so it commutes only with diagonal matrices. It is clear that by conjugating $X$ with an appropriate $P$, we can transform $X$ to an upper-triangular matrix with a non-zero $(1,2)$ entry and such a matrix will give us a non-skew-Hermitian logarithm. 
Finally, using this $2 \times 2$ non-skew-Hermitian logarithm we can build non-skew-Hermitian logarithms for the $n \times n$ case by summing it with any $(n - 2) \times (n - 2)$ skew-Hermitian diagonal logarithm.

Proof of the real case:
Just like in the complex case, we can assume that $A \in O_n(\mathbb{R})$ is a block diagonal matrix with $l$ blocks $A_{\theta_1}, \dots, A_{\theta_l}$ of the form
$$ A_{\theta} = \begin{pmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{pmatrix} $$
and possibly an additional $1 \times 1$ block containing $1$ if $n = 2l + 1$ is odd. Let $X \in M_n(\mathbb{R})$ with $e^X = A$. The matrix $A$ is diagonalizable over $\mathbb{C}$ with eigenvalues $e^{\pm i \theta_1}, \dots, e^{\pm i \theta_l}$ (and maybe $1$) in $S^1$ so $X$ is similar over $\mathbb{C}$ to a diagonal matrix whose eigenvalues are in $i\mathbb{R}$. Since $X$ is real, the non-real complex eigenvalues must come in conjugate pairs and so $X$ must be similar over $\mathbb{R}$ to a block diagonal skew-symmetric matrix $\hat{X}$ containing $l$ blocks $\hat{X}_{\theta_i + 2 \pi k_i}$ of the form
$$ \hat{X}_{\varphi} := \begin{pmatrix} 0 & \varphi \\ -\varphi & 0 \end{pmatrix} $$
and maybe an additional $1 \times 1$ block containing $2\pi k_{l+1}$ for $k_1, \dots, k_{l+1} \in \mathbb{Z}$. Note that $e^{\hat{X}} = A$. As before, set $X = P^{-1} \hat{X} P$ and then $A = e^X = e^{P^{-1} \hat{X} P} = P^{-1} AP$. Now we have three options:


*

*The matrix $A$ has distinct complex eigenvalues. This means that each $2 \times 2$ block of $A$ corresponds to an invariant subspace of $A$ of the form $\ker(A - I e^{i\theta})(A - Ie^{-i\theta})$. If $P$ commutes with $A$, it must send each such subspace to itself which implies that $P$ is block diagonal with the same structure as $A$. Each $2 \times 2$ block $P_i$ of $P$ must commute with the appropriate $A_{\theta_i}$ block of $A$ so we only need to understand which $2 \times 2$ matrices commute with $A_{\theta_j}$. 
The matrix $A_{\theta_j}$ is special orthogonal and so it commutes with all the $2 \times 2$ normal matrices of the form
$$ \begin{pmatrix} x & -y \\ y & x \end{pmatrix} $$
($A_{\theta_j}$ has this form and the subspace of such matrices is isomorphic as an algebra to $\mathbb{C}$). Finally, over $\mathbb{C}$, by assumption $A_{\theta_j}$ has two distinct eigenvalues so it commutes only with diagonal matrices. However, the dimension of the space of commuting matrices is the dimension of the solution space of a system of linear equations $AP = PA$ with coefficients in $\mathbb{R}$. Hence, we know that the dimension calculated over $\mathbb{R}$ and $\mathbb{C}$ will be the same so $A_{\theta_j}$ commute only with the normal matrices. 
However, $\hat{X}$ is also block diagonal with the same structure and each block is skew-symmetric (and in particular also has the form above with $x = 0$) so $P$ commutes with $\hat{X}$ and $\hat{X} = X$.

*The matrix $A$ has a repeated real eigenvalue (which must be $\pm 1$). Again, it is enough to consider the $2 \times 2$ case $A = \pm I_2$ and use it as a block to construct more general counterexamples. In this case, the dimension of the space of matrices that commute with $A$ is four while if $\hat{X} \neq 0$ (which we can always arrange by adding multiples of $2\pi$) then the dimension of the space of matrices that commute with $\hat{X}$ (a non-zero skew-symmetric matrix) is two as before. In fact, if $P^{-1} \hat{X} P$ is skew symmetric then $P$ must be a scalar multiple of an orthogonal matrix. Any choice of a non-scalar multiple of an orthogonal matrix $P$ will give us a non-skew-symmetric logarithm of $A$.

*The matrix $A$ has a repeated complex eigenvalue. Again, in this case it is enough to consider the $4 \times 4$ case
$$ A = \begin{pmatrix} \cos \theta & -\sin \theta & 0 & 0 \\ \sin \theta & \cos \theta & 0 & 0 \\ 0 & 0 & \cos \theta & -\sin \theta \\ 0 & 0 & \sin \theta & \cos \theta \end{pmatrix} = \begin{pmatrix} A_{\theta} & 0 \\ 0 & A_{\theta} \end{pmatrix}. $$
In this case, one can directly check that the space of matrices which commute with $A$ is eight dimensional and has the form
$$ P = \begin{pmatrix} P_1 & P_2 \\ P_3 & P_4 \end{pmatrix} $$
where each $P_i$ is a normal $2 \times 2$ matrix. Let us choose a skew-Hermitian root $\hat{X}$ which has the form
$$ \hat{X} = \begin{pmatrix} X_{\theta} & 0 \\ 0 & X_{\theta + 2\pi} \end{pmatrix} = \begin{pmatrix} X_1 & 0 \\ 0 & X_2 \end{pmatrix} $$
(each block gets a different skew-symmetric root $X_i$). By identifying a $4 \times 4$ real matrix consisting of four blocks of real normal matrices with a $2 \times 2$ complex matrix 
$$ A \mapsto \begin{pmatrix} e^{i\theta} & 0 \\ 0 & e^{i\theta} \end{pmatrix}, \hat{X} \mapsto \begin{pmatrix} i\theta & 0 \\ 0 & i(\theta + 2\pi) \end{pmatrix} $$
we see that the transpose operation is mapped to the conjugated-tranpose operation, skew-symmetric $4 \times 4$ matrices are mapped to $2 \times 2$ skew-Hermitian matrices and our orthogonal matrix is mapped to a unitary matrix. Hence, we reduced the problem to the $2 \times 2$ complex case which we already analyzed. Alternatively, we can explicitly provide a $P$ which commutes with $A$ but such that $P^{-1}\hat{X}P$ is not skew-symmetric. Take
$$ P = \begin{pmatrix} 0 & I_2 \\ I_2 & I_2 \end{pmatrix} $$
and then
$$ P^{-1} = \begin{pmatrix} -I_2 & I_2 \\ I_2 & 0 \end{pmatrix} $$
and
$$ P^{-1}\hat{X}P = \begin{pmatrix} X_2 & X_2 - X_1 \\ 0 & X_1 \end{pmatrix}, \\
\begin{pmatrix} X_2 & X_2 - X_1 \\ 0 & X_1 \end{pmatrix}^T = \begin{pmatrix} -X_2 & 0 \\ X_1 - X_2 & -X_1 \end{pmatrix} \neq \begin{pmatrix} -X_2 & X_1 - X_2 \\ 0 & -X_1 \end{pmatrix}.  $$
