% Template based on:
% https://www.cs.columbia.edu/~djhsu/coms4774-s21/scribe.html

\documentclass[12pt]{article}

\usepackage{physics}
\usepackage{dsfont}
\usepackage{amscd}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amstext}
\usepackage{amsthm}
\usepackage{bbold}
\usepackage{bm}
\usepackage{colonequals}
\usepackage[dvips,letterpaper,margin=1in]{geometry}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{xcolor}

\usepackage{csquotes}
\MakeOuterQuote{"}

\definecolor{cblack}{rgb}{0,0,0}
\definecolor{cblue}{rgb}{0.121569,0.466667,0.705882}
\definecolor{corange}{rgb}{1.000000,0.498039,0.054902}
\definecolor{cgreen}{rgb}{0.172549,0.627451,0.172549}
\definecolor{cred}{rgb}{0.839216,0.152941,0.156863}
\definecolor{cpurple}{rgb}{0.580392,0.403922,0.741176}
\definecolor{cbrown}{rgb}{0.549020,0.337255,0.294118}
\definecolor{cpink}{rgb}{0.890196,0.466667,0.760784}
\definecolor{cgray}{rgb}{0.498039,0.498039,0.498039}

\usepackage{hyperref}
\hypersetup{
  linkcolor  = cblue,
  citecolor  = cgreen,
  urlcolor   = corange,
  colorlinks = true,
}

\usepackage{float}
\usepackage[capitalise,noabbrev,nameinlink]{cleveref}

% Lecture information
\newcommand\coursename{CPSC 664, Spring 2023}
\newcommand\scribe{Dantong Li}
\newcommand\lecturer{Tim Kunisky}
\newcommand\lecturedate{February 16, 2023}
\newcommand\lecturetitle{Lecture \#10: GOE and the Semicircle Law}

% Define theorem environments here.
\newtheorem{claim}{Claim}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{remark}[theorem]{Remark}
\newtheorem{assumption}[theorem]{Assumption}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{question}[theorem]{Question}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{conjecture}[theorem]{Conjecture}

% Some of my macros
\renewcommand{\AA}{\mathbb{A}}
\newcommand{\CC}{\mathbb{C}}
\newcommand{\DD}{\mathbb{D}}
\newcommand{\EE}{\mathbb{E}}
\newcommand{\FF}{\mathbb{F}}
\newcommand{\HH}{\mathbb{H}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\PP}{\mathbb{P}}
\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\RR}{\mathbb{R}}
\renewcommand{\SS}{\mathbb{S}}
\newcommand{\ZZ}{\mathbb{Z}}
\DeclareSymbolFont{bbold}{U}{bbold}{m}{n}
\DeclareSymbolFontAlphabet{\mathbbold}{bbold}
\newcommand{\One}{\mathbbold{1}}

\newcommand{\ba}{\bm a}
\newcommand{\bb}{\bm b}
\newcommand{\bc}{\bm c}
\newcommand{\bd}{\bm d}
\newcommand{\be}{\bm e}
\newcommand{\bg}{\bm g}
\newcommand{\bh}{\bm h}
\newcommand{\bi}{\bm i}
\newcommand{\bj}{\bm j}
\newcommand{\bk}{\bm k}
\newcommand{\bbm}{\bm m}
\newcommand{\bp}{\bm p}
\newcommand{\bq}{\bm q}
\newcommand{\br}{\bm r}
\newcommand{\bs}{\bm s}
\newcommand{\bt}{\bm t}
\newcommand{\bu}{\bm u}
\newcommand{\bv}{\bm v}
\newcommand{\bw}{\bm w}
\newcommand{\bx}{\bm x}
\newcommand{\by}{\bm y}
\newcommand{\bz}{\bm z}

\newcommand{\bA}{\bm A}
\newcommand{\bB}{\bm B}
\newcommand{\bC}{\bm C}
\newcommand{\bD}{\bm D}
\newcommand{\bE}{\bm E}
\newcommand{\bF}{\bm F}
\newcommand{\bG}{\bm G}
\newcommand{\bH}{\bm H}
\newcommand{\bI}{\bm I}
\newcommand{\bL}{\bm L}
\newcommand{\bM}{\bm M}
\newcommand{\bN}{\bm N}
\newcommand{\bP}{\bm P}
\newcommand{\bQ}{\bm Q}
\newcommand{\bR}{\bm R}
\newcommand{\bS}{\bm S}
\newcommand{\bT}{\bm T}
\newcommand{\bU}{\bm U}
\newcommand{\bV}{\bm V}
\newcommand{\bW}{\bm W}
\newcommand{\bX}{\bm X}
\newcommand{\bY}{\bm Y}
\newcommand{\bZ}{\bm Z}

\newcommand{\zero}{\bm{0}}
\newcommand{\one}{\bm{1}}

\newcommand{\sA}{\mathcal{A}}
\newcommand{\sB}{\mathcal{B}}
\newcommand{\sC}{\mathcal{C}}
\newcommand{\sD}{\mathcal{D}}
\newcommand{\sE}{\mathcal{E}}
\newcommand{\sF}{\mathcal{F}}
\newcommand{\sG}{\mathcal{G}}
\newcommand{\sH}{\mathcal{H}}
\newcommand{\sI}{\mathcal{I}}
\newcommand{\sJ}{\mathcal{J}}
\newcommand{\sK}{\mathcal{K}}
\newcommand{\sL}{\mathcal{L}}
\newcommand{\sM}{\mathcal{M}}
\newcommand{\sN}{\mathcal{N}}
\newcommand{\sO}{\mathcal{O}}
\newcommand{\sP}{\mathcal{P}}
\newcommand{\sQ}{\mathcal{Q}}
\newcommand{\sR}{\mathcal{R}}
\newcommand{\sS}{\mathcal{S}}
\newcommand{\sT}{\mathcal{T}}
\newcommand{\sU}{\mathcal{U}}
\newcommand{\sV}{\mathcal{V}}
\newcommand{\sX}{\mathcal{X}}
\newcommand{\sY}{\mathcal{Y}}

\newcommand{\fB}{\mathscr{B}}
\newcommand{\fC}{\mathscr{C}}
\newcommand{\fE}{\mathscr{E}}
\newcommand{\fH}{\mathscr{H}}
\newcommand{\fI}{\mathscr{I}}
\newcommand{\fP}{\mathscr{P}}
\newcommand{\fV}{\mathscr{V}}

\DeclareSymbolFont{sfoperators}{OT1}{cmss}{m}{n}
% don't waste a math group
\DeclareSymbolFontAlphabet{\mathsf}{sfoperators}
% tell LaTeX to use sfoperators for names of operators
\makeatletter
\renewcommand{\operator@font}{\mathgroup\symsfoperators}
\makeatother

\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator*{\argmin}{arg\,min}
\DeclareMathOperator{\GOE}{GOE}
\DeclareMathOperator{\sym}{sym}
\DeclareMathOperator{\Part}{Part}
\DeclareMathOperator{\poly}{poly}
\DeclareMathOperator{\Unif}{Unif}
\DeclareMathOperator{\Var}{Var}
\DeclareMathOperator{\Cov}{Cov}
% \DeclareMathOperator{\Tr}{Tr}
% \DeclareMathOperator{\rank}{rank}
\DeclareMathOperator{\obj}{obj}
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\sgn}{sgn}

\renewcommand\Re{\operatorname{Re}}
\renewcommand\Im{\operatorname{Im}}
% These put symbols below.
\newcommand{\Px}{\mathop{\mathbb{P}}}
\newcommand{\Ex}{\mathop{\mathbb{E}}}
\newcommand{\Varx}{\mathop{\mathsf{Var}}}

\newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}}

%
% Put your custom macros here if you want.
%
% floor, ceiling, set
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
\DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor}
\DeclarePairedDelimiter{\set}{\lbrace}{\rbrace}
\DeclarePairedDelimiter{\iprod}{\langle}{\rangle}
\DeclarePairedDelimiter{\card}{\lvert}{\rvert}
\let\abs\relax
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\DeclarePairedDelimiter{\level}{\llbracket}{\rrbracket}

\DeclareMathOperator{\Int}{int}
\DeclareMathOperator{\bdy}{bdy}
\DeclareMathOperator{\Lim}{Lim}
\DeclareMathOperator{\mean}{mean}
\DeclareMathOperator{\col}{col}
\DeclareMathOperator{\proj}{proj}
\DeclareMathOperator{\dual}{dual}
\DeclareMathOperator{\opt}{opt}
\DeclareMathOperator{\cone}{cone}
\DeclareMathOperator{\conv}{conv}
\DeclareMathOperator{\supp}{supp}
% \DeclareMathOperator{\poly}{poly}
% \DeclareMathOperator{\sgn}{sgn}
\DeclareMathOperator{\depth}{depth}
\DeclareMathOperator{\OPT}{OPT}
\DeclareMathOperator{\Set}{set}
\DeclareMathOperator{\pred}{pred}
\DeclareMathOperator{\SAT}{SAT}
\DeclareMathOperator{\indeg}{indeg}
\DeclareMathOperator{\outdeg}{outdeg}
\DeclareMathOperator{\tw}{tw}
% \DeclareMathOperator{\bw}{bw}
\DeclareMathOperator{\pw}{pw}
\DeclareMathOperator{\cutwidth}{cutwidth}
\DeclareMathOperator{\Cut}{Cut}
\DeclareMathOperator{\Vs}{Vs}
\DeclareMathOperator{\vs}{vs}
\DeclareMathOperator{\adj}{adj}
\DeclareMathOperator{\Sp}{Sp}
% \DeclareMathOperator{\argmax}{argmax}
% \DeclareMathOperator{\argmin}{argmin}
\DeclareMathOperator{\dom}{dom}
\DeclareMathOperator{\MLE}{MLE}
\DeclareMathOperator{\MAP}{MAP}
\DeclareMathOperator{\KL}{KL}
\DeclareMathOperator{\LK}{LK}
\DeclareMathOperator{\Be}{Be}
\DeclareMathOperator{\Bin}{Bin}
\DeclareMathOperator{\Geo}{Geo}
\DeclareMathOperator{\Po}{Po}
\DeclareMathOperator{\Exp}{Exp}
\DeclareMathOperator{\Mult}{Mult}
% \DeclareMathOperator{\Var}{Var}
% \DeclareMathOperator{\Cov}{Cov}
\DeclareMathOperator{\Cauchy}{Cauchy}
\DeclareMathOperator{\Diag}{Diag}
% \DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\DB}{DB}
\DeclareMathOperator{\BB}{BB}
\DeclareMathOperator{\OU}{OU}
\DeclareMathOperator{\GWN}{GWN}
\DeclareMathOperator{\Crit}{Crit}
\DeclareMathOperator{\vol}{vol}

% commonly used sets
\newcommand{\R}{\mathbb{R}}
\renewcommand{\S}{\mathbb{S}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\E}{\mathbb{E}}
\newcommand{\B}{\mathcal{B}}
\newcommand{\F}{\mathcal{F}}
\newcommand{\G}{\mathcal{G}}
\renewcommand{\L}{\mathcal{L}}
\renewcommand{\H}{\mathscr{H}}
\renewcommand{\P}{\mathbb{P}}

\newcommand{\h}{\vec{h}}
\newcommand{\p}{\vec{p}}
\newcommand{\x}{\vec{x}}
\newcommand{\y}{\vec{y}}
\newcommand{\z}{\vec{z}}
\renewcommand{\a}{\vec{a}}
\renewcommand{\b}{\vec{b}}
\renewcommand{\c}{\vec{c}}
\renewcommand{\t}{\vec{t}}
\renewcommand{\u}{\vec{u}}
\renewcommand{\v}[1]{\vec{#1}}

\newcommand{\sset}{\subseteq}
\newcommand{\mcal}{\mathcal}
\newcommand{\mscr}{\mathscr}
\newcommand{\mfrak}{\mathfrak}
\newcommand{\up}{\uparrow}
\newcommand{\down}{\downarrow}
\newcommand{\zeros}{\mathds{0}}
\newcommand{\ones}{\mathds{1}}
\newcommand{\tends}[1]{\xrightarrow{#1}}
\newcommand{\sdnet}[1]{\xleftarrow{#1}}
\newcommand{\eq}[1]{\stackrel{#1}{=}}
\newcommand{\Geq}[1]{\stackrel{#1}{\geq}}
\newcommand{\Leq}[1]{\stackrel{#1}{\leq}}
\newcommand{\Gt}[1]{\stackrel{#1}{>}}
\newcommand{\Lt}[1]{\stackrel{#1}{<}}
\newcommand{\Add}[1]{\stackrel{#1}{+}}
\newcommand{\Sim}[1]{\stackrel{#1}{\sim}}
\newcommand{\mat}[1]{\begin{bmatrix}#1\end{bmatrix}}

\begin{document}

% This creates the header for scribe notes.
\noindent \coursename \hfill Scribe: \scribe \\
\lecturedate \hfill Lecturer: \lecturer
\vspace{1em}

\hrule

\vspace{1.5em}
\begin{center}
  {\Large\lecturetitle}
\end{center}

\section{Gaussian Orthogonal Ensemble (GOE)}

Previously, we saw that the first moment method in the form of the Kac-Rice formula leads us to random matrix problems. In this lecture, we will talk about the random matrix theory and move toward free probability. We will start with the most critical random matrix theory example, the Gaussian Orthogonal Ensemble (GOE), which we usually denote by $W$ distributed as:
\begin{align*}
    W &\in \RR^{N\times N}_{\mathrm{sym}}, \\
    W_{ij} = W_{ji} &\Sim{iid} \mcal N(0, 1), \tag{for all $i < j$} \\
    W_{ii} &\Sim{iid} \mcal N(0, 2).
\end{align*}

We will not yet normalize $W$ to have a spectrum with support independent of $N$, but rather will discover the correct normalization in our calculations.

The scaling of the diagonal entries' variances may be justified as follows.
    Defining an asymmetric Gaussian random matrix
    \begin{align*}
        G &\in \RR^{N\times N}, \\
        G_{ij} &\Sim{iid} \mcal N(0, 1), \tag{for all $i, j$}
    \end{align*}
    We have
    \begin{align*}
        W \eq{d} \frac{G + G^T}{\sqrt{2}}
    \end{align*}
    because on the diagonal we have the same variable added together and entries not on the diagonal is a sum of independent Gaussians.
    In particular, the important property of \emph{rotational invariance} then follows:
    \begin{align*}
        W \eq{d} QWQ^T \text{ for any deterministic orthognal matrix } Q \in O(N).
    \end{align*}
    We prove this below in Proposition~\ref{prop: invariant} and Corollary~\ref{cor: invariant}.

\begin{proposition}
    \label{prop: invariant}
    For $Q \in O(N)$, and a vector $g \sim \mcal N(0, I_N)$, we have $g \eq{d} Qg$.
\end{proposition}
\begin{proof}
    All the entries in $Qg$ must be a linear combination of Gaussian variables, and a Gaussian vector is specified by its mean and covariance. Apparently, the mean of $Qg$ is $0$ by linearity. And its covariance is:
    \begin{align*}
        \E \left[(Qg)(Qg)^T\right] = Q \E\left[gg^T\right]Q^T = I.
    \end{align*}
\end{proof}
\begin{corollary}
    \label{cor: invariant}
    $QG \eq{d} G$.
\end{corollary}
\begin{proof}
    Apply Proposition~\ref{prop: invariant} to each column of $G$.
\end{proof}

This $W$ matrix is exactly what we saw in the last lecture up to normalization. Recall from the moment method lecture that what we are interested in from these matrices is their empirical spectral distribution (ESD), which is a random probability measure on $\RR$:

\begin{align*}
    \mu = \mu_W = \frac{1}{N} \sum_{i=1}^N \delta_{\lambda_i}(W).
\end{align*}
We want to understand what distribution this converges to when $N$ goes to $\infty$:
\begin{align*}
    \mu \rightarrow \rho,
\end{align*}
for $\rho$ some \emph{deterministic} probability distribution.

The main task is to find what the moments of the ESD converge to:
\begin{align*}
    \underbrace{\E \int x^k \, d\mu(x)}_{\equalscolon m_k} \rightarrow \int x^k \, d\rho(x)
\end{align*}

So we will need to calculate these $m_k$'s, which we do by expanding them as traces:
\begin{align*}
    m_k &= \E \frac{1}{N} \sum_{i=1}^N \lambda_i^k \\
    &= \frac{1}{N} \E \Tr(W^k) \\
    &= \frac{1}{N} \E \sum_{i_1, \dots, i_k \in [N]} W_{i_1i_2}W_{i_2i_3}\dots W_{i_ki_1}.
\end{align*}
If we move the $\E$ inside the summation, to show what part of the summation has a non-zero contribution, we can think of each term of the summation as \textit{a closed walk} on $1, \dots, N$, as shown in Figure~\ref{fig:closed walk}.

\begin{figure}[H]
  \centering
  \includegraphics[width=0.5\textwidth]{2023-02-16-fig1.png}
  \caption{Closed Walk}
  \label{fig:closed walk}
\end{figure}

Notice that to have a non-zero contribution, every edge suchmust be traversed an \emph{even} number of times. If we ignore the labeling of the walk, we can define a \textit{shape} to be a walk without vertex labels. \textit{Good shapes} are those with non-zero contributions. Then

\begin{align*}
    m_k &= \frac{1}{N} \sum_{\text{good shapes}} \overbrace{f(\text{shape})}^{O_k(1)} \cdot \overbrace{N(N-1)\dots (N-\#\{\text{shape vertices}\} + 1)}^{\text{number of such shapes } \approx \, N^{\#\{\text{shape vertices}\}}}.
\end{align*}

Since we are looking at $N \rightarrow \infty$, the leading term of the summation is the shapes that maximize the \textit{number of terms having such a shapes}. Let's consider the following two examples, as shown in Figure~\ref{fig:shape examples}. $k$ is the number of edges, for $k=4$ and $k=6$, we have two typical shapes. But the claim here is these are not the only good shapes that are the maximizers.

\begin{remark}
    if $k$ is odd, then there are no good shapes, so $m_k=0$.
\end{remark}

\begin{figure}[H]
  \centering
  \includegraphics[width=0.5\textwidth]{2023-02-16-fig2.png}
  \caption{Shape Examples}
  \label{fig:shape examples}
\end{figure}

\begin{proposition}
    \{Good shapes with $k$ edges, $\frac{k}{2}+1$ vertices\} = \{``doubled'' trees\}.
\end{proposition}

Therefore,
\begin{align*}
    m_k \approx N^{k/2} \times \#\left\{\text{traversal-ordered trees on } \frac{k}{2} + 1 \text{ vertices}\right\}
\end{align*}

One can make a bijection that maps the elements of traversal-ordered trees in the above set to elements of \textit{length-k balanced sequences of \{``\texttt{new}'', ``\texttt{back}''\}}, as illustrated in Figure~\ref{fig:bijection}.

\begin{figure}[H]
  \centering
  \includegraphics[width=0.75\textwidth]{2023-02-16-fig3.png}
  \caption{Bijection}
  \label{fig:bijection}
\end{figure}

Here we could understand "balanced" as, at any point, we can not have more $\texttt{back}$'s than $\texttt{new}$'s. This number also appears when \textit{counting balanced parenthesizations} or \textit{walks that never go below zero}, and is given by the \emph{Catalan numbers}. These are
\begin{align*}
    m_k = N^{k/2}C_{k/2} = N^{k/2} \frac{1}{k/2 + 1} \binom{k}{k/2}.
\end{align*}

\begin{theorem}
Let $\widehat{W} \colonequals \frac{1}{\sqrt{N}}W$. Then, for all $k \geq 1$,
\begin{align*}
    \E \frac{1}{N} \Tr(\widehat{W}^k) = \begin{cases}
        0  & \text{if } k \text{ is odd}, \\
        C_{k/2} & \text{if } k \text{ is even}.
    \end{cases}
\end{align*}
\end{theorem}

\section{The Semicircle Law}
Now we know the moments of $\rho$, we want to invert them and find the probability distribution itself. And we will see the same device will also help calculate the formula for the Catalan number. This device is the \textit{ordinary} moment generating function $M(x)$ defined as:
\begin{align*}
    M(x) = \sum_{k \geq 0}m_k x^k.
\end{align*}

Note that a valid sequence of length $k$ should look like, for some $0 \leq i \leq k - 2$,
\[ \texttt{new} \, \underbrace{(\dots)}_{i} \texttt{back} \, \underbrace{(\dots)}_{k-2-i}, \]
so we have the following recursion:
\begin{align*}
        m_0 &= 1, \\
        m_1 &= 0, \\
        m_k &= \sum_{i=0}^{k-2}m_im_{k-2-i} \text{ for } k \geq 2.
\end{align*}
Therefore,
\begin{align*}
    M(x) &= \underbrace{1}_{k=0} + \underbrace{0 \cdot x}_{k=1} + \sum_{k \geq 2}\sum_{i=0}^{k-2} m_i m_{k-2-i} x^k \\
    &= 1 + x^2 M(x)^2.
\end{align*}
Then we can solve the quadratic equation and get:
\begin{align*}
    M(x) = \frac{1-\sqrt{1-4x^2}}{2x^2}
\end{align*}

\begin{remark}
    We choose $M(x) = \frac{1-\sqrt{1-4x^2}}{2x^2}$ rather than $M(x) = \frac{1+\sqrt{1-4x^2}}{2x^2}$ because we want $\lim_{x \rightarrow 0} M(x) \rightarrow 1 = m_0$.
\end{remark}

\begin{remark}
    We also see $M(x) = \sum_{k\geq 0}C_k x^{2k}$, since we only have even powers of $x$ in $M(x)$.
    To get $C_k$, we compute the power series of $(1+y)^{1/2} = \sum_{k \geq 0}\binom{1/2}{k}y^k$, with the ``formal binomial coefficients'' $\binom{1/2}{k} = \frac{\frac{1}{2}(\frac{1}{2}-1)\dots(\frac{1}{2}-k+1)}{k!}$.
\end{remark}

To recover the distribution, we can observe the following:
\begin{align*}
    M(z) &= \sum_{k \geq 0} \Ex_{X \sim \rho} [ X^k ] z^k \\
    &= \Ex_{X} \frac{1}{1-zX}.
\end{align*}
We instead consider the closely related Stieltjes transform, which is widely used in random matrix theory:
\begin{align*}
    S(z) &= \Ex_X \frac{1}{X-z} \\
    &= -\frac{1}{z} M(\frac{1}{z}) \\
    &= -\frac{1}{z} \Ex \frac{1}{1-\frac{1}{z}X}.
\end{align*}

In our case, we may compute
\begin{align*}
    S(z) = \frac{1}{2} \left( \sqrt{z^2-4} - z \right).
\end{align*}

\begin{remark}
    All these transformations contain the same amount of information as the moment sequence.
\end{remark}

Now we will look into how to invert $S(z)$ to get the density function back. Note that if $\rho$ has a density function $p(x)$, then

\begin{align*}
    S(z) &= \Ex_X \frac{1}{X-z} \\
    &= \int_{-\infty}^{\infty} \frac{p(x)}{X-z} dx.
\end{align*}
What we can do here is a complex analysis technique:
\begin{align*}
    S(y + i\epsilon) - S(y - i\epsilon) &= \int_{-\infty}^{\infty} \frac{p(x)}{\underbrace{X-i\epsilon}_{\text{path}}-y} dx - \int_{-\infty}^{\infty} \frac{p(x)}{\underbrace{X+i\epsilon}_{\text{path}}-y} dx \\
  &\approx \oint_{C} \frac{p(z)}{z-y} dx. \tag{roughly}
\end{align*}

The contour $C$ is illustrated in Figure~\ref{fig:integral}.

\begin{figure}[H]
  \centering
  \includegraphics[width=0.5\textwidth]{2023-02-16-fig4.png}
  \caption{Integral Path}
  \label{fig:integral}
\end{figure}

\begin{proposition}
    Under some additional conditions, by Cauchy's integral formula
    \begin{align*}
        p(y) = \frac{1}{2\pi i} \lim_{\epsilon \rightarrow 0} \left\{ S(y + i\epsilon) - S(y - i\epsilon) \right\}.
    \end{align*}
\end{proposition}

For our $S(z)$, we need the "right" $\sqrt{z}$ that is compatible with our earlier calculations. The right choice is to avoid defining the square root of the negative real axis, as illustrated below in Figure~\ref{fig:square root}.

\begin{figure}[H]
  \centering
  \includegraphics[width=0.5\textwidth]{2023-02-16-fig5.png}
  \caption{Square Root Function}
  \label{fig:square root}
\end{figure}

Then we find, in our case,
\begin{align*}
    p(y) &= \frac{1}{2\pi i} \lim_{\epsilon \rightarrow 0} \left\{ \frac{1}{2} \sqrt{(y+i\epsilon)^2 - 4} - \frac{1}{2} \sqrt{(y-i\epsilon)^2 - 4} \right\} \\
    &= \frac{1}{2 \pi i} \begin{cases}
        0 & \text{if } y^2 \geq 4, \\
        i \cdot \frac{1}{2} \sqrt{y^2 - 4} \cdot 2 & \text{if } y^2 < 4
    \end{cases} \\
    &= \frac{1}{2 \pi} \begin{cases}
        0 & y^2 \geq 4, \\
        \sqrt{y^2 - 4} & y^2 < 4.
    \end{cases}
\end{align*}

And this is exactly the density of the semicircle law.

\begin{theorem}
    The ESD of the normalized GOE matrix $\widehat{W}$ converges in moments to the \emph{semicircle law} having density
    \begin{align*}
        p(y) = \frac{1}{2\pi}\sqrt{y^2-4} \cdot \mathbb{1}\left\{ y\in[-2,2] \right\}.
    \end{align*}
\end{theorem}

\begin{remark}
    All of these calculations depend very little on the distribution of the entries of $W$. Let $W_{ii}$ be anything reasonable, $\E W_{ij} = 0$ and $\E w_{ij}^2 = 1$, and a small amount of further regularty, then we have similar decay in the higher moments of the entries so that we could carry through the ``tree counting'' arguments we did previously, then the same exact argument is applicable to any such random matrix to get the semicircle law in the end.
\end{remark}

Next time we will look back and see how we can use this argument to handle more complicated matrices resulting from the Kac-Rice formula.

\end{document}