TITLE: vector space of all smooth functions has infinite dimension
QUESTION [14 upvotes]: Now, I am working through a particular case in the book on smooth manifolds by John.M.Lee used in my graduate math class, let's say we have a smooth manifold X which has positive dimension. He then claims that the vector space $C^\infty$ of all smooth functions from $X \rightarrow \mathbb{R} $ will have infinite dimension over $\mathbb{R}$. While I do have a fair idea of the  claim, I'm a little bit lost to show that the vector space has infinite dimension.

REPLY [4 votes]: I originally posted the following as a comment but I think it is a particularly simple argument, so worth upgrading to a answer.
Choose any $\theta\in C^\infty(M)$ which is not constant on a connected component of $M$. Then its image is an infinite subset of $\mathbb{R}$ (it includes a nontrivial interval). As the space $\mathbb{R}[X]$ of real polynomials is infinite dimensional, and a polynomial is fully determined by its values on an infinite set, you can conclude that
$$
\left\{f\circ\theta\colon f\in\mathbb{R}[X]\right\}
$$
is an infinite dimensional subspace of $C^\infty(M)$.
Note that this argument is applicable much more generally. E.g., if a Riemann surface has at least one non-constant meromorphic function then the space of meromorphic functions is infinite dimensional.
If you like, you can modify this method to show that the dimension of $C^\infty(M)$ is (at least) the cardinality of the continuum, by proving the same is true for smooth functions on any nontrivial interval in $\mathbb{R}$. (Hint: the exponentials $x\mapsto e^{ax}$ are linearly independent).