The difference in energy between the Fermi level (see energy bands) of a solid and the energy of free space outside the solid, i.e. the vacuum level. It is the minimum energy required to liberate an electron from the solid at absolute zero temperature.
In a metal the image potential that an electron just outside the surface would experience also contributes to the value of the work function. In a semiconductor the work function is greater than the electron affinity, χ (see diagram). See also photoelectric effect.