Composition of Distance-Preserving Mappings is Distance-Preserving

Theorem
Let:
 * $\struct{X_1, d_1}$
 * $\struct{X_2, d_2}$
 * $\struct{X_3, d_3}$

be metric spaces.

Let:
 * $\phi: \struct{X_1, d_1} \to \struct{X_2, d_2}$
 * $\psi: \struct{X_2, d_2} \to \struct{X_3, d_3}$

be distance-preserving mappings.

Then the composite of $\phi$ and $\psi$ is also a distance-preserving mapping.

Proof
Let $x,y \in X_1$ then:

By the definition of a distance-preserving mapping then $\psi \circ \phi$ is distance-preserving.