# Smooth proper map $f:M\to [0,\infty)$ where $M$ is a connected manifold

I am attempting the following exercise:

Let $$M$$ be a connected manifold. Show that there is a smooth proper map $$f:M\to[0,\infty)\subset\mathbb{R}$$.

Surely I can just take $$f$$ to be the zero map; that is, $$f(x):=0$$ for all $$x\in M$$.

This is proper since the preimage of every compact set will be either $$\varnothing$$ or $$\{0\}$$, both of which are compact. It is also smooth.

Am I missing something here? I have not used the assumption that $$M$$ is connected.

• The preimage of a compact set containing $0$ is all of $M$... – studiosus Apr 10 at 12:04
• It is correct and you don’t need to use that M is connected – Federico Fallucca Apr 10 at 12:09
• @studiosus I do not know that $M$ is compact, so does the zero map not work here? – rbird Apr 10 at 12:21
• @rbird Indeed, the zero map does not work when $M$ is not compact. – studiosus Apr 10 at 12:39