We discuss surface alloy phases and their stability based on surface p
hase diagrams constructed from the surface energy as a function of the
surface composition. We show that in the simplest cases of pseudomorp
hic overlayers there are four generic classes of systems, characterize
d by the sign of the heat of segregation from the bulk and the sign of
the excess interactions between the atoms in the surface (the surface
mixing energy). We also consider the more complicated cases a with or
dered surface phases, nonpseudomorphic overlayers, second layer segreg
ation, and multilayers. The discussion is based on density-functional
calculations using the coherent-potential approximation and on effecti
ve-medium theory. We give self-consistent density-functional results f
or the segregation energy and surface mixing energy for all combinatio
ns of the transition and noble metals. Finally we discuss in detail th
e cases Ag/Cu(100), Pt/Cu(111), Ag/Pt(111), Co/Cu(111), Fe/Cu(111), an
d Pd/Cu(110) in connection with available experimental results.