TITLE: Compact surface with Gaussian curvature is positive, negative, and zero
QUESTION [7 upvotes]: I have a question regarding an exercise of do Carmo, Differential geometry, p. 282:
Let $S$ be a regular, compact, orientable surface which is not homeomorphic to a sphere. Prove that there are points on $S$ where the Gaussian curvature is positive, negative, and zero. 
I think a torus could be an example, but that is, of course, no proof. Any ideas? Thanks!

REPLY [9 votes]: (Strictly speaking we need $S$ to be connected as well, otherwise the disjoint union of two spheres provides a counterexample.)
"Homeomorphic" is a tipoff that we have to look for a connection between topology and geometry. Let's start with the Gauss-Bonnet theorem: the integral of the total curvature is equal to $2\pi$ times the Euler characteristic.
Because our surface is not a sphere, its Euler characteristic is nonpositive. Since the surface is compact, there is at least one point with all positive principal curvatures, so its Gauss curvature is positive in at least a small open set. It cannot be positive everywhere because otherwise its integral would be positive, in contradiction to Gauss-Bonnet. Thus the Gauss curvature takes on negative values. By the intermediate value theorem, there must exist a set where the Gauss curvature is equal to zero.