I have this problem and I don't know how to proceed with it:
Let $M$ be a compact manifold $N$ a connected manifold and $f\colon M \longrightarrow N$ a smooth function. If $f$ doesn't have critical points, then prove that $f$ is surjective.
What I know is that since $f$ doesn't have critical points, all the points in $N$ are regular. Since $M$ is compact, then $f(M)$ is compact too. Now, if $n\in N$ is a point such that $n\notin f(M)$, then I can define the function $g\colon M \longrightarrow \mathbb{R}$ where $g$ defines the shortest length from $x\in M$ to $n$, I know that this function must have a maximum and a minimum, but from this the only thing I can infer is that there is an open neighborhood for $n$ in $N$. What can I do to finish the problem?
EDIT: $M$ and $N$ are of the same dimension.
The image is obviously closed, since it is compact. The image is open by the inverse function theorem. Since it is non-empty and $Y$ is connected, it is the whole space.
EDIT: As Jack Lee pointed out in the comments, the assumption of $\dim M= \dim N$ is unnecessary. You only need that $M$ is nonempty, since if $\dim M < \dim N$ every point is a critical point (contradicting the hypothesis), and if $\dim M > \dim N$, the local form of submersions (which is also a consequence of the inverse function theorem) tells us that $f$ is an open map, and the argument follows in the same way.