Let BXB\subseteq X be a subspace of a topological space XX and let AA be an abelian group. The inclusion induces a subcomplex C(B;A)C(X;A)C_\bullet(B;A)\subseteq C_\bullet(X;A). The relative singular chain complex is

C(X,B;A):=C(X;A)/C(B;A),C_\bullet(X,B;A):=C_\bullet(X;A)/C_\bullet(B;A),

and the relative singular homology group is

Hn(X,B;A):=Hn(C(X,B;A)).H_n(X,B;A):=H_n(C_\bullet(X,B;A)).

Thus a relative cycle is a chain in XX whose boundary lies in BB, modulo chains in BB and relative boundaries.

Functoriality and exact sequence

A map of pairs f:(X,B)(Y,D)f:(X,B)\to(Y,D) induces maps on relative homology. The short exact sequence of chain complexes

0C(B;A)C(X;A)C(X,B;A)00\to C_\bullet(B;A)\to C_\bullet(X;A)\to C_\bullet(X,B;A)\to0

gives the long exact sequence of the pair, relating Hn(B;A)H_n(B;A), Hn(X;A)H_n(X;A), and Hn(X,B;A)H_n(X,B;A).

Reference

See Allen Hatcher, Algebraic Topology, Chapter 2, author-hosted book.