# Is this a viable metric over an infinite product of metric spaces?

I have the following problem that I wish to solve. Let $(X_i,d_i), i \in \mathbb{N}$ be a collection of metric spaces. We consider the infinite product $X=\Pi_{i \in \mathbb{N}} X_i$.

My goal is to define a metric on this space. What I did was take $d(x,y) = max_{i \in \mathbb{N}} (d_i(x_i,y_i))$ as my metric on the space $X$. This satisfies all the necessary properties of a metric, but is it well defined to take a max like this? There are some other metrics I could think of but they seem less clean than this one.

Any help appreciated.

No, it is not viable, since $max(d(x_i,y_i)$ can be infinite. Take $X_i=\mathbb{R}$, $x_i=i, y_i=0$, you have $d(x_i,y_i)=i$.
you could also do something like \begin{align}d(x,y) = \sum_{i\in\mathbb{N}} a_i\frac{d(x_i,y_i)}{1+d(x_i,y_i)} \end{align} where $(a_i)_{i\in\mathbb{N}}$ is positive and satisfies $\sum_{i\in\mathbb{N}} a_i < +\infty$. For example $a_i = 2^{-i}$.
This prevents the concern of Tsemo Aristide in his answer, since \begin{align*} \frac{d(x_i,y_i)}{1+d(x_i,y_i)} \leq 1. \end{align*} Additionally $\frac{d(x_i,y_i)}{1+d(x_i,y_i)}$ is still a metrix on $X_i$ which provides the same topology on $X_i$.