How do I compute the projection/closest vector to a subset? I have been thinking about this for far too long without any progress. If it helps, I am working in $\Bbb{R}^2$, but I would like formalue in terms of norms and inner products, if possible.
For context, I am trying to prove that the figure eight is a deformation retract of the doubly punctured plane. And it is annoying that everything hinges on this annoyingly simple question. I have already shown that $\overline{B}(0,1) \setminus \{p,q\}$ is a deformation retraction of $\Bbb{R}^2 \setminus \{p,q\}$, where $p = (-\frac{1}{2},0)$ and $q = (\frac{1}{2},0)$. Now I just need to show that $\overline{B}(0,1) \setminus \{p,q\}$ deformation retracts to the union of the two discs with one centered at $p$, the other centered at $q$, but I am currently facing the obstacle discussed above.
EDIT: It just occurred to me that deformation retraction I had in mind won't be well-defined. Any point on the y-axis contained in $\overline{B}(0,1)$ won't have a unique projection/closest vector in the union of the two open discs contained in $\overline{B}(0,1)$...Hmm..need to rethink my approach...Of course, I wouldn't be opposed to any suggestions!
I do not really understand what you mean by "the projection/closest vector to a subset".
However, I shall explain how to get the desired strong deformation retraction. Let $p_{\pm1}$ denote the points $(\pm1,0) \in \mathbb{R}^2$, let the figure eight be the space $E = S_{+1} \cup S_{-1}$, where $S_{\pm1}$ is the circle around $p_{\pm1}$ with radius $1$ and let the doubly punctured plane be the space $P = \mathbb{R}^2 \setminus \{ p_{+1}, p_{-1} \}$. Define $r : P \to E$ as follows. For $p = (x,y)$ set $$r(p) = \begin{cases} p_{+1} + \dfrac{p - p_{+1}}{\lVert p - p_{+1} \rVert} & \lVert p - p_{+1} \rVert \le 1 \\ p_{-1} + \dfrac{p - p_{-1}}{\lVert p - p_{-1} \rVert} & \lVert p - p_{-1} \rVert \le 1 \\ \dfrac{2xp}{\lVert p \rVert^2} & \lVert p - p_{+1} \rVert \ge 1, p \ne 0, x \ge 0 \\ -\dfrac{2xp}{\lVert p \rVert^2} & \lVert p - p_{-1} \rVert \ge 1, p \ne 0, x \le 0 \end{cases} $$ Here $\lVert - \rVert$ denotes the Euclidean norm $\lVert (x,y) \rVert = \sqrt{x^2+ y^2}$. Note that the denominator $\lVert p - p_{\pm 1} \rVert$ does not vanish on $P$.
What happen geometrically? Let $D_{\pm 1}$ = closed unit disk with center $p_{\pm 1}$, $H_{\pm 1}$ = right/left half plane minus the interior of $D_{\pm 1}$.
The first two lines describe the radial strong deformation retractions from $B_{\pm 1} = D_{\pm 1} \setminus \{ p_{\pm 1} \}$ to $S_{\pm 1}$. In fact, for $p \in B_{\pm 1}$ we have $\lVert r(p) - p_{\pm 1} \rVert = \lVert \dfrac{p - p_{\pm 1}}{\lVert p - p_{\pm 1} \rVert} \rVert = 1$, and for $p \in S_{\pm 1}$ we have $p_{\pm 1} + \dfrac{p - p_{\pm 1}}{\lVert p - p_{\pm 1} \rVert} = p$.
Note that $B_{+1} \cap B_{-1} = \{ 0 \}$. Both line 1 and line 2 yield $r(0) = 0$.
The last two lines (together with $r(0) = 0$) describe strong deformation retractions of $H_{\pm 1}$ to $S_{\pm 1}$. This is done by shifting each point $p \ne 0$ along the line through $0$ and $p$ until it reaches $S_{\pm 1}$. To be formal, this line is given by $l_p(t) = t p$, and for $p \in H_{\pm 1} \setminus \{ 0 \}$ we must find $t$ such that $\lVert t p - p_{\pm 1} \rVert = 1$. Easy computations show $t = \pm \dfrac{2x}{\lVert p \rVert^2}$, and in fact we defined $r(p) = l_p(t) = t p$.
Note that for $p \in Y = H_{+1} \cap H_{-1}$ = $y$-axis = set of points with $x = 0$ we have $r(p) = 0$.
Thus all four lines give us a consistent definition on the whole space $P$. It remains to show that $r \mid_{H_{\pm 1}}$ is continuous in $p = 0$. We have $\lVert p - p_{\pm 1} \rVert \ge 1$, i.e. $(x \mp 1)^2 + y^2 \ge 1$. This is equivalent to $\pm 2x \le x^2 + y^2$ which means $2\lvert x \rvert \le \lVert p \rVert^2$ since $p \in H_{\pm 1}$. Hence $\lVert r(p) \rVert = \dfrac{2 \lvert x \rvert}{\lVert p \rVert} \le \lVert p \rVert$ for $p \ne 0$. This immediately implies continuity.
We now have constructed a retraction $r$. To see that it is a strong deformation retraction, define a homotopy $$H : P \times I \to P, H(p,t) = (1-t)p + tr(p) .$$ It is readily verified that in fact $H(p,t) \ne p_{\pm 1}$ for all $(p,t)$ (check all 4 lines in the definition of $r$). This is a homotopy from $id_P$ to $r$ which is stationary on $E$.