The free electron is thus held inside the metal
surface by the attractive forces of the ions Consequently, the electron can
come out of the metal surface only if it has got sufficient energy to overcome
the attractive pull A certain minimum amount of energy is required to be
given  to an electron to pull it out from the surface of the metal This
minimum energy required by an electron to escape from the metal surface
is called the work function of the metal