# Random complex orthogonal matrices

How can I uniformly extract a random complex orthogonal matrix $\Omega\in O(3,\mathbb{C})$? It is easily found in the literature the uniform measure for unitary and real matrices, but I couldn't find anything about the complex case. Thanks for your help!

• You might also find it worthwhile to pose this question on stats.stackexchange.com – Simon S Oct 9 '15 at 19:37
• Have you considered applying gram-schmidt to a uniformly random collection of three vectors on the 5-sphere? – John Hughes Oct 9 '15 at 19:38
• Just off the top of my head, could you start with an arbitrary 3x3 orthogonal real matrix and apply a random set of rotations and phase factors? – Paul Oct 9 '15 at 19:40
• I don't fully understand the procedure suggested by @JohnHughes: why should I pick random points on the 5-sphere? Is there an isomorphism I'm missing? Thanks for further explanation! – mrf1g12 Oct 10 '15 at 13:31

A complex orthogonal $3 \times 3$ matrix has three unit vectors as its columns. Say one of them is \begin{align} \begin{bmatrix} a_1 + i b_1\\ a_2 + i b_2\\ a_3 + i b_3 \end{bmatrix} \end{align} To say they're unit vectors means that $a_1^2 + a_2^2 + a_3^2 + b_1^2 + b_2^2 + b_3^2 = 1$. So the vector \begin{align} \begin{bmatrix} a_1\\ a_2\\ a_3\\ b_1\\ b_2\\ b_3 \end{bmatrix} \end{align} is a unit vector in $\mathbb R^6$, i.e., a point of $S^5$.

To pick the first column $u_1$ of your matrix, you can just choose uniformly on $S^5$, and then convert from there to $C^3$. Clear?

For your second vector, you can pick any other vector on $S^5$. You can imagine $S^5$ as being like $S^2$, where there's the north-south axis, and then the equatorial circle. Polar coords measure "how far along the NS axis you are" (typically $z = \sin \phi$, at least in math books), with the non-phi part of the polar coords telling you where you are on equatorial circle. Perhaps expressed better: take a point uniformly on the sphere and project along the $z$ axis to a point of hte unit disk, after which you can project "out" to the equator, unless you started at the north or south pole. The resulting distribution on the equatorial circle will be uniform.

Similarly, in $S^5$, we can pick a point uniformly on the sphere, ignore the last coordinate to get a point in the 5-ball, and (unless the original point was the N or S pole), project radially to get a point in $S^4$, uniformly distributed.

There's nothing special about the N/S axis here. We could instead do this using the line in direction $u_1$, and project to the sphere perpendicular to that line. How? Pick $v$ uniformly on $S^5 \subset C^3$. Let $$w_2 = v - (u_1 \cdot v) u_1\\ u_2 = w_2 / \| w_2 \|.$$ Here the "\cdot" means "the dot product in $C^3$", so that we end up with $u_2 \cdot w_2 = 0$ in $C^3$.

Now $u_2$ is a vector orthogonal to $u_1$, and uniformly distributed among all such vectors (I believe). If when you compute $w_2$, you get the zero vector (a probability zero event!), pick another $v$ and try again.

Finally, pick yet another $v$ uniformly on $S^5$ and then compute $$w_3 = v - (u_1 \cdot v) u_1 - (u_2 \cdot v) u_2 \\ u_3 = w_3 / \| w_3 \|.$$ The matrix with columns $u_1, u_2, u_3$ will now be uniformly distributed on $O(3, C)$, I believe.

• But this way the vectors $u_{1,2,3}$ are chosen orthonormal in $\mathbb{R}^6$, for instance, following your notation $$u_1\cdot u_2=\sum_i a^1_ia^2_i+\sum_i b^1_ib^2_i=0.$$ However in the orthogonal matrix $\Omega\in O(3,\mathbb{C})$ I would have $$\Omega_{1j}^T\Omega_{j2}=\sum_j (a^1_j+ib^1_j)(a^2_j+ib^2_j)=0,$$ which is a different condition.... – mrf1g12 Oct 10 '15 at 14:17
• No...when I wrote the dot product, I meant "the dot product in $C^3$, precisely so that $w_2$ will end up with dot-product 0 with $u_1$, for instance. I've edited the answer to clarify this. – John Hughes Oct 10 '15 at 17:56
• You start with a point $v$ on $S^5$. You compute $w_2$ using the $C^3$ dot product; that gets you a shorter vector. You normalize it to get $u_2$, which therefore again lies on $S^5$. Do you want me to write the matlab code for you? – John Hughes Oct 10 '15 at 18:57
• Still, I'm missing the connection with $S^5$, because if I use the product in $\mathbb{C}^3$ I don't have the condition that defines $S^5$ (on the left hand side) $$\sum_j (a_j+ib_j)^2\neq\sum_j(a_j^2+b_j^2)$$ – mrf1g12 Oct 10 '15 at 18:59
• Oh, lord. By O(3, 6) you don't mean the set of transformations preserving distances in $C^3$; you mean the thing preserving $z_1^2 + z_2^2 + z_3^2$. In that case, there's probably some modification of what I described that'll do the trick...but I don't know what it is, and I have no geometric intuition for this at all. Sigh. I withdraw my answer. – John Hughes Oct 10 '15 at 19:01

I tried using the parameterisation of $SO(3)$, $$R=R_{12}(\phi)R_{13}(\theta)R_{23}(\psi),$$ where $R$ are rotation matrices, which gives the Haar measure $$d\!\sin(\theta)\, d\phi\, d\psi.$$ In the complex case I tried complexifying the parameterisation, assuming $\phi$, $\theta$ and $\psi$ are complex angles. However, even if I extract complex $\phi$, $\psi$ and $\sin(\theta)$, I get different probability distributions for the different entries of the resulting complex orthogonal matrix. For this reason I think this is not yet the way to extract uniformly on $O(3,\mathbb{C})$.