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!