In an ideal crystalline semiconductor at absolute zero, the conduction band with no electrons and the valence band with full electrons are separated by a forbidden gap. At room temperature, some electrons in the valence band jump to the conduction band due to sufficient thermal energy, leaving a vacancy at the top of the valence band for the movement of valence electrons. This vacancy is usually called a hole. A hole has a positive charge equal to that of an electron and has the same positive effective mass as an electron. In addition, normal crystal defects can also produce local electronic energy levels in the forbidden band.
There are two most important types of energy levels in the forbidden band: donor energy levels and acceptor energy levels, which are located close to the conduction band and valence band, respectively. These two energy levels are generated when some foreign atoms replace some of the original atoms in the body. At this time, the donor impurity atom has one more valence electron than the crystal atom. This extra electron is less constrained by the crystal atoms and can jump to the conduction band at any time. In this way, the electron density of the conduction band increases due to the incorporation of donor impurities, so that the hole density is correspondingly suppressed under thermal equilibrium conditions. In the same situation: if an acceptor impurity is doped, the hole density will increase because it has one less valence electron than the crystal atom.
Semiconductors in which most of the free carriers are electrons are called n-type semiconductors, and holes are minority carriers. On the contrary, if holes are majority carriers and electrons are minority carriers, this semiconductor is called a p-type semiconductor. In n-type semiconductors, the electron density mainly depends on the concentration of donor impurities; in p-type semiconductors, the hole density depends on the concentration of acceptor impurities.