Definition:Homotopy

Definition
Let $X$ and $Y$ be topological spaces.

Let $f: X \to Y$, $g: X \to Y$ be continuous mappings.

Then $f$ and $g$ are homotopic or freely homotopic if there exists a continuous mapping:
 * $H: X \times \left[{0 \,.\,.\, 1}\right] \to Y$

such that:
 * $H \left({x, 0}\right) = f \left({x}\right)$

and:
 * $H \left({x, 1}\right) = g \left({x}\right)$

$H$ is called a homotopy between $f$ and $g$.

Relative Homotopy
Let $X$ and $Y$ be topological spaces.

Let $K \subseteq X$ be a subset of $X$.

Let $f: X \to Y$, $g: X \to Y$ be continuous mappings.

We say that $f$ and $g$ a homotopic relative to $K$ if there exists a homotopy $H$ between $f$ and $g$, and:
 * 1) For all $x \in K$, $f(x) = g(x)$
 * 2) For all $x \in K$ and all $t \in [0,1]$, $H(x,t) = f(x)$

Trivially, if $K = \emptyset$, then 1. and 2. are vacuous truths, so relative homotopy generalises free homotopy.

Also see

 * Homotopy Class
 * Smooth Homotopy