[proofplan]
We verify the three axioms of an equivalence relation — reflexivity, symmetry, and transitivity — directly from the definition of homotopy. Reflexivity uses the constant homotopy; symmetry reverses the parameter; transitivity concatenates two homotopies by reparametrising to run each at double speed on its half of the interval. The only subtlety is verifying continuity of the concatenated map at the gluing point $t = \tfrac{1}{2}$, which follows from the pasting lemma.
[/proofplan]
[step:Verify reflexivity via the constant homotopy]
Let $f: X \to Y$ be continuous. Define
\begin{align*}
F: [0,1] \times X &\to Y \\
(t, x) &\mapsto f(x).
\end{align*}
Then $F$ is continuous (it is the composition $[0,1] \times X \xrightarrow{\pi_X} X \xrightarrow{f} Y$, where $\pi_X$ is the projection). Moreover $F(0, x) = f(x)$ and $F(1, x) = f(x)$ for all $x \in X$, so $F$ is a homotopy from $f$ to $f$. Hence $f \simeq f$.
[/step]
[step:Verify symmetry by reversing the homotopy parameter]
Suppose $f_0 \simeq f_1$ via a homotopy $F: [0,1] \times X \to Y$ with $F(0, \cdot) = f_0$ and $F(1, \cdot) = f_1$. Define
\begin{align*}
G: [0,1] \times X &\to Y \\
(t, x) &\mapsto F(1 - t, x).
\end{align*}
The map $G$ is continuous: it is the composition $F \circ (\rho \times \operatorname{id}_X)$, where $\rho: [0,1] \to [0,1]$ is the continuous map $t \mapsto 1 - t$. We verify: $G(0, x) = F(1, x) = f_1(x)$ and $G(1, x) = F(0, x) = f_0(x)$. Hence $G$ is a homotopy from $f_1$ to $f_0$, so $f_1 \simeq f_0$.
[/step]
[step:Verify transitivity by concatenating homotopies via the pasting lemma]
Suppose $f_0 \simeq f_1$ via $F: [0,1] \times X \to Y$ and $f_1 \simeq f_2$ via $G: [0,1] \times X \to Y$. Define
\begin{align*}
H: [0,1] \times X &\to Y \\
(t, x) &\mapsto \begin{cases} F(2t, x) & 0 \le t \le \tfrac{1}{2}, \\ G(2t - 1, x) & \tfrac{1}{2} \le t \le 1. \end{cases}
\end{align*}
We verify that $H$ is well-defined and continuous.
**Well-definedness at $t = \tfrac{1}{2}$.** At $t = \tfrac{1}{2}$, the first branch gives $F(1, x) = f_1(x)$ and the second branch gives $G(0, x) = f_1(x)$. The two definitions agree for every $x \in X$.
**Continuity.** The sets $A = [0, \tfrac{1}{2}] \times X$ and $B = [\tfrac{1}{2}, 1] \times X$ are closed subsets of $[0,1] \times X$ whose union is $[0,1] \times X$. On $A$, the map $H$ equals the composition $(t, x) \mapsto F(2t, x)$, which is continuous since $F$ is continuous and $t \mapsto 2t$ is continuous. On $B$, the map $H$ equals the composition $(t, x) \mapsto G(2t - 1, x)$, which is likewise continuous. Since $H|_A$ and $H|_B$ are continuous and agree on the closed overlap $A \cap B = \{\tfrac{1}{2}\} \times X$, the [Pasting Lemma](/theorems/???) implies that $H$ is continuous on $A \cup B = [0,1] \times X$.
**Boundary values.** $H(0, x) = F(0, x) = f_0(x)$ and $H(1, x) = G(1, x) = f_2(x)$. Hence $H$ is a homotopy from $f_0$ to $f_2$, so $f_0 \simeq f_2$.
[guided]
We want to build a homotopy from $f_0$ to $f_2$ by "running $F$ first, then $G$". The idea is to traverse the first homotopy $F$ during $t \in [0, \tfrac{1}{2}]$ and the second homotopy $G$ during $t \in [\tfrac{1}{2}, 1]$, reparametrising each to run at double speed so they each occupy half the interval.
Concretely, define
\begin{align*}
H: [0,1] \times X &\to Y \\
(t, x) &\mapsto \begin{cases} F(2t, x) & 0 \le t \le \tfrac{1}{2}, \\ G(2t - 1, x) & \tfrac{1}{2} \le t \le 1. \end{cases}
\end{align*}
**Why is $H$ well-defined?** At the gluing point $t = \tfrac{1}{2}$, the first branch evaluates to $F(1, x) = f_1(x)$ and the second to $G(0, x) = f_1(x)$. These agree precisely because $F$ ends at $f_1$ and $G$ starts at $f_1$.
**Why is $H$ continuous?** This is where the [Pasting Lemma](/theorems/???) enters. The domain $[0,1] \times X$ is covered by the two closed sets $A = [0, \tfrac{1}{2}] \times X$ and $B = [\tfrac{1}{2}, 1] \times X$. On each piece, $H$ is continuous: on $A$ it is the composition $(t, x) \mapsto (2t, x) \mapsto F(2t, x)$ (both maps continuous), and on $B$ it is $(t, x) \mapsto (2t - 1, x) \mapsto G(2t - 1, x)$. Since $H|_A$ and $H|_B$ agree on the closed overlap $A \cap B = \{\tfrac{1}{2}\} \times X$, the pasting lemma guarantees that $H$ is continuous on all of $[0,1] \times X$.
Finally, $H(0, x) = F(0, x) = f_0(x)$ and $H(1, x) = G(1, x) = f_2(x)$, so $H$ is a homotopy from $f_0$ to $f_2$.
[/guided]
[/step]
[step:Conclude that homotopy is an equivalence relation]
We have verified reflexivity ($f \simeq f$), symmetry ($f_0 \simeq f_1 \implies f_1 \simeq f_0$), and transitivity ($f_0 \simeq f_1$ and $f_1 \simeq f_2 \implies f_0 \simeq f_2$). Therefore $\simeq$ is an equivalence relation on the set of continuous maps $X \to Y$.
[/step]