Definition
The Band Gap is a forbidden energy range for electrons to occupy which occurs in semiconductors. Metals have no band gap, or negligible band gap and insulators have a very large band gap. The band gap is what gives semiconductors their useful properties which enables solid state electronics.

Explanation
Because of the lattice structure resulting from the crystalline nature of semiconductors, certain higher energy levels are forbidden for electrons. Electrons can only have discrete energy levels, and their wavelike properties restricts them to either a very low energy state (the valence band) or a high energy state (the conduction band). The space inbetween the valence and conduction band where electrons are forbidden is the band gap. The size of the band gap determines much about the nature of a given semiconductor and is very important because the gap is large enough to restrict free flowing electrons but barely small enough to allow current flow with an increase in energy.

```Energy
^
|
|    Conduction Band
|        O
| -----------------------
|
|
|       Band Gap
|
|
| -----------------------
| O   O O O O O O O O O O
|     Valence Band \
|                   \
|                  electron
|
+------------------> x direction
```
In this graph the 'O' symbol represents an electron, the vertical axis represents energy level and the horizontal axis is a direction. You can see that the lower energy level valence band is nearly full of electrons, except for one hole left back by the electron which is in the conduction band.

The valence band is nearly full of electrons in every possible energy state, usually referred to as a sea of electrons, and the conduction band has very limited electrons. The high energy electrons in the conduction band are the major contributors to electron current.

Function
In the valence band, a lack of an electron is called a "hole" and it is treated as an electron with positive charge and negative mass. Electron-hole pairs are created when an electron in the valence band gains enough energy, due possibly to optical excitation or thermal excitation , to jump up to the conduction band, leaving behind a hole. These electron hole pairs are also obliterated when an electron in the conduction band loses energy and falls back to the valence band. When this happens in intrinsic semiconductors, they will frequently release a photon (conservation of energy) equal to the energy width of the band gap.

Application
The band gap is important in forming advanced semiconductor structures such as p-n junctions, schottkey diodes, bipolar junction transistors (BJT), and various field effect transistors. When two dissimilar semiconductors are placed next to each other, their differing band gaps will restrict and govern the flow of electrons highly dependent on applied voltages and optical or thermal excitation.