# Math: Proof of triangle inequality

Discussion in 'Physics & Math' started by kingwinner, Sep 14, 2006.

1. ### kingwinnerRegistered Senior Member

Messages:
796
Proof of triangle inequality:

(a+b)^2 = a^2+2ab+b^2 < or = |a|^2 + 2|a||b|+|b|^2 = (|a| + |b|)^2
Taking the square root of both sides and remember that |x|=square root of (x^2), we can prove that |a+b| < or = |a| + |b| (Triangle inequality)
=================================

This is the proof given in my text book, but the terrible thing is that I don't get the first line of the proof after reading it over many times.

Q1) Why can you say that a^2+2ab+b^2 < or = |a|^2 + 2|a||b|+|b|^2 is true?

Q2) I know that a^2 + 2ab + b^2 = (a+b)^2 with the absolute value signs. But is it true that |a|^2 + 2|a||b|+|b|^2 = (|a| + |b|)^2 ? Will the absolute values make any difference?

I hope someone can explain them to me! Any help is appreciated.

2. ### Google AdSenseGuest Advertisement

to hide all adverts.
3. ### catoless hate, more scienceRegistered Senior Member

Messages:
2,959
Q1) I am not the best at this type of math, but I would think that they are guarding against imaginary numbers (square root of a negative). if, say a=squrt(-10^100), and b=1, the left would be a whole lot less than the right.

4. ### Google AdSenseGuest Advertisement

to hide all adverts.
5. ### catoless hate, more scienceRegistered Senior Member

Messages:
2,959
Q2) I think the second part is true, and the absolute value bars will make a difference in special cases like imaginary values

6. ### Google AdSenseGuest Advertisement

to hide all adverts.
7. ### przyksquishyValued Senior Member

Messages:
3,171
Assuming we're working in the reals:
Hint: a<sup>2</sup> = |a|<sup>2</sup>. You can then deal with the different cases, where a and b are positive or negative, one at a time.
Yes, it's just a variable substitution. You're substituting x = |a| and y = |b| into the expansion for (x + y)<sup>2</sup>.

Last edited: Sep 14, 2006
8. ### §outh§taris feeling causticRegistered Senior Member

Messages:
4,832
-|a| <= a <= |a|
-|b| <= b <= |b|

add the two together to get

|a + b| <= |a| + |b|

You can use the cauchy schwarz inequality to prove the triangle inequality for vectors too.

9. ### quadraphonicsBloodthirsty BarbarianValued Senior Member

Messages:
9,391
The way this problem is phrased implies that a and b are real. If either were complex, the term (a+b)^2 would be complex, in which case the inequality (as written) isn't defined. Under the assumption of a and b real, |a|^2 = a^2 and |b|^2 = b^2, and ab must equal either -|a||b| or |a||b|, both of which are <= |a||b| . These make the proof pretty trivial.

A more interesting case is when a and b are allowed to be complex. In that case, the triangle inequality would be written |a+b| <= |a| + |b|, which we can then convert to |a+b|^2 < (|a| + |b|)^2. Note that (a+b)^2 != |a+b|^2 when a and b are complex. The proof procedes in the same basic way (where * denotes complex conjugate):

|a+b|^2 = (a+b)(a+b)* = |a|^2 + ab* + a*b + |b|^2 = |a|^2 + 2Re(ab) + |b|^2

where Re(ab) denotes the real part of ab, which is <= |a||b|, leading to the desired result.

More interesting still is the case when a and b are vectors or, better yet, functions.