TITLE: Why isn't there a continuously differentiable injection into a lower dimensional space?
QUESTION [25 upvotes]: How to show that a continuously differentiable function $f:\mathbb{R}^{n}\to \mathbb{R}^m$ can't be a 1-1 when $n>m$? This is an exercise in Spivak's "Calculus on manifolds". 
I can solve the problem in the case $m=1$. To see this, note that the result is obvious if the first partial derivative $D_1 f(x)=0$ for all $x$ as then $f$ will be independent of the first variable. Otherwise there exists $a\in \mathbb{R}^n$ s.t. $D_1 f(a)\not=0$. Put $g:A\to \mathbb{R}^n, g(x)=(f(x),x_2, \ldots, x_n)$ (with $x=(x_1,\ldots, x_n)$). Now the Jacobian 
$$ 
g'(x) = \left[
          \begin{array}{cc}
             D_1 f(x) & 0 \\
             0        & I_{n-1}     
          \end{array}
        \right]
$$ 
so that $\text{det}\, g'(a)=D_1 f(a)\not=0$. By the Inverse Function Theorem we have an open set $B\subseteq A$ s.t. $g:B\to g(B)$ is bijective with a differentiable inverse. In particular, $g(B)$ is open. 
Pick any $g(b)=(f(b),b_2,\ldots, b_n)\in g(B)$. Since $g(B)$ is open there exists $\varepsilon > 0$ such that  $(f(b), b_2, \ldots, b_n+\varepsilon) \in g(B)$. Thus we can find $b'\in B$ s.t. $g(b')=(f(b), b_2, \ldots, b_n+\varepsilon)$. By the definition of $g$, $f(b')=f(b)$ with $b'$ and $b$ differing in the last coordinate. Thus $f$ isn't injective.
However, I cannot generalize this argument to higher dimenssions.

REPLY [2 votes]: I don't have a full solution for the general case, myself, but I can boil it down to a simpler problem which I feel may have a more elementary solution.
Firstly, I believe you miscalculated the top row of $g'$.
In the $m=1$ case, it comes out to:
$$
  g'(x)
  =
  \left[
    \begin{array}{c|ccc}
      D_1 f(x) & D_2 f(x) & \dots & D_n f(x) \\ \hline
      0 & & I_{n-1} & \\
    \end{array}
  \right]
$$
The determinant still comes out to be $\det(g'(x)) = D_1 f(x)$.
In the general case, $g'$ becomes
$$
  g'(x)
  =
  \left[
    \begin{array}{ccc|ccc}
      D_1 f^1(x) & \dots & D_m f^1(x) & D_{m+1} f^1(x) & \dots & D_n f^1(x) \\
      \vdots & \ddots & \vdots & \vdots & \ddots & \vdots \\
      D_1 f^m(x) & \dots & D_m f^m(x) & D_{m+1} f^m(x) & \dots & D_n f^m(x) \\ \hline
      & 0 & & & I_{n-m} & \\
    \end{array}
  \right]
$$
The determinant then becomes
$$
  \det(g'(x))
  =
  \left|
    \begin{array}{ccc}
      D_1 f^1(x) & \dots & D_m f^1(x) \\
      \vdots & \ddots & \vdots \\
      D_1 f^m(x) & \dots & D_m f^m(x) \\
    \end{array}
  \right|
$$
As before, this determinant cannot be nonzero anywhere, or else you can apply the inverse function theorem again, to show that $f$ is not 1-1. Therefore it remains to be shown that if this determinant is zero everywhere, $f$ cannot be 1-1.
It seems intuitively clear to me that that $(f^1, \dots, f^m)$ should fail to be 1-1, and therefore so will $f$, but I'm having difficulties showing it using the earlier results from Spivak.
To be clear, I claim that the general case boils down to: if $f: \mathbb{R}^n \rightarrow \mathbb{R}^n$ is continuously differentiable and satisfies $\det(f'(x)) = 0$ for all $x$, then $f$ is not 1-1.