({{, (RefLink[CircularOrthogonalMatrixDistribution, paclet:ref/CircularOrthogonalMatrixDistribution])[n] 
represents a circular orthogonal matrix distribution with matrix dimensions {n,n}.}})

OpenersNotesSection(Spacer1)Details

(RefLink[CircularOrthogonalMatrixDistribution, paclet:ref/CircularOrthogonalMatrixDistribution]) is also known as circular orthogonal ensemble, or COE.

(RefLink[CircularOrthogonalMatrixDistribution, paclet:ref/CircularOrthogonalMatrixDistribution]) represents a uniform distribution over the symmetric unitary square matrices of dimension n, also known as the Haar measure restricted on the symmetric subset of unitary group U(n).

The dimension parameter n can be any positive integer.

(RefLink[CircularOrthogonalMatrixDistribution, paclet:ref/CircularOrthogonalMatrixDistribution]) can be used with such functions as (RefLink[MatrixPropertyDistribution, paclet:ref/MatrixPropertyDistribution]) and (RefLink[RandomVariate, paclet:ref/RandomVariate]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (11)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Generate a pseudorandom COE matrix:

m=RandomVariate[CircularOrthogonalMatrixDistribution[3]]

It is both unitary and symmetric:

UnitaryMatrixQ[m]∧SymmetricMatrixQ[m]

Sample a random point on a sphere using (RefLink[MatrixPropertyDistribution, paclet:ref/MatrixPropertyDistribution]):

mat2vec[m_]:=Re[Table[Tr[m.PauliMatrix[k]],{k,3}]]/2

dist=MatrixPropertyDistribution[mat2vec[u.PauliMatrix[3].(u^\[ConjugateTranspose])],u\[Distributed]CircularOrthogonalMatrixDistribution[2]];

RandomVariate[dist]∈Sphere[]

The distribution is visibly clustered around the z axes:

Point[RandomVariate[dist,1500]]//Graphics3D

OpenersExampleSection1(Spacer1)Scope  (3)

Generate a single pseudorandom matrix:

RandomVariate[CircularOrthogonalMatrixDistribution[2]]

Generate a set of pseudorandom matrices:

RandomVariate[CircularOrthogonalMatrixDistribution[2],2]

Compute statistical properties numerically:

gap𝒟=MatrixPropertyDistribution[Max[Differences[Sort[Arg[Eigenvalues[𝓂]]]]],𝓂\[Distributed]CircularOrthogonalMatrixDistribution[10]];

NExpectation[δ Sin[δ],δ\[Distributed]gap𝒟]

OpenersExampleSection3(Spacer1)Applications  (2)

Define distribution of complex arguments of random matrix eigenvalues:

evs𝒟=MatrixPropertyDistribution[Arg[Eigenvalues[x]],x\[Distributed]CircularOrthogonalMatrixDistribution[2]];

Sample the phases of eigenvalues followed by random permutations:

φs=RandomSample/@RandomVariate[evs𝒟,10^5];

Visualize joint phase distribution together with the closed-form (RefLink[PDF, paclet:ref/PDF]):

Show[
Histogram3D[φs,{-Pi,Pi,0.2},PDF],
Plot3D[(1/(16Pi))Abs[Exp[I ϕ1]-Exp[I ϕ2]],{ϕ1,-Pi,Pi},{ϕ2,-Pi,Pi},PlotStyle->None,MeshStyle->Thick],ViewPoint->{10, 10, 3}]

The joint distribution of the eigenvalues for (RefLink[CircularOrthogonalMatrixDistribution, paclet:ref/CircularOrthogonalMatrixDistribution]) is also Boltzmann distribution of Dyson's Coulomb gas on a circle with inverse temperature β==1. The average Hamiltonian per particle of the system is (without kinetic terms):

hamiltonian[Z_]:=Module[{n=Length[Z]},
Log[n]/2-Sum[Total[Log[Abs[Differences[Z,1,k]]]],{k,n-1}]/n
]

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

h𝒟=MatrixPropertyDistribution[hamiltonian[Eigenvalues[x]],x\[Distributed]CircularOrthogonalMatrixDistribution[n]];

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

means=Table[{n,Mean[RandomVariate[h𝒟,1000]]},{n,10,60,10}]

Plot the sample means and compare them with thermodynamic limit:

Show[ListPlot[means,PlotStyle->{Red,PointSize[Medium]},Filling->Axis,PlotRange->{0,0.37},AxesLabel->{"N","⟨H⟩"}],Plot[(1/2) (Log[2]+PolyGamma[0,(3/2)]),{x,0,60}]]

OpenersExampleSection4(Spacer1)Properties & Relations  (2)

Distribution of phase angle of the eigenvalues:

dim=300;
args=RandomVariate[MatrixPropertyDistribution[Arg[Eigenvalues[x]],x\[Distributed]CircularOrthogonalMatrixDistribution[dim]],100];

Histogram[Join@@args,{-Pi,Pi,2Pi/40},PDF]

Compute the spacing between eigenvalues:

diffs=Join@@Map[Composition[Differences,Sort],(args/(2Pi))dim];

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

WignerSurmisePDF[x_,β:1]:=(Pi/2) x Exp[(-Pi/4) x^2]

Show[Histogram[diffs,{0.1},PDF],Plot[WignerSurmisePDF[x,1],{x,0,3}]]

For eigenvectors of (RefLink[CircularOrthogonalMatrixDistribution, paclet:ref/CircularOrthogonalMatrixDistribution]) with dimension n large, the scaled modulus of the elements is (χ^2) distributed:

𝒟=MatrixPropertyDistribution[Flatten[Abs[Eigenvectors[𝓂]]^2],𝓂\[Distributed]CircularOrthogonalMatrixDistribution[50]];

data=Normalize[Join@@RandomVariate[𝒟,100],Mean];

Compare the histogram with (RefLink[PDF, paclet:ref/PDF]) of (RefLink[ChiSquareDistribution, paclet:ref/ChiSquareDistribution]):

Show[Histogram[data,"Scott",PDF],Plot[PDF[ChiSquareDistribution[1],x],{x,0,5},PlotRange->{{0,5},{0,3}}]]

OpenersExampleSection5(Spacer1)Possible Issues  (2)

A matrix from (RefLink[CircularOrthogonalMatrixDistribution, paclet:ref/CircularOrthogonalMatrixDistribution]) need not be orthogonal:

RandomVariate[CircularOrthogonalMatrixDistribution[3]]

OrthogonalMatrixQ[%]

Use (RefLink[CircularRealMatrixDistribution, paclet:ref/CircularRealMatrixDistribution]) to sample a random orthogonal real-valued matrix:

RandomVariate[CircularRealMatrixDistribution[3]]

OrthogonalMatrixQ[%]

Matrix from (RefLink[CircularOrthogonalMatrixDistribution, paclet:ref/CircularOrthogonalMatrixDistribution]) can be represented as matrix (Transpose[u]).u, where matrix u follows (RefLink[CircularUnitaryMatrixDistribution, paclet:ref/CircularUnitaryMatrixDistribution]):

u=RandomVariate[CircularUnitaryMatrixDistribution[2]];

o=Transpose[u].u;

UnitaryMatrixQ[o]∧SymmetricMatrixQ[o]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[CircularUnitaryMatrixDistribution, paclet:ref/CircularUnitaryMatrixDistribution])  ▪  (RefLink[CircularSymplecticMatrixDistribution, paclet:ref/CircularSymplecticMatrixDistribution])  ▪  (RefLink[CircularRealMatrixDistribution, paclet:ref/CircularRealMatrixDistribution])  ▪  (RefLink[CircularQuaternionMatrixDistribution, paclet:ref/CircularQuaternionMatrixDistribution])  ▪  (RefLink[MatrixPropertyDistribution, paclet:ref/MatrixPropertyDistribution])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Matrix Distributions, paclet:guide/MatrixDistributions])}})}})