Tuesday, February 03, 2009

Triangle Inequality

Definition 1: Absolute Value

abs(a) = a if a is nonnegative or abs(a)=-a if a is negative.

So for example:

abs(5) = 5

abs(0) = 0

abs(-1) = 1

Now, let's look at some basic properties

Lemma 1: abs(ab) = abs(a)*abs(b)


Case I: both a,b positive

abs(ab) = ab = abs(a)*abs(b)

Case II: both a,b negative

abs(ab) = ab = (-a)*(-b) = abs(a)*abs(b)

Case III: one negative, one positive

Assume a is positive, b is negative (since a,b are symmetrical, we can switch them as necessary)

abs(ab) = -ab = a*(-b) = abs(a)*abs(b)


Lemma 2: -abs(a) ≤ a ≤ abs(a)


Case I: a is nonnegative

-a ≤ a ≤ a


-abs(a) ≤ a ≤ abs(a)

Case II: a is negative

a ≤ a ≤ -a


-abs(a) ≤ a ≤ abs(a)


Lemma 3: abs(a) ≤ b if and only if -b ≤ a and a ≤ b.


(1) Assume abs(a) ≤ b

Case I: a is nonnegative

abs(a) = a

Since abs(a) ≤ b, it follows that a ≤ b and b is nonnegative

Since b is nonnegative and a is nonnegative, then it -b ≤ a.

Case II: a is negative

Since abs(a) ≤ b, it follows that -a ≤ b which is the same as -b ≤ a and therefore b must be nonnegative.

Since b is nonnegative, it follows that a ≤ b.

(2) Assume that -b ≤ a and a ≤ b.

Case I: a is nonnegative

Since a ≤ b, it follows that b is nonnegative

So abs(a) ≤ b.

Case II: a is negative

Since -b ≤ a, it follows that b ≥ -a.

Since a is negative, -a is positive, and we have:

abs(a) ≤ b.


Lemma 4: Triangle Inequality

For all real numbers a,b

abs(a + b) ≤ abs(a) + abs(b)


(1) For all real numbers a,b (from Lemma 1 above)

-abs(a) ≤ a ≤ abs(a)

-abs(b) ≤ b ≤ abs(b)

(2) Adding these two conditions together gives us:

-[abs(a) + abs(b)] ≤ a + b ≤ abs(a) + abs(b)

(3) Let c = a+b and d =abs(a) + abs(b)

(4) Using Lemma 3, we know that:

abs(c) ≤ d if and only if -d ≤ c and c ≤ d.

(5) But using step #2, we know that:

-d = -[abs(a) + abs(b)] ≤ c = a + b


c = a + b ≤ d = abs(a) + abs(b)

(6) So, using step #4 we get:

abs(c) ≤ d

which is equivalent to:

abs(a + b) ≤ abs(a) + abs(b)



Nicolai Hähnle said...

Dear Larry

I randomly stumbled across your blog while searching for places to link to for explanations of some basic mathematical concepts.

Generally, I like the range of topics you cover, but I do have some stylistic criticism / suggestion:

It seems as if you never use pictures in your entries, which is bad in my opinion. It gives the impression of mathematics as an extremely dry subject.

I'm commenting here because a posting on the Triangle Inequality is literally screaming at least for a picture of a triangle visualizing the statement of the triangle inequality. Even that simple addition would already raise the quality significantly.

Obviously I do not know your intentions in writing this blog, and I do know that creating pictures can be a time consuming task, so I'm not really complaining. We all live in a free world. All I'm saying is that I would link to some of your entries occasionally if the presentation style were more accessible.

So, this is really only meant as a heads up - do with it whatever you like.


Larry Freeman said...

Hi Nicolai,

Thanks very much for your comment!

I am excited that you take my blog so seriously that you have made your suggestion.

I agree with you that pictures would be a big improvement.

The challenge comes down to finding pictures that are not protected by copyright that will add to the blog.

I am not very artistic and that is the main reason that there are no pictures.

There are some wonderful math sites that include pictures including cut-the-knot.org, mathworld, and of course, Wikipedia.

I do use graphics for proofs about geometry. As I have time, I'll start adding more visualizations to my explanations.



Miles said...

Has helped me, a beginner, with understanding so much, you wouldn't believe it. thanks

ali said...

Thank you so much for Lemma 3.

All the proof I reviewed in the net they skip the Lemma 3 .

renaissancelad said...

Does this hold true for complex numbers? having a good time visualizing this thanks for not posting pictures I don't want to be lazy and not use my imagination;)