Suppose that $S$ be a set consisting exactly $2$ elements. Suppose we define a function $\displaystyle d:S \times S \to [0,\infty)$ by $\displaystyle d(x,y)=\begin{cases}1 &\text{ , if }x\not=y\\0 &\text{ , if} x=y\end{cases}$

How I can show that $d$ defines a metric on $S$ ?

Problem is on triangular inequality..To prove triangular inequality we need at least three points. How I can show the triangular inequality ?

Same problem for a set consisting only $1$-element or empty set.

What's the idea behind these ?

  • 2
    $\begingroup$ You can pick 3 elements among two, obviously at least two of them will be equal, but that shouldn't bother you. Notice when you prove the triangular inequality for bigger metric spaces, you do not require that the 3 points are different. $\endgroup$ – Smurf Jun 19 '17 at 18:54

The triangle inequality says: $$ \text{For all } x, y, z, \;\; d(x,y) + d(y,z) \ge d(x,z). $$ It may seem like it to you (thinking of it as a triangle), but $x,y,z$ do not have to be distinct. Two of them can be the same point.

However, triangle inequality with two or one point(s) is trivial. For instance, suppose $x = y$. Then the triangle inequality says $$ d(x,x) + d(x,z) \ge d(x,z) $$ which is true merely relying on the fact that $d(x,x) \ge 0$. The same thing happens if $y = z$. Finally if $x = z$, we get $$ d(x,y) + d(y,x) \ge d(x,x), $$ which follows from the other property of a metric space, that $d(x,x) = 0$, and the facts $d(x,y) \ge 0$ and $d(y,x) \ge 0$.

The bottom line: The triangle inequality only says something "interesting" (not implied by the other properties of a metric space) when the three points of the triangle are distinct.

  • 1
    $\begingroup$ A lawyer might write the Triangle Inequality as " For any point, hereinafter called x, and any point hereinafter called y, and notwithstanding that x and y are different names, the point called x and the point called y may or may not be the same point, and any point hereinafter called z..... (etc)" ...or something like that. $\endgroup$ – DanielWainfleet Jun 20 '17 at 5:18

You don't need three points. Here's the statment of the triangular inequality:

$$\forall x,y,z\in S,d(x,z)\le d(x,y)+d(y,z)$$

Remark: This metric is called the discrete metric, and it can be defined on any nonempty set.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.