Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Metric spaces

  1. Nov 30, 2005 #1
    I'm working on this problem:
    If t(P,Q)=max(|x1 - x2|,|y1 - y2|), show that t is a metric for the set of all ordered pairs of real numbers.
    I have proved the first three parts of the definition of a metric
    1) t(P,Q) >0
    2) t(P,Q) =0 IFF P=Q
    3) t(P,Q) = t(Q,P)
    all not so hard.
    I'm having trouble getting started on the 4th part:
    4) t(P,Q) <= t(P,R) + t(R,Q)

    My confusion lies in where, exactly, I'm trying to go.
    I wrote: Let R=|z1-z2|
    It appears that I need to go for something that looks like this:
    max(|x1 - x2|,|y1 -y2|)<=max(|x1 - x2|,|z1-z2|)+max(|y1 -y2|,|z1-z2|)
    So I did this:
    t(P,Q)=max(|x1 - x2|,|y1 -y2|)=max(|x1-z1+z1-x2|,|y1+z2-z2+y2|)
    now, I could group x1-z1 and z1-x2, together and do the same thing with the second part, but I don't see how this is going to get me any closer to proving that this is a metric. I know I'm just having a block on something. What I have done doesn't seem right, and I don't know which way to go.
    Any nudges in the right direction will be greatly appreciated.
  2. jcsd
  3. Nov 30, 2005 #2

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    This is presumably a metric on R^2?

    Just do it case by case if you must ie suppose that d(x,y) = |x_1 - y_1|, there are only 8 cases to check.
  4. Nov 30, 2005 #3


    User Avatar
    Science Advisor
    Homework Helper

    Correct, that's the triangle inequality. The distance from point P to point Q should be smaller or equal to the sum of distances if you go via some other point R.

    So you are given three numbers [itex]a=|x_1-x_2|, b=|y_1-y_2|, c=|z_1-z_2|[/itex]. And you need to show that max(a,b)<=max(a,c)+max(b,c).
    It's not difficult if you realize that max(a,c) is larger or equal than a and max(b,c) is larger or equal to b.
  5. Nov 30, 2005 #4


    User Avatar
    Homework Helper

    This way will get you all eight or so cases at once

    This way will get you all eight or so cases at once:

    Let a,b,c>0 be defined by [itex]a=|x_1-x_2|, b=|y_1-y_2|, c=|z_1-z_2|[/itex].

    Note that:

    [tex]\mbox{max}(x,y)=\frac{1}{2}\left(x+y+\sqrt{\left(x-y\right) ^2}\right)[/tex]

    (for a reference to this, see here.

    and recall that

    [tex]\mbox{(i) } \left| x - y\right| \leq \left| x\right| + \left| y\right| ,[/tex]

    and note that the obvious statement [itex]k\leq \left| k\right| \mbox{ for any }k\in\mathbb{R}[/itex] with [itex]k=\left| x\right| - \left| y\right| [/itex] yields

    [tex]\mbox{(ii) } \left| x\right| - \left| y\right| \leq \left| \left| x\right| - \left| y\right| \right| [/tex]

    this implies

    [tex]\mbox{(iii) } \left| x\right| \leq \left| \left| x\right| - \left| y\right| \right| + \left| y\right| [/tex]

    since a,b,c>0, by (i) we have

    [tex]\mbox{(1) } \left| a - b\right| \leq a + b[/tex],

    and by (iii) (twice) we have

    [tex]\mbox{(2) }a \leq \left| a-c\right| +c,[/tex]


    [tex]\mbox{(3) }b \leq \left| b-c\right| +c[/tex]

    Adding (2) and (3) gives

    [tex]\mbox{(4) }a+b \leq 2c + \left| a-c\right| + \left| b-c\right| [/tex]

    Combining (1) and (4) gives

    [tex]\mbox{(5) } \left| a - b\right| \leq 2c + \left| a-c\right| + \left| b-c\right| [/tex]

    add (a+b) to both sides of (5) to get

    [tex]\mbox{(6) }a+b+ \left| a - b\right| \leq a+c + \left| a-c\right| + c+b+\left| b-c\right| [/tex]

    then multiply by both sides 0f (6) by 1/2 and replace

    [tex]\left| a - b\right| ,\left| a-c\right| , \left| b-c\right| [/tex]


    [tex]\sqrt{\left( a - b\right) ^2} ,\sqrt{\left( a -c\right) ^2} ,\sqrt{\left( c - b\right) ^2} ,[/tex]

    respectively, which, when restated in terms of the equation for max(x,y) given above, gives the required inequality, namely

    [tex]\mbox{max}(a,b) \leq \mbox{max}(a,c) + \mbox{max}(c,b)[/tex]

    But its kinda, well, long.
    Last edited: Nov 30, 2005
  6. Nov 30, 2005 #5
    Not as long as mine!
    That's AWESOME!
    I did the 8 cases all super rigorus becuase my professor likes it like that, even though it feels like monkey work repeating the same thing over and over....I knew about that max formula, but I didn't think to apply it like that. VERY VERY cool.
  7. Dec 1, 2005 #6


    User Avatar
    Science Advisor
    Homework Helper

    Eh? But it's just a 1 line proof!
    Since [itex]\max(a,c)\geq a[/itex] and [itex]\max(b,c)\geq b[/itex] the sum is greater than or equal to both a and b and thus greater than or equal to [itex]\max(a,b)[/itex].

    EDIT: You have to use the fact that a,b,c are positive. So I guess that makes it 2 lines. Oh well.
    Last edited: Dec 1, 2005
  8. Dec 3, 2005 #7


    User Avatar
    Homework Helper

    Nice one Galileo!

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook