Discrete metric is a metric

  • #1
317
26

Homework Statement


Let ##x,y\in X## such that ##X## is a metric space. Let ##d(x,y)=0## if and only if ##x=y## and ##d(x,y)=1## if and only if ##x\neq y##

Homework Equations


N/A

The Attempt at a Solution


I have already seen various approaches in proving this. Although, I just want to know if this approach of mine is also valid.

Proof:
We want to show that ##\forall x,y,z\in X##, ##d(x,y)\leq d(x,z)+d(z,y)##.
If ##d(x,z)=1##, then ##1\leq d(x,z)+d(z,y)\leq 2##. But since ##0\leq d(x,y)\leq 1##, then ##d(x,y)\leq 1\leq d(x,z)+d(z,y)\leq 2##. However, if ##d(x,z)=0=d(z,y)##, then ##d(x,y)=0=d(x,z)+d(z,y)##. Hence, the result follows.
 
  • #2

Homework Statement


Let ##x,y\in X## such that ##X## is a metric space. Let ##d(x,y)=0## if and only if ##x=y## and ##d(x,y)=1## if and only if ##x\neq y##

Homework Equations


N/A

The Attempt at a Solution


I have already seen various approaches in proving this. Although, I just want to know if this approach of mine is also valid.

Proof:
We want to show that ##\forall x,y,z\in X##, ##d(x,y)\leq d(x,z)+d(z,y)##.
If ##d(x,z)=1##, then ##1\leq d(x,z)+d(z,y)\leq 2##. But since ##0\leq d(x,y)\leq 1##, then ##d(x,y)\leq 1\leq d(x,z)+d(z,y)\leq 2##. However, if ##d(x,z)=0=d(z,y)##, then ##d(x,y)=0=d(x,z)+d(z,y)##. Hence, the result follows.
Not really a lot to say. If you consider all cases, you are done. Seems like you did that, so you are fine.
 
  • #3
Not really a lot to say. If you consider all cases, you are done. Seems like you did that, so you are fine.
Thanks! I had it on an exam earlier, just couldn't get my head off it if I got it right or not. lol.
 

Suggested for: Discrete metric is a metric

Replies
3
Views
714
Replies
16
Views
615
Replies
15
Views
1K
Replies
1
Views
1K
Replies
7
Views
1K
Back
Top