Bandgaps are energy barriers in semiconductor crystals which electrons have to surpass so that they can flow through the crystal as electric current. The size of the bandgap determines the electrical and optical properties. Direct and indirect bandgaps are differentiated.