unitary matrix decomposition using orthogonal matrices Is it possible to decompose an n by n unitary matrix U, such that $U=O_1DO_2 $ with D being diagonal(obviously just has complex phase factors) and $O_1,O_2$ being real orthogonal matrices.

Hint: Let $M$ a complex  $n\times n$ matrix. Is it always possible to decompose it as 
$$M = O_1 D O_2$$
? Dimension considerations say no. Indeed, the space of complex matrices has $2n^2$ degrees of freedom, while on the RHS we get $\binom{n}{2} + 2n + \binom{n}{2} = n^2 + n$. There must be some extra conditions required for $n>1$. 
Note that from $M= O_1 D O_2$ we get
$$\bar M = O_1 \bar D O_2$$
So we see that $M$ and $\bar M$ (or, if you want, $\mathcal{Re}M$ and $\mathcal{Im}M$) have "real singular value decomposition with the same $O_1$, $O_2$. When is this possible. If we go through the proof of the singular value decomposition theorem we notice that the matrices $M^t M$ are used.  So we get
$$M = O_1 D O_2\\
M^t = O_2^t D O_1^{t}\\
M^t M = O_2^t D^2 O_2$$
while
$$\bar M = O_1 \bar D O_2\\
\bar M^t = O_2^t \bar D O_1^{t}\\
\bar M^t \bar M = O_2^t \bar D^2 O_2$$
The last lines are the key
$$M^t M = O_2^{-1} D^2 O_2\\
\bar M^t \bar M = O_2^{-1} \bar D^2 O_2$$
The matrices $M^t M$ and $\bar M^t \bar M$ can be conjugated by the same orthogonal map to diagonal matrices. This implies that these matrices commute
$$M^t M \bar M^t \bar M= \bar M^t \bar M M^t M$$
It is not very hard (using the simultaneous reduction of commuting symmetric matrices to diagonal form by the same orthogonal) that this condition is also sufficient.
Now we ask: does this hold for every unitary matrix? I will leave this for you to check.
