Suppose that $f$ is an analytic function from the Riemann sphere to the Riemann sphere, must f be a rational function? Then Riemann sphere is defined by charts $(\mathbb C,Id_{\mathbb C})$ and $(\mathbb C-\{0\}\cup\{\infty\},\phi)$, $\phi(z) = \frac{1}{z},$ if $z \neq 0$, $\phi(z) = 0$ if $z = \infty$. I was told that if $f$ is an analytic function from the Riemann sphere to the Riemann sphere, then $f$ can only be a rational function. 
However, I think about defining$\ $ $f(z)= e^z$, when $z \in \mathbb C$ and $f(z) = \infty$ when $z = \infty$. Isn't this a well-defined holomorphic function between Riemann spheres?
 A: $\mathbb{C}_\infty$ is the Riemann sphere. You can show that an analytic function  $f : \mathbb{C}_\infty \to \mathbb{C}_\infty$ is a rational function by using the theory of Riemann surfaces : showing that the Riemann sphere is compact, so that $f(z)$ has finitely many zeros and poles and $f(z)\frac{\prod_{i=1}^I (z-a_i)}{\prod_{j=1}^J (z-b_j)}$ is bounded and hence constant (by Liouville's theorem).

Otherwise, there is a traditional complex analysis proof :


*

*$f(z)$ is analytic $\mathbb{C}\to \mathbb{C}_\infty$ means that for every $z_0 \in \mathbb{C}$ :  $f(z)$ or $1/f(z)$ is analytic around $z_0$. This is exactly the definition of $f(z)$ is meromorphic ($\mathbb{C} \to \mathbb{C}$).

*By the isolated zeros theorem, an analytic function has finitely many zeros on any compact, and a meromorphic function has finitely many zeros and poles on any compact.

*If $g(z)$ is meromorphic and $G(z) = g(1/z)$ is analytic at $z=0$, then there is a $R$ such that $G(z)$ doesn't have any pole on $|z| \le R$, and hence $g(z)$ doesn't have any pole on $|z| \ge 1/R$, but $|z| \le 1/R$ is compact, so that  $g(z)$ has finitely many poles.

*If $f(z)$ is analytic $\mathbb{C}_\infty \to \mathbb{C}_\infty$, the same argument shows that $f(z)$ has finitely many poles and finitely many zeros.
Finally, let $\tilde{f}(z) = f(z)\frac{\prod_{i=1}^I (z-a_i)}{\prod_{j=1}^J (z-b_j)}$ where $a_i,b_j$ are the poles and the zeros of $f(z)$, you get that $\tilde{f}(z) $  and $\tilde{f}(1/z)$ are entire $\implies$ it is constant (by Liouville's theorem) and  $f(z)$ is a rational function.
A: You were told correctly.
In your example, $e^z$ is not analytic at $z=\infty$, in fact not continuous.  Note that e.g. $$\lim_{x \to -\infty} e^x = 0$$
More generally, in order for the limit (on the Riemann sphere) of $f(z)$ at complex $\infty$ to exist, the singularity of $f(z)$ at complex $\infty$ must be either removable (i.e. $\lim_{z \to \infty} f(z)$ exists as a complex number) or a pole (i.e. $\lim_{z \to \infty} |f(z)| = +\infty$).  The singularity of $\exp(z)$ at $\infty$ is an essential singularity.
