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.
 

Answers and Replies

  • #2
member 587159

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.
 
  • Like
Likes Terrell
  • #3
317
26
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.
 

Related Threads on Discrete metric is a metric

  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
8
Views
2K
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
10
Views
1K
  • Last Post
Replies
5
Views
767
  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
3
Views
3K
  • Last Post
Replies
5
Views
1K
Replies
11
Views
2K
  • Last Post
Replies
6
Views
9K
Top