[Math] Generating Random Orthogonal Matrices

linear algebraprobability

If I generate a random matrix A with every element sampled from a uniform [0, 1) distribution, and then use the Gram Schmidt procedure to get an orthogonal matrix Q.

Will this generate every orthogonal matrix with elements within some interval on the real line? and will it do so with equal probability for each matrix?

If not, how could I generate a random orthogonal matrix, preferably using python? Thank you.

Best Answer

If you sample elements from a uniform distribtution over $[-1,1]$ and apply the Gram Schmidt procedure, you can generate every possible orthogonal matrix (note that orthogonal matrices necessarily have elements within $[-1,1]$). However, I don't believe that it will generate all matrices with equal probability.

See this paper for further discussion, and a method that produces a uniformly random unitary matrix.

Related Question