Thursday, January 22, 2009

Triangle Inequality

One of the basic identity in Mathematics is Triangle Inequality. Unfortunately its proof is not always well motivated and complete in most books. Here is a complete proof with the various lemmas that are required.
Triangle inequality can be stated as follows
abs(x+y) <= abs(x)+abs(y)
Before we prove, lets list the four properties of absolute value
  1. x <= abs(x)
  2. x = sqrt(x^2)
  3. x^2 = (abs(x)) ^2
  4. abs(x)*abs(y) = abs(x*y)

We require one Lemma but to prove it we require the following Lemma
Lemma 1: if 0 <= a < b then a^2 < b^2
Proof Multiply first by a we get
0 < a^2 < a*b
Now multiply by b we get
0 < a*b < b^2
Comparing the two we get
a^2 < b^2

Lemma 2: A^2 <> A < B
Proof: Lets do by contradiction
Assume A >= B
Multiply first by A and then by B we get
A^2 >= A*B and
A*B >= B^2

Coming back to the inequality we start with
(abs(x+y))^2 = (x+y)^2 (ref 3) = x^2 +2*x*y+y^2 (basic algebra)
= (abs(x))^2+2*x*y+(abs(y))^2 <= (abs(x))^2+2*abs(x*y)+(abs(y))^2 (ref 1)
= (abs(x)+abs(y))^2

So we have
(abs(x+y))^2 <= (abs(x)+abs(y))^2 (Lemma 2)
abs(x+y) = (abs(x)+abs(y))

Q.E.D

0 Comments:

Post a Comment

<< Home

Site Meter