Steps in the formation of the depletion region at a p-n junction
1️⃣ Free electrons in the n-type region diffuse into the p-type region
2️⃣ Electron holes in the p-type region diffuse into the n-type region
3️⃣ Electrons and holes recombine, leaving behind immobile ions
4️⃣ A built-in potential forms across the depletion region