Proof that if $f:S^{n} \to \mathbb{R} $ is continuous, then is not injective I have to prove that if $f:S^{n} \to \mathbb{R} $ (where $S^{n}= \{(x_1, ..., x_{n+1})\in\mathbb{R}^{n+1} |  x_1^2+...+x_{n+1}^2=1\} $ is continuous, then is not injective. If possible, I would like it to be proven by using connectivity arguments.
My attempt: suppose $f$ is injective. Let $p\in f(S^n)$ and, since $f$ is injective, there exists only one $q\in S^n$ such that $f(q)=p$. We consider now $f_{|S^n \setminus\{q\}}:{S^n \setminus\{q\}} \to f(S^n\setminus\{q\})=f(S^n)\setminus\{p\} $, which is continuous and bijective (because $f$ was continuous and injective). Then, since ${S^n \setminus\{q\}}$ is path-connected and $f$ is continuous and exhaustive, we have that $f(S^n)\setminus\{p\}$ is path-connected as well.  Here I would like to use that $\mathbb{R}\setminus \{p\}$ is not path-connected and arrive at a contradiction, but this is wrong.
 A: A different approach. Because $S^n$ is compact and $f$ is continuous, it attains a maximal and a minimal value. Let those be $M$ and $m$. So there exists points $A,B\in S^n$ such that $f(A)=M, f(B)=m$. On $S^n$ there are two disjoint paths, say $\gamma_1$ and $\gamma_2$, from $A$ to $B$ (on $S^1$ you find them by going around the circle in opposite directions, with $n>1$ there is a lot more elbow room).
But, by continuity, $f$ will take all the values in the interval $[m,M]$ on both $\gamma_1$ and $\gamma_2$.
A: Since $S^n$ is compact, if $f$ was injective, it would be a homeomorphism onto $f(S^n)$. But $S^n$ is compact and connected and the only subsets of $\mathbb R$ which are compact and connected are the the intervals $[a,b]$. However, if you remove one point from the middle of this interval, it becomes disconnected. No point of $S^n$ has that property.
A: Define $g(x) = f(x)-f(-x).$ It suffices to show $g=0$ somewhere on $S^n.$ To do this, take any $x_0\in S^n.$ If $g(x_0)=0,$ we're done. If not, then either $g(x_0) > 0$ or $g(x_0) < 0.$ Suppose WLOG $g(x_0) > 0.$ Then $g(-x_0) = -g(x_0) <0.$ Thus $g$ takes on both positive and negative values on $S^n.$ Since $g:S^n \to \mathbb R$ is continuous and $S^n$ is connected, $g=0$ somewhere on $S^n$ by the intermediate value property, and we're done.
