Triangle inequality

From Maths
Jump to: navigation, search

The triangle inequality takes a few common forms, for example: d(x,z)d(x,y)+d(y,z) (see metric space) of which |xz||xy|+|yz| is a special case.

Another common way of writing it is |a+b||a|+|b|, notice if we set a=xy and b=yz then we get |xy+yz||xy|+|yz| which is just |xz||xy|+|yz|

Definition

The triangle inequality is as follows:

  • |a+b||a|+|b|

Proof

We have 4 cases:

  1. Suppose that a>0 and b>0
    We see immediately that a>0a+b>0+b=b>0 so a+b>0
    • thus |a+b|=a+b
    We also see that |a|=a as a>0
    and that |b|=b for the same reason.
    • thus |a|+|b|=a+b
    • We see that |a+b|=|a|+|b|
      • Notice |a+b|=|a|+|b||a+b||a|+|b| in the literal sense of "if left then right"
        ( denotes logical implication)
  2. Suppose that a>0 and b0
  3. Suppose that a0 and b>0
    • Mathematicians are lazy, as R is a field (an instance of a ring) we know that a+b=b+a (addition is commutative)
    • As ||:RR is a function we know that if x=y then |x|=|y|
    • As, again, R is a ring, we know that |a|+|b|=|b|+|a|
    • So:
      • |a+b|
        =|b+a| by the commutativity of addition on R
        |b|+|a| by the 2nd case (above)
        =|a|+|b| again by commutativity of the real numbers
    • Thus |a+b||a|+|b|
  4. Both a0 and b0

TODO: Finish proof



Reverse Triangle Inequality

This is |a||b||ab|

Proof

Take |a|=|(ab)+b| then by the triangle inequality above:
|(ab)+b||ab|+|b| then |a||ab|+|b| clearly |a||b||ab| as promised

Note

However we see |b||a||ba| but |ba|=|(1)(ab)|=|1||ab|=|ab| thus |b||a||ab| also.

That is both:

  • |a||b||ab|
  • |b||a||ab|

Full form

There is a "full form" of the reverse triangle inequality, it combines the above and looks like: |ab|| |a||b| |

It follows from the properties of absolute value, I don't like this form, I prefer just "swapping" the order of things in the abs value and applying the same result