Relative homology and deformation retraction I was reading Hatcher's, and I thought of something that should be obvious but had difficulty proving it.
Suppose X is a topological space, and $A \in X$ and $A$ deformation retracts to $A'$. I would think $H_n(X,A) \cong H_n(X,A')$ for all $n$.
I tried to prove $(X,A)$ and $(X,A')$ are homotopy equivalent. However, although the deformation retraction shows the identity $id: A \rightarrow A$ and the retraction $r: A \rightarrow A'$ are homotopic, I would need to extend the definition on $X$ so that it would be continuous.
Can some one please help me to see if the statement is true, and possibly give a proof or counterexample?
 A: It is not true that $(X, A)$ and $(X, A')$ need be homotopy equivalent, even if $A'$ deformation retracts to $A$. Consider $X = S^1$ and $A = \{1\}$ vs $A' = S^1 \setminus \{-1\}$: the only map $(S^1, A') \to (S^1, A)$ is the constant map sending everything to $1$. These pairs are not homotopy equivalent.
Instead, think about the induced map between long exact sequences of pairs.
A: In his answer user989600 has given the crucial hint: Use the long exact sequences of pairs. Let me add plus the five lemma.
In fact, the following is true:

Lemma : Let $f : (Y,B) \to (Z,C)$ be a map of pairs such that $f : Y \to Z$ and $f \mid_B : B \to C$ are homotopy equivalences. Then $f_* : H_n(Y,B) \to H_n(Z,C)$ is an isomorphism for all $n$.

To prove it, consider
$\require{AMScd}$
\begin{CD}
H_n(B)   @>>> H_n(Y) @>>> H_n(Y,B) @>>> H_{n-1}(B) @>>> H_{n-1}(Y) \\
@V{(f \mid_B )_*}VV @V{f_*}VV  @V{f_*}VV @V{(f \mid_B )_*}VV  @V{f_*}VV \\
H_n(C)   @>>> H_n(Z) @>>> H_n(Z,C) @>>> H_{n-1}(C) @>>> H_{n-1}(Z) \end{CD}
The vertical arrows at positions $1, 2, 4, 5$ are isomorphisms, thus the five lemma applies.
The identity map $id  : X \to X$ gives us a map of pairs $id : (X,A' ) \to (X,A)$ as in the above lemma. Note that all what is needed is that $A' \hookrightarrow A$ is a homotopy equivalence which is a weaker requirement than in your question.
