Final answer:
In a forward bias, the depletion layer of a p-n junction narrows, allowing charge carriers to flow easily. In reverse bias, the depletion layer widens, impeding the flow of charge carriers.
Step-by-step explanation:
The width of the depletion layer in a p-n junction behaves differently under forward and reverse bias. When the p-n junction is in a forward bias configuration, meaning the positive side of the battery is connected to the p-type material, the depletion layer narrows. This occurs because the external voltage reduces the potential energy difference across the junction, which allows the charge carriers (electrons and holes) to recombine easier, thereby reducing the width of the depletion layer.
Conversely, when the diode is in a reverse bias configuration, with the positive side of the battery connected to the n-type material, the depletion layer widens. This is due to the electric field produced by uncovered ions on both sides of the junction, which increases the barrier, preventing the flow of charge carriers and thus widening the depletion layer.