How to prove impossibility of smooth injection from smooth compact $n$-manifold into $\mathbb{R}^n$? Letting $M$ be a compact nonempty smooth $n$-manifold and letting $F : M \longrightarrow \mathbb{R}^n$ be a smooth map, I am asked to show that $F$ cannot be an immersion.
I have the following proof by contradiction. Since $F$ is smooth, it must also be continuous, so $F(M)$ is compact. Since $\mathbb{R}^n$ is connected and Hausdorff, this implies that $F(M)$ is closed. By way of contra diction, assume that $F$ is an immersion. Since the dimensions of the domain and the codomain of $F$ are equal, $F$ must also be a submersion. This tells us that $F$ is a local diffeomorphism, and so is an open map. Thus, $F(M)$ is open. If $F(M) \neq \mathbb{R}^n,$ then $\mathbb{R}^n \setminus F(M) \neq \emptyset$ is also open, so $\mathbb{R}^n$ is not connected, a contradiction. On the other hand, if $F(M) = \mathbb{R}^n,$ then $\mathbb{R}^n$ is compact, a contradiction. Therefore, $F$ is not an immersion.
I found this question and this question helpful in formulating my proof (especially one of the answers to the second question). However, it is not clear to me that my first step is justified. For maps between real Euclidean spaces, smooth implies continuous. However, for $F$ to be smooth means that its composition with the inverse of any coordinate chart of $M$ is smooth, and therefore continuous. While $f,g$ continuous implies $f \circ g$ continuous, the converse need not hold. So am I justified in assuming that $F$ is continuous? Of all the questions I could have asked about this proof, this seems like it should be a simple one, but I'm having trouble seeing the solution. I apologize if this seems really basic.
 A: Loosely speaking, everything local about a manifold can be dealt with using a chart from its atlas. To say that $F\colon M\to\Bbb R^n$ is smooth then reduces to saying that there exists a chart around $x$ and a chart around $f(x)$ such that the induced map between these charts is smooth. (Of course, we need $M$ and $\Bbb R^n$ to be smooth manifolds for this to make sense to begin with; otherwise, we'd have to formulate more carfullly "for every chart around $x/f(x)$, there exists a smaller chart such that ...")
That same map between charts is of course also continuous, thereby making $F$ continuous.
A: Continuity is a local condition:

A map $f:X\to Y$ between topological spaces is continous iff for each $p\in X$ there are open sets $U\subseteq X$, $V\subseteq Y$ with $p\in U$ and $f(U)\subseteq V$ such that the restriction $f_{|U}:U\to V$ is continous, where $U,V$ are equipped with the subspace topologies.

Using this, let $f:M\to N$ be a smooth map between smooth manifolds. Then by definition for each $p\in M$ there are charts $(U,\phi)$, $(V,\psi)$ with $p\in U$ and $f(U)\subseteq V$ such that $\tilde f=\psi\circ f\circ\phi^{-1}$ is a smooth map (in the old sense) and hence continous. Since $\phi,\psi$ are $\textbf{homeomorphisms by definition}$,
the restriction $f_{|U}:U\to V$ satisfies $f_{|U}=\psi^{-1}\circ\tilde f\circ \phi$ and hence is continous as a composition of continous functions.
