Find a function that makes the following diagram commutes.
Here is the diagram: For $n \geq 0.$ Find a function $r: \mathbb{R}^{n+1} - \{0\} \rightarrow S^n$ filling in the dotted arrow in the following diagram so that the diagram commutes.
$$\require{AMScd} \begin{CD} S^n @>{id_{S^n}}>> S^n\\ @VVV @VVV \\ \mathbb{R}^{n+1} - \{0\} @>{r}>> S^n \end{CD} $$
Where the first vertical arrow is the inclusion map, the second vertical arrow should not exist but I am not skillful in drawing commutative diagrams. and the arrow that has the function $r$ above it should be dotted line because we are searching for this function $f.$
My guess is:
I can take the function to be $r(x) = \frac{x}{|x|}.$ Is my guess correct? I am not sure why I should divide by $|x|,$ or this part should be adjusted to the $n+1$ norm? I do not know.
Any help will be appreciated!
I guess by $\vert x\vert$ you mean $\Vert x\Vert$.Then your function is alright. You need to divide by $\Vert x\Vert$ only for sake of well definedness.
This proves $S^n$ is a retract of $\Bbb R^{n+1} -\{0\}$.
It is in fact a strong deformation retract.