(Couldn't find it here, if it is duplicated I'm sorry)
Given that $(X_1,d_1),\cdots,(X_n,d_n)$ are metric spaces. Define the function $q: \prod\limits_{i=1}^nX_i \times \prod \limits_{i=1}^nX_i \to[0,\infty)$ by $$q(x,y)=(\sum\limits_{i=1}^nd_i(x_i,y_i)^2)^{\frac{1}{2}}$$
Then prove that $q$ is a metric in $\prod \limits_{i=1}^nX_i $.
I'm stuck on prooving that $q$ satisfy tha triangle inequality.
I know that $q_1(x,y)=\sum\limits_{i=1}^nd_i(x_i,y_i)$ is a metric. Using this, I can prove that for all $x,y$ such that $d_i(x_i,y_i)\leq1 \ \forall i$ we have $q(x,y)\leq \sqrt{q_1(x,y)}$ and we're done because square root is subadditive. But I don't think I could do this for all other $x,y$ in a similar way.
Could you helpe me? Thank's in advance!