= Charge and carrier density of an abrupt p-n junction
For a zero-bias abrupt <p-n junction>, choose the p side at $x<0$ and the n side at $x>0$. Ionized acceptors and donors remain fixed while mobile <Electrons> and <electron holes> diffuse and establish a built-in <electric field>. In the <depletion approximation>, mobile carriers are neglected on $-x_p<x<x_n$ and the net <charge density> is
$$
\rho(x)=\begin{cases}-eN_A,&-x_p<x<0,\\+eN_D,&0<x<x_n,\\0,&\text{outside the depletion region}.
\end{cases}
$$
Charge neutrality gives $N_Ax_p=N_Dx_n$. The quasi-neutral bulk can have a large mobile carrier density while its net <charge density> is nearly zero, because fixed dopant charge compensates it. With complete ionization and nondegenerate carriers, equilibrium also gives $np=n_i^2$; real carrier profiles vary smoothly rather than forming exact step functions at depletion edges.
Back to article page