Show that the sphere $S^{n}$ is a closed embedded submanifold of $\Bbb{R}^{n+1}$ I am studying the differentiable manifold, and I was asked to prove $S^{n}$ is a closed embedded submanifold of $\Bbb{R}^{n+1}$. I have a solution, but I don't quite understand it.
Here is the proof:

The map $f\colon \Bbb{R}^{n+1} \to \Bbb{R}$, defined by $f(x_{1},x_{2},\dotsc,x_{n+1})=\sum_{i=1}^{n+1}(x_{i})^{2}$ is clearly a $C^{\infty}$ map and has rank constantly equal to $1$ on $\Bbb{R}^{n+1}-\{0\}$. Since $S^{n}=f^{-1}(1)$, $S^{n}$ is a closed embedded submanifold of $\Bbb{R}^{n+1}$.

I understand the concepts in the solution. For example, I understand why the rank is constantly equal to $1$, since the Jacobian matrix of $f$ has only one row, and we drop the point $\{0\}$ since at that point the matrix will become the zero matrix. 
I also understand that $S^{n}=f^{-1}(1)$, since $S^{n}=\{(x_{1},x_{2},\dotsc,x_{n+1})\in \Bbb{R}^{n+1}\mid \sum_{i=1}^{n+1} (x_{i})^2 =1\}$. 
However, I don't understand why all of those induce the result that $S^{n}$ is a closed embedded submanifold of $\Bbb{R}^{n+1}$.
Any explanations are appreciated!
 A: This is in fact a theorem, known sometimes as the preimage theorem.
If $f:M  \to N$ is a smooth map between manfiolds of dimension $m \geq n$, and if $y \in \mathbb N$ is a regular value, then $f^{-1}(y) \subset M$ is a smooth manifold of dimension $m-n$.
You can find a proof in "Topology from a differential viewpoint page 11.
The idea is that the derivative is a surjectve linear map, so its kernel is some $m-n$ dimensional vector space. Take a linear map $\mathbb R^k \to \mathbb R^{m-n}$ that is nonsingular on the kernel, and define $F:M \to N \times \mathbb R^{m-n}$ given by $F(x)=(f(x),L(x))$, whose derivative is nonsingular, and note that it maps some neighborhood $U_x$ diffeomorphically onto a neighborhood of $(y,L(x))$. Tehn $f^{-1}(y)$ will just be a hyperplane in $y \times \mathbb R^{n-1}$.
Anyhow, this specializes to your case, since you have a map $f: \mathbb R^n \to \mathbb R$, and you're taking a preimage of $1 \in \mathbb R$, so you get a smooth manifold of dimension $n-1$.
