TITLE: Proof that if $f:S^{n} \to \mathbb{R} $ is continuous, then is not injective
QUESTION [5 upvotes]: 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.

REPLY [4 votes]: 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.