Given $n$ sets each with metrics, there is a standard way of turning the direct product of the sets into a metric space. In other words, defining a distance on the tuples of elements from the sets.
Let $(A_1, d_1), \dots , (A_n, d_n)$
be metric spaces.
Let $A$ be $\prod_{i = 1}^n A_n$
and let $R$ be the set of real numbers.
Define $d: A \times A \to R$ by
\[
d(a, b) = \max\set{d_1(a_1, b_1), \dots , d_n(a_n, b_n)}.
\]