A p-n junction is the boundary formed when two types of semiconductor material are joined together: one with extra electrons (n-type) and one with “holes,” or missing electrons (p-type). This simple interface is the foundation of nearly every electronic device you use, from the LEDs in your screen to the solar panels on a rooftop. Understanding how it works means understanding how modern electronics control the flow of electricity.
How a P-N Junction Forms
Semiconductors like silicon don’t conduct electricity as well as metals, but they can be “doped,” meaning small amounts of other elements are mixed in to change their electrical properties. Add an element with extra electrons (like phosphorus), and you get n-type material, rich in free electrons. Add an element with fewer electrons (like boron), and you get p-type material, full of positively charged “holes” where electrons are missing.
When these two materials are brought into contact, something interesting happens at the boundary. Free electrons from the n-side drift across the junction and fall into holes on the p-side. Each electron that crosses leaves behind a fixed positive charge on the n-side and creates a fixed negative charge on the p-side. These immobile charges build up an electric field right at the junction, and that field eventually becomes strong enough to stop any more electrons from crossing. The system reaches a natural equilibrium.
The Depletion Region
The thin zone straddling the junction where electrons and holes have cancelled each other out is called the depletion region. It’s “depleted” of mobile charge carriers, so it acts like an insulating barrier. The width of this region and the strength of its electric field depend on how heavily doped the two materials are.
Inside the depletion region, two competing currents exist. A diffusion current pushes majority carriers (electrons from the n-side, holes from the p-side) across the junction because of the concentration difference. A drift current pulls minority carriers back in the opposite direction, driven by the electric field of the exposed ions. At equilibrium, these two currents perfectly balance, so no net current flows. The junction just sits there, charged and waiting.
This natural electric field creates a built-in voltage across the junction. For silicon, the most common semiconductor, this barrier potential is about 0.7 volts. For germanium, an older semiconductor material, it’s roughly 0.3 volts. You can’t measure this voltage with a meter on the outside of the device, but it has real consequences for how the junction behaves when you connect it to a circuit.
Forward Bias: Letting Current Flow
Connect the positive terminal of a battery to the p-side and the negative terminal to the n-side, and you’ve “forward biased” the junction. The external voltage pushes electrons toward the junction from the n-side and pushes holes toward it from the p-side. This shrinks the depletion region, making it thinner and easier for carriers to cross. Once the applied voltage exceeds the built-in barrier (about 0.7 V for silicon), current flows freely through the junction.
The more forward voltage you apply, the narrower the depletion region becomes and the more current flows. This is why diodes, the simplest p-n junction devices, appear to “turn on” at a specific voltage. Below that threshold, almost nothing gets through. Above it, current increases rapidly.
Reverse Bias: Blocking Current
Flip the battery around, connecting negative to the p-side and positive to the n-side, and the opposite happens. The external voltage pulls free charges away from the junction on both sides. The depletion region widens, and the barrier to current flow increases. Only a tiny “leakage” current flows, carried by the small number of minority carriers generated by thermal energy. For practical purposes, the junction blocks current in this direction.
This one-way behavior is the defining feature of a p-n junction. It acts like a valve for electricity: current passes easily in one direction and is blocked in the other. Engineers call this rectification, and it’s the reason p-n junctions are used to convert alternating current (AC) to direct current (DC) in power supplies.
What Happens at Extreme Reverse Voltage
If you keep increasing the reverse voltage, the junction doesn’t block current forever. At a certain point, the electric field across the depletion region becomes so intense that it rips electrons free from their atomic bonds, causing a sudden surge of current. This is called breakdown, and it happens through two different mechanisms depending on how the device is built.
In highly doped junctions with a very narrow depletion region, the strong electric field directly pulls valence electrons into the conduction band. This is Zener breakdown, and it typically occurs between 5 and 8 volts. In lightly doped junctions, the depletion region is wider, so electrons are instead accelerated to high speeds and knock other electrons loose through collisions, creating a chain reaction. This is avalanche breakdown, and it occurs at higher voltages, generally above 8 volts. Both types are not necessarily destructive. Zener diodes, for instance, are specifically designed to break down at a precise voltage, making them useful as voltage regulators.
The Current-Voltage Curve
If you plot the current through a p-n junction against the voltage across it, you get a distinctive asymmetric curve. On the forward side, current stays near zero until the voltage approaches the barrier potential, then rises steeply in an exponential curve. On the reverse side, current is essentially flat and extremely small (the saturation current) until breakdown voltage is reached, at which point it shoots up dramatically.
This exponential relationship between voltage and current is what makes p-n junctions so versatile in circuit design. A small change in forward voltage produces a large change in current, which is useful for amplification and switching. The near-zero reverse current provides effective isolation when you need to block signals or protect circuits.
P-N Junctions in Everyday Devices
The rectifying diode is the most straightforward application: a single p-n junction that converts AC to DC. But the same physics enables far more sophisticated devices.
- LEDs: When electrons and holes recombine at a forward-biased junction, they release energy. In most diodes, that energy becomes heat. In LEDs, the semiconductor materials are chosen so the energy is released as visible light instead. The color depends on the size of the energy gap in the material.
- Solar cells: A solar cell works like an LED in reverse. When light with enough energy strikes the depletion region, it knocks electrons free, creating electron-hole pairs. The built-in electric field of the junction separates these pairs, pushing electrons toward the n-side and holes toward the p-side. Connect a wire between the two sides, and you get electric current powered by sunlight.
- Transistors: A transistor is essentially two p-n junctions placed back to back (either n-p-n or p-n-p). By controlling the voltage at the middle layer, you can switch or amplify current flowing through the device. Billions of these sit inside every modern processor.
Capacitance in a P-N Junction
Because the depletion region has fixed positive charges on one side and fixed negative charges on the other, separated by an insulating gap, it behaves like a tiny capacitor. This junction capacitance changes with the applied voltage: reverse bias widens the gap and reduces capacitance, while forward bias narrows it and increases capacitance. This property is exploited in varactor diodes, which are used to tune radio frequencies by varying the reverse voltage.
Under strong forward bias, a second type of capacitance becomes dominant. Charge carriers injected across the junction are temporarily stored in the surrounding material, creating what’s called diffusion capacitance. This stored charge takes time to build up and dissipate, which limits how fast a diode can switch on and off. It’s one of the key factors engineers consider when designing high-speed circuits.

