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$?