Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I would like to create a random matrix with the constraint that the matrix must be normal, i.e. the matrix and its Hermitian conjugate must commute. I would create a random matrix "without constraints" as

    RandomReal[NormalDistribution[0,s],{n,n}]+ 
    I*RandomReal[NormalDistribution[0,s],{n,n}]

But I have no idea how I can implement the constraint, that the matrix must be normal.

share|improve this question
2  
Your problem is under-specified, because complex n x n matrix has 2 n^2 degrees of freedom. Hermiticity provides n^2 constraints, but you still have n^2 independent real numbers. These can be distributed however you like, and you will get very different behavior of matrix ensembles depending on their distributions. In Random Matrix Theory, for example, gaussian ensembles are frequently studied, where matrix entries are independent normally distributed (complex) numbers, subject to some symmetry constraints (Hermiticity for example) - and this is a well-specified problem. –  Leonid Shifrin Sep 25 '12 at 13:20
    
I don't know if I understand your point. Do you want me to say something like: Let P(M)dM=k*exp[-Tr[w[M]]]dM be a probability measure, where dM is the measure on the space of normal matrices induced by the Euclidean metric on all complex matrices, w is a potential function, and k is a factor of normalization. How do I generate a random matrix from this ensemble? –  Ipsen Sep 25 '12 at 14:06
    
Yes, my point was only that in your formulation, there is not enough information. If you specify the probability (as you did, for example), and then w[M] as well, then your problem is well-specified. How to generate such a matrix (if it is subject to non-trivial symmetry constraints) is another matter. Random Matrix Theory is a general field which studies such random matrix ensembles. In particular, some of its most powerful results are universality statements, which state that eigenvalue statistics may be independent of the exact form of potential w, but depend on the symmetries only. –  Leonid Shifrin Sep 25 '12 at 14:21
    
In my book, I gave an example of how one can construct a random Wishart matrix, which has a more complex symmetry than e.g. Hermitian. Your constraint seems more involved. You may want to look at research literature on random normal matrices for the algorithms of their generation. But, to re-iterate, first you should define your probability measure. Then, if your potential w is not simple, I would look at whether or not any universality holds, because it may seriously simplify it. –  Leonid Shifrin Sep 25 '12 at 14:28
1  
@LeonidShifrin I don't know if it was available in v6, when you wrote the book, but as of v8, you can load the MultivariateStatistics package and use WishartDistribution. For example, RandomVariate[ WishartDistribution [ IdentityMatrix@10, 20 ], 1] –  rm -rf Sep 25 '12 at 16:10

1 Answer 1

up vote 7 down vote accepted

Why not start with an eigendecomposition?

n = (* desired dimension *);
(* random unitary matrix *)
q = Orthogonalize[RandomVariate[NormalDistribution[], {n, n}] +
                  I RandomVariate[NormalDistribution[], {n, n}]]
(* random normal matrix *)
mat = q.DiagonalMatrix[RandomVariate[NormalDistribution[], n] +
                       I RandomVariate[NormalDistribution[], n]].ConjugateTranspose[q]

You can check the normality of mat with mat.ConjugateTranspose[mat] - ConjugateTranspose[mat].mat // Chop; it should return an array of 0s.

I'm not entirely sure of what distribution a matrix generated in this manner follows, though.

share|improve this answer
    
Yes, it was something like that I had in mind. The main problem with this approach is that one is not looking random matrix (meaning that entries are chosen according to some distribution), but rather at random distributed eigenvalues. –  Ipsen Sep 25 '12 at 13:03
    
I don't understand your objection. I did concede that I don't know the distribution being followed by the matrix generated in this manner, but I'm not sure about your entries are chosen according to some distribution; certainly, the entries of a matrix generated in this way will follow a distribution of some sort. –  J. M. Sep 25 '12 at 13:15
    
You're of course right; the entries do follow some distribution(s). Please disregard my last comment. I found your answer very informative, and think I can use it solve original problem. –  Ipsen Sep 25 '12 at 13:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.