Surface potential and work function I am quite confused to the manifestation of an electric field on the surface of a metal due to the work function. Can anyone give me an intuitive answer behind this? 
For example:

So I am studying surface states, and spin orbit coupling on such states, and the whole reason behind this coupling is this electric field. Now every book I read kind of gives this hand waving argument that it the field arises due to the work function of the material. I don't see the connection at all.
So I would like some clarification on this. 
Thank you.
 A: In real materials and also in jellium, the positive background charge distribution does not perfectly align with the negative charge distribution. Especially, at the surface, where the translation symmetry is broken, charge can accumulate and creates a surface dipole.

Here is a very heuristic derivation of potential shift due to surface dipole. (I don't care about prefactors, units or sings) Let $\delta'$ be a derivative of of Dirac delta function, representing the charge distribution of this surface dipole. Now, the Poisson equation is
$$ \frac{d^2 V(z)}{dz^2} = p \delta'(z), $$
$$ \frac{d V(z)}{dz} = \int dz p \delta'(z) = p \delta(z), $$
$$ V(z) = \int dz \frac{d V(z)}{dz} = p \Theta(z), $$
where $\Theta$ is the Heaviside step function. We see here that the surface dipole term causes a constant shift of the potential at the surface. In other words, the work function can differ between different surfaces (100,111 etc.) because the surface dipole induced work function shift.
You cannot of course create a perpetual motion machine by taking electrons from one surface and adding them to another, because of the macroscopic multipole moments outside the sample will make the electric field conservative.
