Let $X$ be a compact metric space, $A\subset X$ a closed subset and $f:A\to A$ be a continuous map.
Can $f$ be extended to a continuous map $X\to X$?
If so, is there an extension which is injective if $f$ is?
If not, are there handy additional conditions under which it holds?



Extension of continuous map on metric space
Let $G = \langle a,b \mid R \rangle$ be a 1-relator group. To this presentation we obtain a twodimensional CW-complex $X$ by attaching a two cell to $S^1\vee S^1$ via the relator. Let $A=S^1\vee S^1$ be the one skeleton of $X$.


A continuous map $f:A\rightarrow A$ gives us two group elements in $\pi\_1(X)=G$; the images of the generators $a,b$, i.e. the two circles in $A$. Any choice of pairs of group elements arises this way. Extending this map works only if the images satisfy the same relation, and this need not be the case. There are plenty of such one-relator groups.


If we choose for $f:A\rightarrow A$ the injective map that swaps the two circles, and our relator is not symmetric enough in $a,b$, there cannot be an extension of $f$.


