# Which of the following is a metric on S? d^2 or d^(1/2)

• yxgao
In summary, to prove that d^(1/2) is a metric on a set S, we need to show that d^(1/2)(a,b) = 0 if and only if a=b, d^(1/2)(a,b) is always greater than or equal to 0, and the triangle inequality holds for d^(1/2). While this may not hold for d'=d^2, it can be proven that the triangle inequality does hold for d'=d^(1/2) by completing the square on the right hand side and taking the square root of both sides.

#### yxgao

(For every set S and every metric d on S)

How do you prove this mathematically?

For $$d$$ to be a metric you need to show that:
$$d(a,b) = 0 \iff a=b$$
(which is easy in this case)
$$d(a,b) \geq 0$$
(also easy)
$$d(a,c) \leq d(a,b)+d(b,c)$$
Which is the only one that really needs any looking into in this case.

The does not necessarily hold for $$d'=d^2$$ since if you have $$d(a,b)=1$$ and $$d(b,c)=1$$ and $$d(a,b)=2$$, then the triangle inequality does not hold for $$d'$$.

To prove that the triangle inequality holds for $$d'=d^{\frac{1}{2}}$$, start with the triangle inequality for $$d$$, complete the square on the RHS, and take the square root of both sides.

that makes perfect sense.
thanks

## 1. What is a metric on S?

A metric on S is a function that assigns a non-negative real number to every pair of points in S, satisfying the following conditions:

• The distance between any two points is always non-negative.
• The distance from a point to itself is always 0.
• The distance between any two distinct points is positive.
• The distance from point A to point B is equal to the distance from point B to point A.
• The triangle inequality holds, meaning that the distance from point A to point C is always less than or equal to the sum of the distances from point A to point B and from point B to point C.

## 2. What is the difference between d^2 and d^(1/2)?

d^2 and d^(1/2) are two different ways of representing distance in a metric. d^2 represents the squared distance between two points, while d^(1/2) represents the square root of the distance between two points. In other words, d^2 is the square of d^(1/2), so they both represent the same distance, but in different forms.

## 3. Which metric should I use for my data set?

The choice of metric depends on the nature of your data and the specific application. Generally, d^(1/2) is more commonly used as it is easier to interpret and work with, but there may be cases where d^2 is more suitable. It is important to consider the properties of the metric and how they align with your specific needs.

## 4. Is d^2 or d^(1/2) a better metric?

Neither d^2 nor d^(1/2) can be considered a "better" metric as they both have their own advantages and limitations. It is important to carefully evaluate your data and the properties of each metric to determine which one would be more suitable for your specific application.

## 5. Can I use any other metric on S?

Yes, there are many other metrics that can be used on S. Some common examples include the Euclidean metric, Manhattan metric, and Chebyshev metric. The choice of metric depends on the specific needs and characteristics of your data and the application at hand.