Also, why does width of depletion layer decreases and electric field increases if doping increases
closed as too broad by Voltage Spike, winny, clabacchio♦ Jul 18 '17 at 7:15
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
When you form a PN junction you get diffusion of charge carriers from one side into the other. This causes depletion of the carriers from both semiconductors. The semiconductor outside the depletion region is charge neutral, and the semiconductor inside the depletion region is assumed to have a constant charge density equal to the dopant concentration. This is due to the ionization of the dopant atoms, each contributing one electrons or hole worth of charge. Both the p and the n sides of the junction must have equal total depletion charge in the depletion region.
If you increase the dopant concentration of one side of the junction, two things happen. First, you now must deplete more charge to account for the increase in potential between the sides of the junction. Second, the charge density in the higher doped semiconductor has increased. This leads to an overall reduction in the thickness of the depletion region on the higher doped side since you need to deplete less of the semiconductor to get the required depletion charge.
Electric field is the integral of charge density. This reduction in depletion width thickness causes an increase in electric field because the charge density has increased and the depletion width has decreased.