# Definition of a submanifold of $\mathbb{R}^n$

The definition of a submanifold of $$\mathbb{R}^n$$ I was given is the following:

A subset $$M \subseteq \mathbb{R}^n$$ is called an $$m$$-dimensional submanifold of $$\mathbb{R}^n$$ if for every point $$x \in M$$ there exists an open set $$U \subseteq \mathbb{R}^n$$ containing $$x$$ and an open subset $$V\subseteq \mathbb{R}^n$$ together with a diffeomorphism $$\phi$$ from $$U$$ to $$V$$ such that $$\phi(M \cap U)=V \cap (\mathbb{R}^m \times \{0\})$$ with $$0 \in \mathbb{R}^{n-m}$$.

I don't quite see why this captures the notion of "a manifold of dimension $$m$$ locally looks like $$\mathbb{R}^m$$". If I was asked to make this notion rigorous, I'd define a submanifold of $$\mathbb{R}^n$$ as follows:

A subset $$M \subseteq \mathbb{R}^n$$ is called an $$m$$-dimensional submanifold of $$\mathbb{R}^n$$ if for every point $$x \in M$$ there exists an open set $$U \subseteq M$$ in the subspace topology and an open set $$V \subseteq \mathbb{R}^m$$ which is diffeomorphic to $$U$$, that is there exists a diffeomorphism from $$U$$ to $$V$$.

Is there a difference between the two definitions? Isn't $$\mathbb{R}^m \times \{0\})$$ diffeomorphic to $$\mathbb{R}^m$$? Does it have something to do with wanting the Jacobi-matrix of the diffeomorphism to be invertible?

Usually, before introducing the notion of manifolds, the concept of what it means to be a smooth map $$f \colon U \rightarrow V$$ (or a diffeomorphism) is defined only when $$U,V$$ are open subsets of $$\mathbb{R}^n / \mathbb{R}^m$$. The problem with your second definition is that you want to say a small piece of $$M$$ looks like a small piece of $$\mathbb{R}^m$$ "in a smooth way" and so you say "there exists a diffeomorphism between $$U \subseteq M$$ and $$V \subseteq \mathbb{R}^m$$. However, because $$U$$ is an open subset of $$M$$ (in the subspace topology), it won't generally be an open subset of $$\mathbb{R}^n$$ and so it is not clear a priori what it means to be a diffeomorphism between $$U$$ and $$V$$.
This can actually be fixed and leads directly to the first definition. Let's say that two subsets $$A,B \subseteq \mathbb{R}^n$$ are diffeomorphic if one can find open neighborhoods $$A \subseteq U$$ and $$B \subseteq V$$ (where $$U,V$$ are open in $$\mathbb{R}^n$$) and a diffeomorphism $$\phi \colon U \rightarrow V$$ such that $$\phi(A) = B$$. What this definition means in practice is that $$A,B$$ are diffeomorphic if $$A$$ can be mapped to $$B$$ bijectively by a map $$\phi$$ in such a way that it possible to extend this map $$A$$ to an open neighborhood of $$A$$ so that the extension is a diffeomorphism (onto some open neighborhood of $$B$$).
Having this definition in mind, your second definition makes sense and is actually equivalent to the first definition. Why? Well, in the second definition you have the subset $$M \cap U$$ which is open in $$M$$ (but generally not open in $$\mathbb{R}^n$$) and the subset $$V \cap (\mathbb{R}^m \times \{ 0 \})$$ which is open in $$\mathbb{R}^m \times \{ 0_{n-m} \}$$ (so under the identification $$\mathbb{R}^m \cong \mathbb{R}^m \times \{ 0_{n-m} \}$$ you can think of it as an open subset of $$\mathbb{R}^m$$) but generally not open in $$\mathbb{R}^n$$. The first definition requires you to find a map $$\phi \colon U \rightarrow V$$ which is a diffeomorphism between open sets which sends $$U \cap M$$ to $$V \cap (\mathbb{R}^m \times \{ 0 \})$$ and according to the definition I gave this means that $$M \cap U$$ and $$V \cap (\mathbb{R}^m \times \{ 0 \})$$ are diffeomorphic.