# In any metric space$(M,D)$, prove that $D(a_1,a_n)\leq D(a_1,a_2)+D(a_2,a_3)+\cdots+D(a_{n-1},a_n)$

In any metric space $$(M,D)$$, prove that $$D(a_1,a_n)\leq D(a_1,a_2)+D(a_2,a_3)+\cdots+D(a_{n-1},a_n)$$ for any $$a_1,a_2,a_3,\ldots,a_n \in M$$

how to we approach this problem is we prove by Mathematical Induction

• Just iterate the triangle inequality. – Francesco Polizzi Sep 6 '17 at 15:15
• @FrancescoPolizzi..sorry i did't get can you give me one more step – Inverse Problem Sep 6 '17 at 15:18

For $n=2$, it is trivial.
If it holds for a certain $n$, then\begin{align}D(a_1,a_{n+1})&\leqslant D(a_1,a_n)+D(a_n,a_{n+1})\\&\leqslant D(a_1,a_2)+D(a_2,a_3)+\cdots+D(a_{n-1},a_n)+D(a_n,a_{n+1}).\end{align}