import numpy as np
import sys
sys.path.append('../')
import RandomMatrix as RM
np.random.seed(140)
The first class of Random Matrix that we will study are Gaussian Orthogonal Ensembles.
Definition: A matrix $G$ is called a Gaussian Orthogonal Ensemble (GOE) if there exists a random matrix $A$ with iid entires such that
$$A_{ij} \sim N(0,1)$$such that
$$G = \frac{A + A^T}{2} $$If $G$ is a GOE, $G_{ij} \sim N(0, \frac{1}{2})$ for $i \neq j$ and $G_{ii} \sim N(0,1)$.
Proof:
Since $G_{ij}$ is the linear combination of two independent normal random variables, it is also normally distributed. If $i \neq j$, then
$$\mathbb{E}[G_{ij}] = \mathbb{E}[\frac{A_{ij} + A^T_{ij}}{2}] = \frac{\mathbb{E}[A_{ij}] + \mathbb{E}[A_{ji}]}{2} = 0$$$$Var(G_{ij}) = Var(\frac{A_{ij} + A^T_{ij}}{2}) = \frac{Var(A_{ij}) + Var(A_{ji})}{4} = \frac{1}{2} $$
So $G_{ij} \sim N(0, \frac{1}{2})$ for $i \neq j$.
For the diagonal terms,
$$G_{ii} = \frac{A_{ii} + A^T_{ii}}{2} = A_{ii}$$Thus $G$ has standard normals along its diagonals.
We can generate GOEs using RandomMatrix's function Generate_GOE
RM.Generate_GOE(2)
The second class of Random Matrix that we will study are Gaussian Unitary Ensembles. They are very similar to GOEs, except they operate over the field of complex numbers $\mathbb{C}$. In this chapter, since we are dealing with complex numbers, we index into a matrix using $n$ and $m$ instead of $i$ and $j$ to avoid confusion.
Definition: A matrix $G$ is called a Gaussian Unitary Ensemble (GUE) if there exists a random matrix $A$ with iid entires such that
$$A_{nm} = X_{nm} + i Y_{nm}$$where $X_{nm} \sim N(0, 1)$ and $Y_{nm} \sim N(0, 1)$ so that
$$G = \frac{A + A^*}{2} $$Where * signifies the Hermitian adjoint.
If $G$ is a GUE, then $G_{nm} \sim N(0,1_{\mathbb{C}})$ (complex standard normal random variable) for off diagonal terms ($n \neq m$) and $G_{nn} \sim N(0,1)$ for the diagonal terms.
Proof:
Note that
$$ \begin{align} \begin{aligned} G_{n,m} &= \frac{A_{nm} + A^*_{nm}}{2} \\ &= \frac{X_{nm} + i Y_{nm} + X_{mn} - iY_{mn}}{2} \\ &= \frac{X_{nm} + X_{mn} + i(Y_{nm} - Y_{mn})}{2} \end{aligned} \end{align} $$Lets start with the easy case, the diagonals
$$G_{nn} = \frac{X_{nn} + X_{nn} + i(Y_{nn} - Y_{nn})}{2} = X_{nn} \sim N(0, 1)$$For the off diagonal case, $G_{nm}$ ($n \neq m$) is a complex normal random variable since it is the linear comination of independent complex normal random variables.
$$ \begin{align} \begin{aligned} \mathbb{E}[G_{nm}] &= \mathbb{E}[\frac{X_{nm} + X_{mn} + i(Y_{nm} - Y_{mn})}{2}] \\ &= \frac{\mathbb{E}[X_{nm}] + \mathbb{E}[X_{mn}] + i(\mathbb{E}[Y_{nm}] - \mathbb{E}[Y_{mn}])}{2} \\ &= 0 \end{aligned} \end{align} $$Since the expectation is 0, the variance is simply,
$$ \begin{align} \begin{aligned} Var(G_{nm}) &= \mathbb{E}[|\frac{X_{nm} + X_{mn} + i(Y_{nm} - Y_{mn})}{2}|^2] \\ &= \frac{1}{4} \mathbb{E}[(X_{nm} + X_{mn})^2 + (Y_{nm}-Y_{mn})^2] \end{aligned} \end{align} $$Note $X_{nm} + X_{mn} \sim N(0,2)$ and $Y_{nm}-Y_{mn} \sim N(0,2)$, so
$$Var(G_{nm}) = \frac{1}{4} (Var(X_{nm} + X_{mn}) + Var(Y_{nm}-Y_{mn})) = 1$$Thus $G_{nm} \sim N(0,1_{\mathbb{C}})$
We can generate GUEs using RandomMatrix's function Generate_GUE
RM.Generate_GUE(2)
Note that Python uses to letter $j$ instead of $i$ for complex numbers.
One might note that GUEs are a generalization of GOEs to the Complex numbers. Indeed this generalization can continue into larger supersets of numbers such as quaternions, whose gaussian ensemble is known as the Gaussian Symplectic Ensemble (GSE). To differentiate between these ensembles we often use the Dyson index, denoted by $\beta$, which corresponds to the dimension over the reals of the numbers being used. So for GOEs $\beta=1$, for GUEs $\beta=2$, for GSE $\beta=4$, etc. This class of Gaussian ensembles are known as Hermite.
A popular gaussian ensemble in modern work in Random Matrix Theory is the Ginibre ensemble. Among many other uses, they are used for perturbation techniques, which will be covered in later chapters.
Definition: A Ginibre matrix is an n × n random matrix with i.i.d complex Gaussian entries $G_{ij} \sim N(0,1_C/n)$.
We can generate Ginibre matrices using RandomMatrix's function Generate_Ginibre
RM.Generate_Ginibre(2)