# How to prove that the metric $d=\sup \lbrace d_i(x_i,y_i) \rbrace$ satisfy the triangle inequality?

Let $$(X_i , d_i), i ∈ \Bbb N$$, be a collection of metric spaces. Here $$x = (x_1, . . . , x_n)$$ and $$y = (y_1, . . . , y_n)$$ are elements of $$\prod_{i \in \Bbb N} X_i.$$

Define the metric $$d(x,y)=\sup \lbrace d_i(x_i,y_i) \rbrace$$ on the infinite product $$\prod_{i \in \Bbb N} X_i.$$

My question is how to prove that the metric $$d(x,y)=\sup \lbrace d_i(x_i,y_i) \rbrace$$ satisfy the triangle inequality? Can I ask for someone's help? Thanks so much.

• So does one allow $\infty$ as a possible value of $d(x,y)$ when the sup is not finite? Commented Mar 24, 2017 at 15:06
• In your example of $x,y$ each one has only $n$ coordinates, making it seem they lie in a finite product, not an infinite product over $i \in \mathbb{N}.$ Commented Mar 24, 2017 at 15:45
• @coffeemath I realized there might be a problem here. I asked a new one:math.stackexchange.com/questions/2201440/….
– user369792
Commented Mar 24, 2017 at 15:58

For every $i$ we have $d_i(x_i,x_i)+d_i(y_i,y_i) \ge d_i(x_i+y_i,x_i+y_i)$ because metric space $X_i,d_i$ satisfies triangle inequality.
Suppose that : $\sup \lbrace d_i(x_i,x_i) \rbrace +\sup \lbrace d_i(y_i,y_i) \rbrace \lt \sup \lbrace d_i(x_i+y_i,x_i+y_i) \rbrace$. That would mean that for some $i$ : $d_i(x_i,x_i) + d_i(y_i,y_i) \lt d_i(x_i+y_i,x_i+y_i)$. This contradicts with the fact that the triangle inequality is valid in all spaces $X_i$ individually.
• Thanks so much for your answer. I just realized there might be a problem here because $sup$ cannot be infinite. So I asked a new question here:math.stackexchange.com/questions/2201440/…