# Shifting of Energy levels in PN junction under Equilibrium

1. My question is during equilibrium is achieved under no biasing, why it is that in fermi level diagram representation fermi levels are raised in p type nd lowered in n type. Is it not possible we increase the fermi level of n type than p type.

2. If we finally look at the picture, it still confuses me and other readers too that fermi level then shown seems like fermi level of p type (Evp) and fermi level of n type (Ecn) are still closer as they were individually were.. Some text says to see the scaling of energy levels of p and n level. But i am not satisfied.

You can find the position of Fermi level in two cases: $$n_0=n_i\exp\left[\frac{E_F-E_{Fi}}{k_BT}\right]$$ $$p_0=n_i\exp\left[-\frac{E_F-E_{Fi}}{k_BT}\right]$$ Rearranging the two relations, We get:
$$\rightarrow E_F-E_{Fi}=k_BT\ln\left(\frac{n_0}{n_i}\right)$$ $$\rightarrow E_{Fi}-E_{F}=k_BT\ln\left(\frac{p_0}{n_i}\right)$$
For an $$n$$-type semiconductor, $$n_0>n_i$$ and $$E_F>E_{Fi}$$. The Fermi level for an $$n$$-type semiconductor is above $$E_{Fi}$$. For a $$p-type$$ semiconductor $$p_0>n_i$$ and from the second equation we see that $$E_{Fi}>E_F$$. The Fermi level for a $$p$$-type semiconductor is below $$E_{Fi}$$.