represents a circular unitary matrix distribution with matrix dimensions {n,n}.


  • CircularUnitaryMatrixDistribution is also known as circular unitary ensemble, or CUE.
  • CircularUnitaryMatrixDistribution represents a uniform distribution over the unitary square matrices of dimension n, also known as the Haar measure on the unitary group .
  • The dimension parameter n can be any positive integer.
  • CircularUnitaryMatrixDistribution can be used with such functions as MatrixPropertyDistribution and RandomVariate.

Background & Context


open allclose all

Basic Examples  (2)

Generate a random CUE matrix:

Verify that the matrix is unitary:

Represent the eigenvalues of a random matrix by MatrixPropertyDistribution and sample from it:

Scope  (3)

Generate a random unitary matrix:

Generate a set of random unitary matrices:

Compute statistical properties numerically:

Applications  (4)

Define distribution of complex arguments of random matrix eigenvalues:

Sample the phases of eigenvalues followed by random permutations:

Visualize joint phase distribution together with the closed form PDF:

The number of permutations of elements in which the longest increasing subsequence is at most of length can computed by averaging over TemplateBox[{{Tr, [, {U, _, n}, ]}}, Abs]^(2 k), where are drawn from CircularUnitaryMatrixDistribution[n]:

Compare with direct count:

The joint distribution of the eigenvalues for CircularUnitaryMatrixDistribution is also Boltzmann distribution of Dyson's Coulomb gas on a circle with inverse temperature . The average Hamiltonian per particle of the system is (without kinetic terms):

Define the distribution of the value of the Hamiltonian on random CUE matrix:

Compute the sample mean of the Hamiltonian for systems of different size:

Plot the sample means and compare them with thermodynamic limit:

Construct Brownian motion on CUE by using matrices from GaussianUnitaryMatrixDistribution as infinitesimal generators:

Generate a Brownian path with initial matrix sampled from CircularUnitaryMatrixDistribution:

Compute the phase of the eigenvalues and compare them with the PDF of the eigenvalues of matrices from CircularUnitaryMatrixDistribution:

Properties & Relations  (2)

Distribution of phase angle of the eigenvalues:

Compute the spacing between eigenvalues:

Compare the histogram of sample level spacings with the closed form, also known as Wigner surmise for Dyson index 2:

For eigenvectors of CircularUnitaryMatrixDistribution with dimension large, the scaled modulus of the elements is distributed:

Compare the histogram with PDF of ChiSquareDistribution:

Wolfram Research (2015), CircularUnitaryMatrixDistribution, Wolfram Language function,


Wolfram Research (2015), CircularUnitaryMatrixDistribution, Wolfram Language function,


Wolfram Language. 2015. "CircularUnitaryMatrixDistribution." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2015). CircularUnitaryMatrixDistribution. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2024_circularunitarymatrixdistribution, author="Wolfram Research", title="{CircularUnitaryMatrixDistribution}", year="2015", howpublished="\url{}", note=[Accessed: 30-May-2024 ]}


@online{reference.wolfram_2024_circularunitarymatrixdistribution, organization={Wolfram Research}, title={CircularUnitaryMatrixDistribution}, year={2015}, url={}, note=[Accessed: 30-May-2024 ]}