A $C^{\infty}$ function from $\mathbb{R}^2$ to $\mathbb{R}$ Сould any one help me  how to show $C^{\infty}$ function from $\mathbb{R}^2$ to $\mathbb{R}$ can not be injective?

Suppose that $f:\mathbb R^2\rightarrow\mathbb R$ is injective and continuous. 
Then $f$ induces a function $\tilde f:\mathbb R^2\rightarrow \mathbb R\hookrightarrow\mathbb R^2$ which is injective and continuous given by $\tilde f(x)=(f(x),0)$.
By the invariance of domain, $\tilde f(\mathbb R^2)$ is a non empty open set of $\mathbb R^2$. But $\tilde f(\mathbb R^2)\subset\mathbb R\times\{0\}$. Contradiction.
