Numerical diagonalization of a random hermitian matrix $H=U\Lambda U^{-1}$: enforce uniqueness and uniformity of $U$ I've stumbled across this seemingly simple question, but I could not find a satisfactory answer. Suppose I have a complex hermitian random matrix $H$. It can be diagonalized by a unitary transformation, $H=U\Lambda U^{-1}$, however this decomposition is non-unique: $U_1\Lambda U_1^{-1}$ and $U_2\Lambda U_2^{-1}$ are equally legitimate if $U_1^{-1}U_2=\mathrm{diag}(e^{i\phi_1},\cdots,e^{i\phi_N})$, with $\phi_i$ arbitrary phases. To make the correspondence $H\to (\Lambda,U)$ one-to-one I have to restrict the unitary matrices to the coset space $U(N)/U(1)\otimes \cdots \otimes U(1)$. My question is: how can I enforce this restriction numerically? I mean, if I feed my matrix $H$ into any software performing numerical eigendecomposition, the algorithm will spit out one of the (infinitely many) diagonalizing matrices $U$ [chosen according to some arbitrary convention]. Therefore, the statistical properties of such $U$'s seem to be heavily dependent on the convention the software chooses, and devoided of any intrinsic meaning. But how can I 'tell' the software that the convention it chooses must be such that the corresponding matrix $U$ is uniformly (Haar) distributed in the unitary group (property that is seemingly implied by the restriction to the coset space, see e.g. http://arxiv.org/pdf/math-ph/0412017v2.pdf pag. 4-5)? Many thanks for your help.
 A: A very partial answer. 


*

*You must only consider the generic hermitian matrices so that the eigenvalues are distinct.

*According to your reference, it seems that the Haar measure can be decomposed in a product of one term relative to $\Lambda$ and one term relative to $U$. You speak about random matrices (when the $(H_{ij})_{i\leq j}$ are iid and follow the standard normal distribution ?) and you want that the corresponding matrix $U$ is uniformly (Haar) distributed in the unitary group; I am not sure that it is the case; the key constraint is the invariance by multiplication by unitary matrices. Anyway, it is eventually possible only if you fix $\Lambda$. Have you tried to choose a representative of $U$ that has a real diagonal? (it is easy to do).

*About the distribution of the eigenvalues of $A$, you can see (in the real case) the well-known Wigner's result in 
http://mathworld.wolfram.com/WignersSemicircleLaw.html
About the phases of the eigenvalues of a random unitary matrix, see http://www.ams.org/journals/bull/2003-40-02/S0273-0979-03-00975-3/
where curious results are proved.
