In the depletion region of a diode

The depletion layer is formed due to the difference in concentration of the charge carriers between the P and N junctions. The electrons from the N junction diffuse through junction to the P junction and holes form the P junction diffuse to the N junction. This creates a layer of negatively charged immobile ions near the P-N junction in the P crystal and an equal number of positively charged immobile ions in the N crystal near the junction.


This creates a neutral layer due to the equal number of holes and electrons that exist in this region. Also since the charges are on the immobile ions, there are no free mobile charges in this region.

1