# Homework Help: Generalized triangle inequality

1. Aug 15, 2012

### CyberShot

1. The problem statement, all variables and given/known data

Show that

|x_1 + x_2 + · · · + x_n | ≤ |x_1 | + |x_2 | + · · · + |x_n |

for any numbers x_1 , x_2 , . . . , x_n

2. Relevant equations

|x_1 + x_2| ≤ |x_1| + |x_2| (Triangle inequality)

3. The attempt at a solution

I tried using the principle of induction here, but to no avail.

Can I induct on the basis |x_1| ≤ |x_1| ?

2. Aug 15, 2012

### gabbagabbahey

Hint: $| x_1+x_2 + x_3 | \leq |x_1 + x_2| + | x_3 |$

3. Aug 15, 2012

### CyberShot

so I can write |x_1 + x_2 + x_3| ≤ |x_1| + |x_2| + |x_3|

since |x_1 + x_2| ≤ |x_1| + |x_2|

but how do I cover all the "n" cases?

4. Aug 15, 2012

### gabbagabbahey

Use the inductive principle... assume that $| \sum_{i=1}^n x_i| \leq \sum_{i=1}^n |x_i|$ for some some $n=k$ (it is obviously true for n=1, 2 and 3) , and then show that it must then also be true for $n=k + 1$.

5. Aug 15, 2012

### Ray Vickson

You can use the easily-proven fact that the absolute-value function is convex, in the sense that f(x) satisfies $f(\alpha w_1 + (1-\alpha)w_2) \leq \alpha f(w_1) + (1-\alpha) f(w_2)$ for all $\alpha \in [0,1].$ Try to prove that
$$\left| \frac{x_1 + x_2 + \cdots + x_n}{n}\right| \leq \frac{1}{n}|x_1| + \cdots + \frac{1}{n} |x_n|.$$ Hint: induction.

RGV