TITLE: invariance of dimension under diffeomorphism of real subspaces
QUESTION [5 upvotes]: This is a problem from Arnold's book on ODEs I cannot solve.
Prove that if $f:U\to V$ is a diffeomorphism, then the Euclidean spaces with the domains $U$ and $V$ as subsets have the same dimension.
Hint. Use the implicit function theorem.
Thanks.

REPLY [6 votes]: Thanks for the comments. After giving it more thought I was able to solve it on my own. Here's what I did.
Suppose $U\subset \mathbb{R}^{n+m},V\subset \mathbb{R}^m$ and $n>0$ (if $n<0$ just consider $f^{-1}$ instead of $f$ in what follows). We have
$f'=\left(
\begin{array}{cccccc}
 \frac{\partial f_1}{\partial x_1} & \ldots  & \frac{\partial f_1}{\partial x_n} & \frac{\partial f_1}{\partial y_1} & \ldots  & \frac{\partial f_1}{\partial y_m} \\
 \ldots  & \ldots  & \ldots  & \ldots  & \ldots  & \ldots  \\
 \frac{\partial f_m}{\partial x_1} & \ldots  & \frac{\partial f_m}{\partial x_n} & \frac{\partial f_m}{\partial y_1} & \ldots  & \frac{\partial f_m}{\partial y_m}
\end{array}
\right)=\left(
\begin{array}{cc}
 \frac{\partial \left(f_1,\ldots ,f_m\right)}{\partial \left(x_1,\ldots ,x_n\right)} & \frac{\partial \left(f_1,\ldots ,f_m\right)}{\partial \left(y_1,\ldots ,y_m\right)}
\end{array}
\right)$
$\left(f^{-1}\right)'=\left(
\begin{array}{ccc}
 \frac{\partial x_1}{\partial f_1} & \ldots  & \frac{\partial x_1}{\partial f_m} \\
 \ldots  & \ldots  & \ldots  \\
 \frac{\partial x_n}{\partial f_1} & \ldots  & \frac{\partial x_n}{\partial f_m} \\
 \frac{\partial y_1}{\partial f_1} & \ldots  & \frac{\partial y_1}{\partial f_m} \\
 \ldots  & \ldots  & \ldots  \\
 \frac{\partial y_m}{\partial f_1} & \ldots  & \frac{\partial y_m}{\partial f_m}
\end{array}
\right)=\left(
\begin{array}{c}
 \frac{\partial \left(x_1,\ldots ,x_n\right)}{\partial \left(f_1,\ldots ,f_m\right)} \\
 \frac{\partial \left(y_1,\ldots ,y_m\right)}{\partial \left(f_1,\ldots ,f_m\right)}
\end{array}
\right)$
$\left(f^{-1}\right)'\cdot f'=\left(
\begin{array}{cc}
 \frac{\partial \left(x_1,\ldots ,x_n\right)}{\partial \left(f_1,\ldots ,f_m\right)}\cdot \frac{\partial \left(f_1,\ldots ,f_m\right)}{\partial \left(x_1,\ldots ,x_n\right)} & \frac{\partial \left(x_1,\ldots ,x_n\right)}{\partial \left(f_1,\ldots ,f_m\right)}\cdot \frac{\partial \left(f_1,\ldots ,f_m\right)}{\partial \left(y_1,\ldots ,y_m\right)} \\
 \frac{\partial \left(y_1,\ldots ,y_m\right)}{\partial \left(f_1,\ldots ,f_m\right)}\cdot \frac{\partial \left(f_1,\ldots ,f_m\right)}{\partial \left(x_1,\ldots ,x_n\right)} & \frac{\partial \left(y_1,\ldots ,y_m\right)}{\partial \left(f_1,\ldots ,f_m\right)}\cdot \frac{\partial \left(f_1,\ldots ,f_m\right)}{\partial \left(y_1,\ldots ,y_m\right)}
\end{array}
\right)=\left(
\begin{array}{cc}
 I_{(n\times n)} & 0 \\
 0 & I_{(m\times m)}
\end{array}
\right)=I_{(n+m\times n+m)}$
It follows that
$\frac{\partial \left(y_1,\ldots ,y_m\right)}{\partial \left(f_1,\ldots ,f_m\right)}\cdot \frac{\partial \left(f_1,\ldots ,f_m\right)}{\partial \left(y_1,\ldots ,y_m\right)}=I_{(m\times m)}$
Since the Jacobian matrix $\frac{\partial \left(f_1,\ldots ,f_m\right)}{\partial \left(y_1,\ldots ,y_m\right)}$ is not singular, we can apply the implicit function theorem. It follows that there is a function $g:A\to B$, where $A\subset \mathbb{R}^n,B\subset \mathbb{R}^m$ are open subsets and $A\times B\subset U$, such that $f(x,g(x))=\text{const}$ for all $x\in A$. It is then clear that $f$ cannot be bijective.