why is total electron energy of an electron in metal negative?

In my textbook, it says that any electron bound in metals, modelled as some potential well $U$, has negative total electron energy, as shown below in the figure.

Why is the total electron energy negative? And how can this be possible?

Secondly, the (b) part (it is below the (a) part) of the figure is the graph of the potential energy seen by electrons. I am curious why the part $x<0$ has $-U$ as its potential energy seen by electrons. The textbook stated that the metal works(or is modelled) as the potential well depth $U$. So why is it suddenly $-U$?

-
Because zero is the energy of an electron far away, and it takes energy to pull the electron out. –  Ron Maimon Aug 7 '12 at 22:14

A free stationary object infinitely far from a potential will have zero energy. An object bound in a potential will not have enough energy to move infinitely far from the potential (since it is, in fact, bound to some region). Therefore, the second state has less energy than the first, and this energy must therefore be negative.

-
This is true only because the minimum of the potential is negative. For example a particle trapped in an infinite potential well, where the minimum of the well of zero, has positive spectrum of bound states. –  Revo Aug 7 '12 at 22:00
What about the second part? Why is the potential energy seen by electrons negative in $x<0$? (The text confuses me: it says that the potential well is the depth $U$, yet it says that potential seen by electrons is $-U$... –  Mark Lucas Aug 7 '12 at 22:33
@Revo: sure, but the infinite square well has no free states. It's convention to set the potential energy of free particles infinitely far from sources as zero. But yes, you can always add a constant to the potential and everything still works. –  Jerry Schirmer Aug 7 '12 at 22:45
@MarkLucas: you're modeling the binding of the electrons--when they are bound by the metal, they have a potential U below their free state. Just like if you were stuck in a pit with depth $h$, you would be $-h$ meters above the ground. –  Jerry Schirmer Aug 7 '12 at 22:46