Random Unitary Matrices So as I understand it, if you choose a random parameter and fill the entries of a matrix with that parameter, you get a random matrix.  I was wondering if there are some general conditions under which a matrix can be both unitary and random such that the unitarity condition is now being satisfied.
I am aware that there are already examples of random unitary matrices which can be chosen from the Haar measure, so perhaps this question is related to the concept of the Haar measure?
 A: I understand your question as asking for a constructive method to sample uniformly from the unitary group $U(N)$ or orthogonal group $O(N)$, where "uniformly" is understood in the sense of the Haar measure. A simple method starts from an $N\times N$ matrix filled with independent Gaussian random variables [complex for $U(N)$ and real for $O(N)$]. Then orthonormalize the columns via Gram-Schmidt and you're done.
For a more efficient approach, see How to generate random matrices from the classical compact groups by Francesco Mezzadri.
The construction is implemented in Mathematica in the routines circular unitary ensemble for $U(N)$ and circular real ensemble for $O(N)$.
Caution: the socalled circular orthogonal ensemble does not sample from $O(N)$ but from the coset $U(N)/O(N)$.
A: The notion of random unitary matrix usually refers to the Haar measure on the group of unitary matrices; see
https://case.edu/artsci/math/esmeckes/Meckes_SAMSI_Lecture2.pdf
http://emis.ams.org/journals/EJP-ECP/article/download/2551/2345.pdf
] G. W. Anderson, A. Guionnet, and O. Zeitouni, An introduction to random matrices, Cambridge Studies in Advanced Mathematics, vol. 118, Cambridge University Press, Cambridge,
2010. MR-2760897
