Orthogonal Decomposition [Ciarlet 1.2-2] Let $O$ be an orthogonal matrix. Show that there exists an orthogonal matrix $Q$ such that
$$Q^{-1}OQ\ =\ \left(\begin{array}{rrrrrrrrrrr}
1 &        &   &    &        &    &               &              &        &   & \\
  & \ddots &   &    &        &    &               &              &        &   & \\
  &        & 1 &    &        &    &               &              &        &   & \\
  &        &   & -1 &        &    &               &              &        &   & \\
  &        &   &    & \ddots &    &               &              &        &   & \\
  &        &   &    &        & -1 &               &              &        &   & \\
  &        &   &    &        &    &  \cos\theta_1 & \sin\theta_1 &        &   & \\
  &        &   &    &        &    & -\sin\theta_1 & \cos\theta_1 &        &   & \\
  &        &   &    &        &    &               &              & \ddots &   & \\
  &        &   &    &        &    &               &              &        &  \cos\theta_r & \sin\theta_r\\
  &        &   &    &        &    &               &              &        & -\sin\theta_r & \cos\theta_r
\end{array}\right).$$
 A: The proof can be fairly simple if you know the the following facts:


*

*For every eigenvalue of a normal matrix, its algebraic multiplicity and its geometric multiplicity agree.

*Eigenvectors corresponding to different eigenvalues of a normal matrix $A$ are orthogonal to each other. (That's why normal matrices are called normal.)


Now consider a real orthogonal matrix $A$ (I refrain from calling it $O$ in order to avoid confusion with the zero matrix). Its eigenvalues must take one of the following three forms: $1,-1$ and $e^{\pm i\theta}$ with $\theta\in(0,\pi)$. By fact 1 in the above, if the eigenvalue $\lambda=1$ has algebraic multiplicity $p$, its complex eigenspace must have dimension $p$ too. Yet its real and complex eigenspaces must have the same dimension (because both dimensions are the nullity of $A-\lambda I$). Hence the eigenvalue $1$ has $p$ real and orthonormal eigenvectors. The similar can be said for the eigenvalue $-1$.
Now consider a conjugate pair of nonreal eigenvalues $e^{\pm i\theta}$. By fact 1, if the eigenvalue $e^{i\theta}$ has algebraic multiplicity $m$, then it has a set of $m$ mutually orthogonal eigenvectors $u_1+iv_1,\,\ldots,\,u_m+iv_m$ where the $u_j$s and $v_j$s are real vectors. Let $j\neq k,\,x=u_j+iv_j,\,y=u_j-iv_j$ and $z=u_k+iv_k$. Then $x\perp z$ by definition. Also, note that $y$ is an eigenvector of $e^{-i\theta}$. By fact 2, we have $x\perp y$ and $y\perp z$. Therefore
$$
\begin{cases}
0 = \langle u_j+iv_j, u_j-iv_j\rangle = \|u_j\|^2 - \|v_j\|^2 + 2i\langle u_j,v_j\rangle,\\
0 = \langle u_j+iv_j, u_k+iv_k\rangle = \langle u_j,u_k\rangle + \langle v_j,v_k\rangle + i\langle v_j,u_k\rangle - i\langle u_j,v_k\rangle,\\
0 = \langle u_j-iv_j, u_k+iv_k\rangle = \langle u_j,u_k\rangle - \langle v_j,v_k\rangle - i\langle v_j,u_k\rangle - i\langle u_j,v_k\rangle.
\end{cases}
$$
It follows that $u_1,\,v_1,\,\ldots,\,u_m,\,v_m$ are mutually orthogonal and $\|u_j\|=\|v_j\|$. Also, as $A(u_j+iv_j)=e^{i\theta}(u+iv_j)$, we get $Au_j = \cos(\theta)u_j-\sin(\theta)v_j$ and $Av_j = \sin(\theta)u_j+\cos(\theta)v_j$. Therefore, if every $u_j$ and $v_j$ are normalized to unit length, and we set the columns of $Q$ as the eigenvectors of $1$, the eigenvectors of $-1$, the $u_1,\,v_1,\,\ldots,\,u_m,\,v_m$ for $e^{i\theta_1}$, the eigenvectors for $e^{i\theta_2}$ and so on, then we will obtain the desired decomposition.
A: The key thing is to diagonalise $O$ carefully as a unitary matrix over the complex numbers, and then translate everything into real terms. So:


*

*Compute the characteristic polynomial $p(x)$, and find the complex eigenvalues of $O$. Since $O$ is unitary, the eigenvalues of $O$ as a unitary (complex) matrix will all lie on the unit circle, and since $O$ is real, the characteristic polynomial is a real polynomial, and hence all the eigenvalues will either be real or come in conjugate pairs. Thus, 
$$p(x) = (x-1)^{m_+} (x+1)^{m_-} \prod_{k=1}^r (x-e^{i\theta_k})^{m_k}(x-e^{-i\theta_k})^{m_k}\\ = (x-1)^{m_+}(x+1)^{m_-}\prod_{k=1}^r (x^2 - 2\cos(\theta_k)x+1)^{m_k}$$
for $\theta_k \in \mathbb{R}$ and for $m_+$, $m_-$, and $m_k \in \mathbb{N} \cup \{0\}$ the multiplicities.

*Since $O-I$ and $O+I$ are real matrices, you can find an orthonormal basis $\{u_1^+,\dotsc,u_{m_+}^+\}$ for the $+1$ eigenspace and $\{u_1^-,\dotsc,u_{m_-}^-\}$ for the $-1$ eigenspace of $O$ as a real matrix; of course, these will do double duty as orthonormal bases for the $+1$ and $-1$ eigenspaces of $O$ as a complex matrix.

*For each $1\leq k \leq r$, find an orthonormal basis $\{v^k_1,\dotsc,v^k_{m_k}\}$ for the $e^{i\theta_k}$ eigenspace of $O$ as a complex matrix; then $\left\{\overline{v^k_1},\dotsc,\overline{v^k_{m_k}}\right\}$ will be an orthonormal basis for the $e^{-i\theta_k}$ eigenspace of $O$ as a complex matrix.

*For each $1 \leq k \leq r$ and $1 \leq j \leq m_k$ define 
$$u^k_{j,+} = \tfrac{1}{\sqrt{2}}\left(v^k_j + \overline{v^k_j}\right), \quad u^k_{j,-} = \tfrac{1}{i\sqrt{2}}\left(v^k_j - \overline{v^k_j}\right);$$
then $\{u^k_{1,+},u^k_{1,-},\dotsc,u^k_{m_k,+},u^k_{m_k,-}\}$ will be an orthonormal basis for the kernel of $O^2 - 2\cos(\theta_k)O + I$ as a real matrix.

*Finally, observe that 
$$\beta = \{u_1^+,\dotsc,u_{m_+}^+\} \sqcup \{u_1^-,\dotsc,u_{m_-}^-\} \sqcup \bigsqcup_{k=1}^r \{u^k_{1,+},u^k_{1,-},\dotsc,u^k_{m_k,+},u^k_{m_k,-}\}$$
is an orthonormal basis of $\mathbb{R}^n$ with respect to which $O$ takes the desired form, i.e., you can take $Q$ to be the matrix whose columns are the elements of $\beta$ in precisely that order.



EDIT: The tl;dr version of steps 2-5
By the spectral theorem for finite-dimensional complex inner product spaces, applied to the unitary matrix $O$, we obtain the orthogonal decomposition
$$
 \mathbb{C}^n = \ker(O-I) \oplus \ker(O+I) \oplus \bigoplus_{k=1}^r \ker(O-e^{i\theta_k}I) \oplus \ker(O - e^{-i\theta_k}I),
$$
However, for each $k$, $(O-e^{i\theta_k}I)(O-e^{-i\theta_k}I) = O^2 + 2\cos(\theta_k)O+I$, so that since $e^{i\theta_k}$ and $e^{-i\theta_k}$ are distinct eigenvalues,
$$
 \ker(O-e^{i\theta_k}I) \oplus \ker(O - e^{-i\theta_k}I) = \ker(O^2 + 2\cos(\theta_k)O+I),
$$
where $O^2 + 2\cos(\theta_k)O+I$ is a perfectly respectable real matrix. Thus, you can check that you obtain an orthogonal decomposition
$$
 \mathbb{R}^n = \ker(O-I) \oplus \ker(O+I) \oplus \bigoplus_{k=1}^r\ker(O^2 + 2\cos(\theta_k)O+I)
$$
in terms of the kernels in $\mathbb{R}^n$ of the real matrices $O-I$, $O+I$, and $O^2 + 2\cos(\theta_k)O+I$. Then, find an orthonormal basis for each of those kernels, take their union in the order given by the above orthogonal decomposition of $\mathbb{R}^n$, and you get the columns of your matrix $Q$.
