How Can You Prove the Triangle Inequality Using Case Analysis in Discrete Math?

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 6K views
cameron_c83
Messages
2
Reaction score
0
Discrete Math -- Proof methods

Homework Statement



Prove |x-y| ≤ |x| + |y| for all real numbers x and y (where |x| represents the
absolute value of x, which equals x if x≥0 and equals -x if x<0). prove by cases


Homework Equations





The Attempt at a Solution


 
Physics news on Phys.org


Well, how many cases are there? You have cases for x [itex]\geq[/itex]0 and x < 0, as well as the same for y. There seems to be 4 cases to work with...
 


okay u right I should have postd my notes, but I wasnt sure so here it is :

1) x positive and y positive
2) x negitive and y positive
3) x positive and y negitive
4) x negitive and y negitive


case 1) p1 → q ,,, x-y ≤ x+y is true ,, for example 6-(+3) ≤ 6 + 3
case 2) p2 → q ,,, -x-y ≤ -x+y is true,, for example -6 - +3 ≤ -6 + 3
case 3) p3 → q ,,, x - (-y) ≤ x + (-y) is false ,,, for example 6 -(-3) = 9 and 6 +(-3) = 3
case 4) p4 → q ,,, -x-(-y) ≤ -x+(-y) is false ,,, for example -6 - (-3) = -3 and -6 + -3 = -9

so here are 4 cases and all possibilities,
please let me know what is wrong .
 


cameron_c83 said:
okay u right I should have postd my notes, but I wasnt sure so here it is :

1) x positive and y positive
2) x negitive and y positive
3) x positive and y negitive
4) x negitive and y negitive


case 1) p1 → q ,,, x-y ≤ x+y is true ,, for example 6-(+3) ≤ 6 + 3
Just posting an example does not prove it is true for all positive x and y.
case 2) p2 → q ,,, -x-y ≤ -x+y is true,, for example -6 - +3 ≤ -6 + 3
case 3) p3 → q ,,, x - (-y) ≤ x + (-y) is false ,,, for example 6 -(-3) = 9 and 6 +(-3) = 3
If x= 6, y= -3, |x+ y|= |6-(-3)|= 9 |x|+ |y|= 6+ 3= 9, NOT 6+(-3). [itex]|x-y|\le |x|+ |y|[/itex] is true in this example.

case 4) p4 → q ,,, -x-(-y) ≤ -x+(-y) is false ,,, for example -6 - (-3) = -3 and -6 + -3 = -9
If x= -6 and y= -3, then |x- y|= |-6-(-3)|= |-3|= 3 while |x|+ |y|= 6+ 3= 9. 3< 9. No, [itex]|x- y|\le |x|+ |y|[/itex] is true in this example. You are consistently forgetting the absolute values on the right side.

But "prove by cases" does not mean give examples! Examples cannot prove anything.

For example, if [itex]x\ge 0[/itex] and [itex]y\ge 0[/itex], in order to look at |x- y| we still have to consider two more cases:
1) x> y. Then |x- y|= x- y which is smaller than x. But |x|+ |y| is greater than x: [itex]|x- y|\le |x|\le |x|+ |y|[/itex].
2) y> x. Then |x- y|= |y- x|= y- x which is smaller than y. But |x|+ |y| is greater than y: [itex]|x- y|\le y\le |x|+ |y|.<br /> <br /> <blockquote data-attributes="" data-quote="" data-source="" class="bbCodeBlock bbCodeBlock--expandable bbCodeBlock--quote js-expandWatch"> <div class="bbCodeBlock-content"> <div class="bbCodeBlock-expandContent js-expandContent "> so here are 4 cases and all possibilities, <br /> please let me know what is wrong . </div> </div> </blockquote>[/itex]