\section{Basics of semiconductor physics}
\subsection{Notation}
We only care about free electrons and define
\begin{equation}
    \begin{split}
        n &= \text{electron concentrations density}\ [cm^{-3}]\\
        p &= \text{hole concentrations density}\ [cm^{-3}]\\
    \end{split}
\end{equation}

\subsection{Band gap}
If an electron energy $E$ is large enough to overcome the bandgap $E_g$,
it can escape the valence band into the conduction band.
It then leaves behind a hole.
\begin{figure}[h]
    \centering
    \includegraphics[width=.6\textwidth]{imgs/band_gap_electorn_holes.png}
    \caption{Band-gap electrons/holes}
\end{figure}

\subsection{Generation and recombination}
Generation is the breakup of covalent bonds,
which creates free electrons and holes.
This requires energy, either thermal or optical.
Assuming the atom density far larger than n or p (and thus bonds can be split defacto infinitely),
we have:
\begin{align}
    G & = G_{th} + G_{opt} \\
    R & \sim  n\cdot p
\end{align}


In thermal equilibrium, the generation and recombination rates are equal:
\begin{align}
    G_0                & = f(T)=R_0 \\
    \Rightarrow n_0p_0 & =n_i^2(T)
\end{align}


\subsection{Doping}
Doners are in the 5th shell (V), usually As,P,Sb.
Acceptors are in the 3rd shell (III), usually B,Al,Ga,In.
For doners we have:
\begin{align}
    n_0 & = N_d               \\
    p_0 & = \frac{n_i^2}{N_d}
\end{align}

\subsection{Charge neutrality}
Every semiconductor is neutral,
which imposes the following condition:
\begin{equation}
    P_0-n_0 + N_d - N_a = 0
\end{equation}
where $p_0n_0=n_i^2$.