Contact between a Metal and a semiconductor forms a junction with either Schottky or Ohmic behavior. If the metal's work function exceeds that of the semiconductor, a Schottky junction is formed. Before contact, the energy band diagrams are aligned at the vacuum level, with the Fermi levels at different positions. Upon contact, the Fermi levels align as electrons transfer from the semiconductor to the metal, reaching equilibrium. Electron loss in the semiconductor decreases its potential, while their addition to the metal increases the potential, forming a Schottky barrier at the junction. The barrier height equals the difference between the metal's work function and the semiconductor's electron affinity. The junction potential difference resists electron transfer from the semiconductor to the metal and is determined by the difference in their work functions. If the metal's work function is smaller than that of the semiconductor, an Ohmic junction is formed. Here, the Fermi levels align as electrons transfer from the metal to the semiconductor. This alignment raises the semiconductor electron energies relative to the metal, allowing electron flow from the semiconductor to the metal. So, the Ohmic junction conducts current in both directions.