In the book "Topology from the Differential Viewpoint", Milnor gives a proof of the fundamental theorem of algebra. It goes essentially like this:
Consider the stereographic projection $h_{+}$ of $S^2$ onto $C$ from the north pole and the stereographic projection $h_{-}$ from the south pole. If $P$ is a non constant polynomial, define $f=h_{+}^{-1}Ph_{+}$. Then $f$ is smooth even in a neighborhood of the north pole. To see this consider the map $Q=h_{-}fh{-}^{-1}$. If $f(z)=\sum_{i=1}^n a_iz^i$ then $Q=\frac{z^n}{\sum \bar{a_i}z^{n-i}}$ which is smooth in a neighborhood of zero, hence $f$ is smooth in a neighborhood of the north pole. The singular values of $f$ are the zeros of $P'$ of which there are finitely many. Hence the set of regular values of $f$ is the sphere with finitely many points removed and is therefore connected. The locally constant function $\#f^{-1}(y)$ giving the number of points in $f^{-1}(y)$ is thus constant. Since it is not zero everywhere, it must be zero nowhere. In particular $f$ is surjective and so $P$ must have a zero
The question that I have is: What is the point of introducing the stereographic projection? Why does the space need to be compact in order for this argument to work? I don't see where the compactness of $S^2$ comes into play. Also, when Milnor says that $\#f^{-1}(y)$ is locally constant, doesn't this only apply to the regular values? So wouldn't it only follow that $f$ is surjective onto the set of regular values? Why do we get that $f$ is surjective onto the entire sphere? Finally, when he says that $f$ is surjective onto the sphere does he mean onto the whole sphere or onto the sphere with the north pole removed?