TITLE: Fundamental group of $X = \{(p, q)|p \neq −q\}\subset S^n \times S^n$
QUESTION [5 upvotes]: This problems appears in Chapter 2, exercise 3 from "A Concise Course in Algebraic Topology J. P. May" book.
Let $X = \{(p, q)|p \neq −q\}\subset S^n \times S^n$. Define a map $f:S^n\to X$ by $f(p) = (p, p)$. Prove that $f$ is a homotopy equivalence.
Attempt:
I need a map $g:X\to S^n$ such that $f\circ g\sim 1_X$ and $g\circ f\sim 1_{S^n}$.
I guess such a map is $g=\pi_1$ the first projection. It satisfies $g\circ f= 1_{S^n}$ but I have problems proving that $f\circ \pi_1\sim 1_X$. I can't even draw what is happening in the case $n=1$ (a subset of torus which I can't imagine).
A nice corollary is: The fundamental group of $X$ is trivial when $n>1$ and is $\mathbb{Z}$ when $n=1$.

REPLY [3 votes]: Since I didn't see anybody writing out this rather simple homotopy explicitly:
Consider $S^n$ as the subspace of $\mathbb R^{n+1}$ defined by $\|x\|=1$. We are looking for a homotopy between $f\circ \pi_1$ and $\operatorname{id}_{X}$, where $f\circ \pi_1$ takes $(p,q)$ to $(p,p)$. Since $p\neq -q$ for $(p,q)\in X$, we have a well defined homotopy
\begin{align*}
H \colon X\times I&\longrightarrow X,\\
\big((p,q),t\big) &\longmapsto \left( p, \frac{(1-t)q+tp}{\|(1-t)q+tp\|}\right).
\end{align*}
Note that since $p\neq -q$ the straight line parametrized by $t\mapsto (1-t)q+tp$ does not cross the origin. Continuity of $H$ is now a just a question of continuity of the norm, of taking quotients of continuous functions, etc.
Effectively we are taking a straight line homotopy in the second $S^n$ and projecting it radially onto the sphere, which yields the geodesics described in the other answers.