Home Necessary and sufficient conditions for distances on the real line
Article Open Access

Necessary and sufficient conditions for distances on the real line

  • Daniel Cao Labora EMAIL logo , Francisco J. Fernández , F. Adrián F. Tojo and Carlos Villanueva Mariz
Published/Copyright: March 14, 2025

Abstract

When dealing with certain mathematical problems, it is sometimes necessary to show that some function induces a metric on a certain space. When this function is not a well renowned example of a distance, one has to develop very particular arguments that appeal to the concrete expression of the function in order to do so. The main purpose of this work is to provide several sufficient results ensuring that a function of two variables induces a distance on the real line, as well as some necessary conditions, together with several examples that show the applicability of these results. In particular, we show how a hypothesis about the sign of the cross partial derivative of the candidate to distance is helpful for deriving such kind of results.

MSC 2010: 26B99; 51N20; 54E35; 00A08

1 Motivation and introduction

Throughout the rest of the document we will focus on distances on the set of real numbers, d : R 2 R . Thus, it is suitable to recall the definition of distance in the particular case of a distance on R .

Definition 1.1

Given d : R 2 R , we say that d is a metric or distance whenever it fulfills the following three properties simultaneously:

  • Positive definiteness: d ( x , y ) 0 for any x , y R , where d ( x , y ) = 0 if and only if x = y .

  • Symmetry: d ( x , y ) = d ( y , x ) for any x , y R .

  • Triangle inequality: d ( x , y ) + d ( y , z ) d ( x , z ) for any x , y , z R .

If one is given a certain function d : R 2 R and is asked to prove that it is a distance on the real line, it is quite reasonable to proceed as follows. First, the symmetry of d should be quite clear, just by inspecting that d stays invariant when interchanging the roles of x and y . Positive definiteness should also be direct, or sometimes a mere consequence of a tricky factorization of d that shows that the function is a square that only vanishes for x = y . Regarding the triangle inequality, one could try to use the very particular expression of d in order to prove it, or some arguments involving concavity/convexity. However, how to state reasonably general theorems, with easy-to-check hypotheses and that ensure the triangle inequality is fulfilled does not seem immediate. This quest guides the main topic of this study, together with the description of some necessary conditions for d being a metric.

2 Necessary conditions

In this section, we prove some necessary conditions on d : R 2 R , provided that d is a metric. In the rest of the document, Δ R 2 will denote the diagonal of the Cartesian plane, that is,

Δ = { ( x , x ) R 2 : x R } .

Let X { ( x , y ) R 2 : x y } , Y { ( x , y ) R 2 : y x } . Given a function d : R 2 R and ( x , y ) , v R 2 , we will define the directional derivative from the right as

v + d ( x , y ) lim h 0 + d ( ( x , y ) + h v ) d ( x , y ) h ,

in case the limit exists. We will use the notation 1 + , 2 + , 1 , and 2 for the cases v = ( 1 , 0 ) , ( 0 , 1 ) , ( 1 , 0 ) , and ( 0 , 1 ) , respectively.

Since X and Y are not open sets, we provide a short comment regarding the notion of differentiability for d X and d Y . In the interior of X (respectively Y ), the notion of differentiability is well-known. With respect to the points of the form ( x , x ) Δ , we understand that d X is differentiable at ( x , x ) Δ if there exists w R 2 such that for every ( x ˜ , y ˜ ) X ,

d ( x ˜ , y ˜ ) = d ( x , x ) + w ( x ˜ x , y ˜ y ) + o ( ( x ˜ x , y ˜ y ) ) ,

where denotes the scalar product, and o is used for the Landau notation. Since we can take ( x ˜ , y ˜ ) such that ( x ˜ x , y ˜ y ) = ( 0 , 1 ) or ( x ˜ x , y ˜ y ) = ( 1 , 0 ) , the choice for w , if it exists, is unique. In case of existence of such a w , we say that w is the derivative or gradient of d X at ( x , x ) and we write d ( x , y ) = w . A similar definition goes for Y .

Observe that, due to the symmetry property, if d C ( R 2 , [ 0 , ) ) is a distance and d X is differentiable, then d Y is differentiable too. Hence, if d C ( R 2 , [ 0 , ) ) is a distance and d X is differentiable, v + d ( x , y ) exists for every ( x , y ) and any v R 2 . Besides, due to the symmetry of d , 1 + d ( x , y ) = 2 + d ( y , x ) and 1 d ( x , y ) = 2 d ( y , x ) .

Now, we state a first necessary condition on d to be a distance.

Theorem 2.1

Let d C ( R 2 , [ 0 , ) ) be a distance such that d X is differentiable, ( x , y ) R 2 . Then, we have that 2 d ( x , y ) 2 d ( y , y ) and 2 + d ( x , y ) 2 + d ( y , y ) for any x , y R .

Proof

Let x , y , z R . By the triangle inequality, d ( x , z ) d ( x , y ) + d ( y , z ) and d ( x , y ) d ( x , z ) + d ( y , z ) , so d ( x , z ) d ( x , y ) d ( y , z ) . Now,

d ( x , z ) d ( x , y ) z y d ( y , z ) z y = d ( y , z ) d ( y , y ) z y .

If z y , we deduce 2 d ( x , y ) 2 d ( y , y ) for any x , y R . Analogously, if z y + , we deduce the inequality 2 + d ( x , y ) 2 + d ( y , y ) .□

Remark 2.2

The symmetry of d implies that 1 d ( y , x ) 1 d ( y , y ) and 1 + d ( y , x ) 1 + d ( y , y ) for any x , y R .

Corollary 2.3

Let d C ( R 2 , [ 0 , ) ) be a distance such that d X is differentiable. Then, d is not differentiable at any point of Δ .

Proof

Since d ( x , y ) = d ( y , x ) , 1 d ( x , y ) = 2 d ( y , x ) for x y , and 1 + d ( x , x ) = 2 + d ( x , x ) . Assume d is differentiable at ( y , y ) Δ . Then, if v = ( 1 , 1 ) and we compute the directional derivative of d in the direction of v , we obtain that, since d ( x , x ) = 0 for every x R ,

0 = v + d ( y , y ) = 1 + d ( y , y ) + 2 + d ( y , y ) = 2 2 + d ( y , y ) ,

and we conclude that d ( y , y ) = 0 . Now, for x > y , by Theorem 2.1, we have that

2 d + ( x , y ) 2 + d ( y , y ) = 0 ,

that is, 2 d ( x , y ) = 0 . Hence, for x > y , d ( x , y ) = y x 2 d ( x , z ) d z = 0 , which is not possible since d is a distance.□

Remark 2.4

Observe that, by the same reasoning as in Corollary 2.3, 1 + d ( x , x ) = 2 + d ( x , x ) > 0 , 1 d ( x , x ) = 2 d ( x , x ) > 0 for every x R .

3 Sufficient conditions

In this section, we provide several sufficient results in order to ensure that a function d : R 2 R defines a metric on R . Of course, the hypotheses regarding the symmetry and sign of d are obvious. Nevertheless, with respect to what hypotheses we can demand in order to obtain the triangle inequality, we make the following short discussion in this preamble.

We will assume x < y < z without loss of generality, since the triangle inequality is evident in the case where at least two of these three numbers are equal (positive definiteness and symmetry are enough to conclude). It is important to have in mind these assumptions concerning the order of x , y , and z , since they will be used with high frequency along the whole document. In order to prove the triangle inequality, we need to show the following three inequalities:

(3.1) 1.   d ( x , y ) + d ( y , z ) d ( x , z ) , 2.   d ( x , z ) + d ( y , z ) d ( x , y ) , 3.   d ( x , y ) + d ( x , z ) d ( y , z ) .

It is also important to realize that the nature of the first inequality is somehow distinct to the two other ones. The main reason is that the first inequality compares the “distance” from x to z with the sum of two “distances” pivoting via y . The fact that y is the intermediate value in the order relation assumption x < y < z plays a special role here. Nevertheless, the second and third inequalities are somehow symmetric, as we shall see along the proofs in this article.

In the first part of the section, we will provide two versions of a useful lemma that, essentially, provides a sufficient condition for having the first inequality d ( x , y ) + d ( y , z ) d ( x , z ) . In the second part, we will state and prove an initial version of these sufficiency theorems for d being a distance. In each of these theorems, we add a different hypothesis that allows us to obtain d ( x , z ) + d ( y , z ) d ( x , y ) and d ( x , y ) + d ( x , z ) d ( y , z ) . In the third part, we will weaken the assumption involving the smoothness of d .

3.1 Cross partial derivative and the triangle inequality

We will provide a lemma that shows, roughly speaking, how a non-negative sign of the cross partial derivative outside of Δ implies d ( x , y ) + d ( y , z ) d ( x , z ) for any x < y < z . We highlight that d is not necessarily continuous on the diagonal Δ R 2 . This hypothesis is relevant, since many renowned examples of distances on R are not induced by continuous functions, as we shall see in the last part of the study.

Lemma 3.1

Consider a function d C 2 ( R 2 \ Δ , [ 0 , ) ) fulfilling the assumption 12 d ( a , b ) 0 for every ( a , b ) Δ and three given real numbers x < y < z . Then, the function

G y , H z ( λ ) y z 1 d ( s , λ ) d s

is increasing on the intervals ( , y ] and [ z , + ) , and the function

G x , V y ( λ ) x y 2 d ( λ , s ) d s

is increasing on the intervals ( , x ] and [ y , + ) . Besides, the inequality d ( x , z ) d ( x , y ) + d ( y , z ) holds.

Proof

The key remark is that 1 d ( s , λ ) 1 d ( s , λ ˜ ) for any s ( y , z ) and any λ < λ ˜ y , since 12 d 0 on R = ( y , z ) × [ λ , λ ˜ ] ( y , z ) × ( , y ] because R Δ = . Therefore, G y , H z ( λ ) is increasing on ( , y ] and, analogously, it is also increasing on [ z , ) . A similar argument applies in order to show the increasing character of G x , V y ( λ ) on the intervals ( , x ] and [ y , + ) .

For the final claim, if we observe that d is two times differentiable at any point of the closure R ¯ except at ( y , y ) , we can apply Fundamental Theorem of Calculus to deduce

d ( z , λ ) d ( y , λ ) d ( z , λ ˜ ) d ( y , λ ˜ ) d ( z , λ ˜ ) ,

for any λ < λ ˜ < y . If we take λ = x , and let λ ˜ y , the continuity of d outside the diagonal will imply

d ( z , x ) d ( y , x ) d ( z , y ) ,

which is obviously equivalent to the desired inequality.□

Since the condition on the cross partial derivative is only used to deduce the monotonicity of G y , H z and G x , V y , we also have the following result.

Corollary 3.2

Consider a function d C 2 ( R 2 \ Δ , [ 0 , ) ) and three given real numbers x < y < z . Assume that the function

G y , H z ( λ ) y z 1 d ( s , λ ) d s

is increasing on the intervals ( , y ] and [ z , + ) and that the function

G x , V y ( λ ) x y 2 d ( λ , s ) d s

is increasing on the intervals ( , x ] and [ y , + ) . Then, we have the inequality d ( x , z ) d ( x , y ) + d ( y , z ) .

Remark 3.3

We highlight that Corollary 3.2 is more general than Lemma 3.1, but also that its hypotheses are more difficult to check.

3.2 Initial statements for sufficient conditions

We now state four sufficiency theorems, each of them implying that d defines a distance under certain hypotheses, together with their corresponding proofs.

Theorem 3.4

Consider a function d C 2 ( R 2 \ Δ , [ 0 , ) ) . Suppose that d fulfills the following properties:

  1. d ( x , y ) > 0 for every ( x , y ) Δ , and d ( x , x ) = 0 for every x R .

  2. d ( x , y ) = d ( y , x ) for every ( x , y ) R 2 .

  3. 12 d ( x , y ) 0 for every ( x , y ) Δ .

  4. For any fixed a R , the function d ( , a ) is non-increasing on the interval ( , a ) and non-decreasing on the interval ( a , ) .

Then, d defines a distance on R .

Proof

It is clear that we only need to check the triangle inequality for x < y < z . Besides, due to hypothesis H2, we observe that hypothesis H4A implies that d ( a , ) is non-increasing on the interval ( , a ) and non-decreasing on the interval ( a , ) . On the one hand, d ( x , y ) + d ( y , z ) d ( x , z ) is a straightforward consequence of Lemma 3.1 due to hypothesis H3. On the other hand, derivation for the two last inequalities in (3.1) is immediate from H4A since distances are non-negative, d ( x , z ) d ( x , y ) , and d ( x , z ) d ( y , z ) .□

Theorem 3.5

Consider a function d C 2 ( R 2 \ Δ , [ 0 , ) ) fulfilling the following properties:

  1. d ( x , y ) > 0 for every ( x , y ) Δ , and d ( x , x ) = 0 for every x R .

  2. d ( x , y ) = d ( y , x ) for every ( x , y ) R 2 .

  3. 12 d ( x , y ) 0 for every ( x , y ) Δ .

  4. lim λ + [ d ( b , λ ) d ( a , λ ) ] lim λ [ d ( b , λ ) d ( a , λ ) ] for every pair ( a , b ) with a < b , where both limits are finite.

Then, d defines a distance on R .

Idea. In geometrical terms – see Figure 1, left – if we consider a horizontal segment from ( y , λ ) to ( z , λ ) , the integral of 1 d along the oriented segment increases when the height λ increases, with the only caution that the segment cannot cut Δ . So, instead of cutting Δ , the idea consists in “passing through infinity,” as it will be explained in the next paragraph. The geometrical explanation for Figure 1, right, is the same one, but changing vertical and horizontal roles. In terms of Figure 1, we want to prove that the integral of the horizontal/vertical partial derivative of d along the gray oriented segment is greater than the analogous one on the black oriented segment.

Figure 1 
                  Comparison of the horizontal (left) and vertical (right) segments.
Figure 1

Comparison of the horizontal (left) and vertical (right) segments.

Proof

As in the previous result, from the first three hypotheses, we derive the non-negativity, symmetry, and 1 in (3.1). Thus, if x < y < z , it suffices to see that

  • d ( x , z ) + d ( y , z ) d ( x , y ) ,

  • d ( x , y ) + d ( x , z ) d ( y , z ) .

First, if we recall the definition G y , H z ( λ ) y z 1 d ( s , λ ) d s made in Lemma 3.1, we know that G y , H z increases on ( , y ] and [ z , ) . Besides, since d is smooth enough outside of Δ , we can apply the Fundamental Theorem of Calculus to the integral defined by G y , H z ( λ ) for λ ( , y ) ( z , ) . In particular, we are interested in the cases where λ or λ , since H4B can be stated as

(3.2) lim λ + G y , H z ( λ ) lim λ G y , H z ( λ ) ,

implying G y , H z ( x ) G y , H z ( z ) . Analogously, if we recall the definition G x , V y ( λ ) x y 2 d ( λ , s ) d s , due to the symmetry of d , we immediately derive

(3.3) lim λ + G x , V y ( λ ) lim λ G x , V y ( λ ) ,

implying G x , V y ( x ) G x , V y ( z ) . We simply observe that

G y , H z ( x ) G y , H z ( z ) d ( z , x ) d ( y , x ) d ( y , z ) d ( x , z ) + d ( y , z ) d ( x , y ) , G x , V y ( x ) G x , V y ( z ) d ( x , y ) d ( z , y ) d ( z , x ) d ( x , y ) + d ( x , z ) d ( y , z ) ,

and hence the proof is complete.□

Theorem 3.6

Consider a function d C 2 ( R 2 \ Δ , [ 0 , ) ) fulfilling the following properties:

  1. d ( x , y ) > 0 for every ( x , y ) Δ , and d ( x , x ) = 0 for every x R .

  2. d ( x , y ) = d ( y , x ) for every ( x , y ) R 2 .

  3. 12 d ( x , y ) 0 for every ( x , y ) Δ .

  4. d ( x , y ) 0 when ( x , y ) .

Then, d defines a distance on R .

Proof

In order to prove this theorem, it suffices to see how H4B is derived from H4C. Since the gradient tends to zero, for any given ε > 0 , it is possible to make d < ε outside of a big enough square [ l , l ] × [ l , l ] . Hence, after considering any λ such that λ > l , we have that G a , H b ( λ ) ε ( b a ) . Thus, H4B would be automatically fulfilled, since it would read 0 0 .□

Theorem 3.7

Consider a function d C 2 ( R 2 \ Δ , [ 0 , ) ) fulfilling the following properties:

  1. d ( x , y ) > 0 for every ( x , y ) Δ , and d ( x , x ) = 0 for every x R .

  2. d ( x , y ) = d ( y , x ) for every ( x , y ) R 2 .

  3. 12 d ( x , y ) 0 for every ( x , y ) Δ .

  4. We have that lim λ d ( c , λ ) = lim λ d ( c , λ ) R for any c R .

Then, d defines a distance on R .

Proof

It is an immediate consequence of Theorem 3.5, since H4D implies H4B in an obvious way.□

Remark 3.8

Due to the symmetry property, hypothesis 4 D is obviously equivalent to what we could call hypothesis H4D′, that would read as

  1. We have that lim λ d ( λ , c ) = lim λ d ( λ , c ) R for any c R .

We have made explicit the previous remark since H4D and H4D imply that d can be extended to a class two map on the periodic domain of the form M = S 1 × S 1 \ { ( α , α ) S 1 × S 1 : α S 1 } , provided that the matching at the infinity points induced by H4D and H4D′ is smooth enough. Since M is diffeomorphic to a cylinder, a possible way to produce distances on R would be, roughly speaking, to find class two scalar fields on a cylinder that are positive (hypothesis 1), symmetric (hypothesis 2), and with non-negative cross partial derivative after applying the already mentioned diffeomorphism (hypothesis 3).

3.3 Extension for sufficient conditions

Before applying the previous theorems to some examples, it will be convenient to weaken their hypotheses, specially the one involving the required smoothness for d . In order to do so, first, we take into account the following trivial remark.

Remark 3.9

Suppose that h : R R is a bijective map. Then, d ( x , y ) defines a distance on R if and only if ( d ( h × h ) ) ( x , y ) = d ( h ( x ) , h ( y ) ) defines a distance on R . In particular, d fulfills H1 and H2 in Theorems 3.4, 3.5, 3.6, and 3.7 if and only if ( d ( h × h ) ) fulfills hypotheses H1 and H2.

The previous remark states, essentially, that being a distance does not depend on the coordinates that we are considering. We highlight that, in principle, this map h would not need to be even continuous, measurable, or to have any nice property. Nevertheless, the interest of the previous remark is that, in some examples and for some points ( x , y ) outside the diagonal, the distance d may not be regular enough in order to apply any result of the previous section. This problem can be avoided after considering the distance d ( h × h ) for a suitable smooth choice of h , instead of simply considering the distance d . In practice, the choice for the function h will be h ( x ) = x 2 n + 1 for a suitable natural number n N . The reason for this choice is that, in many expressions, we have addends like x p that are not smooth enough in order to apply the previous theorems when p > 0 is too low, but we can make h ( x ) p to be smooth enough after choosing a sufficiently large value for n . In this sense, we take into account the following well-known remark.

Remark 3.10

For any fixed p > 0 , the regularity of the function g ( x ) = h ( x ) p = x ( 2 n + 1 ) p increases with respect to n . Specifically, g C m ( R ) , where m = ( 2 n + 1 ) p 1 . In particular, g C 2 ( R ) whenever ( 2 n + 1 ) p > 2 .

The consideration made in the previous remark and the fact that such a choice for h is bijective and increasing are the motivation for the next two lemmas. First, we state and demonstrate a sufficient condition ensuring that d ( h × h ) fulfills H3 on R 2 \ Δ , provided that d satisfies H3 on a bit smaller set.

Lemma 3.11

Consider a function d : R 2 [ 0 , ) such that d C 2 ( R 2 \ ( Δ Λ ) , [ 0 , ) ) , where the set R 2 \ ( Δ Λ ) is dense in R 2 \ Δ . Assume that there exists an increasing bijective differentiable map h : R R such that d ( h × h ) C 2 ( R 2 \ Δ , [ 0 , ) ) . If 12 d is non-negative on R 2 \ ( Δ Λ ) , then 12 ( d ( h × h ) ) is non-negative outside of Δ .

Proof

First observe that, since h is bijective increasing and continuous, it is a homeomorphism. Therefore, the function φ ( x , y ) = ( h ( x ) , h ( y ) ) , where ( x , y ) R 2 , is a homeomorphism as well and fulfills φ ( Δ ) = Δ . Hence, since R 2 \ ( Δ Λ ) is dense in R 2 \ Δ , φ 1 ( R 2 \ ( Δ Λ ) ) is dense in φ 1 ( R 2 \ Δ ) = R 2 \ Δ .

Due to the chain rule, we have that

12 ( d φ ) ( x , y ) = 12 ( d ( h × h ) ) ( x , y ) = h ( x ) h ( y ) ( 12 d ) ( h ( x ) , h ( y ) ) ,

and this expression is valid whenever φ ( x , y ) R 2 \ ( Δ Λ ) , that is, ( x , y ) φ 1 ( R 2 \ ( Δ Λ ) ) . Besides, since h is increasing and 12 d is non-negative, we conclude that 12 ( d ( h × h ) ) is non-negative whenever ( x , y ) φ 1 ( R 2 \ ( Δ Λ ) ) . Finally, since d ( h × h ) C 2 ( R 2 \ Δ , [ 0 , ) ) , and φ 1 ( R 2 \ ( Δ Λ ) ) is dense in φ 1 ( R 2 \ Δ ) = R 2 \ Δ , we conclude that 12 ( d ( h × h ) ) is non-negative outside of Δ .□

Finally, we state a second lemma ensuring that if d fulfills one of the versions of H4, so does d ( h × h ) . We deliberately exclude hypothesis H4C, since the change in coordinates induced by h can break the vanishing property for the gradient of d at infinity.

Lemma 3.12

Consider a function d C ( R 2 , [ 0 , ) ) , together with an increasing bijection h : R R .

  • If d fulfills H4A, then d ( h × h ) fulfills H4A.

  • If d fulfills H4B, then d ( h × h ) fulfills H4B.

  • If d fulfills H4D, then d ( h × h ) fulfills H4D.

Proof

For the first part, we have that, for any fixed a R , the function d ( , a ) is non-increasing on the interval ( , a ) and non-decreasing on the interval ( a , ) . Since h is bijective and it preserves the order in the real line, d ( h × h ) fulfills H4A.

For the second part, we have that lim λ + [ d ( b , λ ) d ( a , λ ) ] lim λ [ d ( b , λ ) d ( a , λ ) ] for every pair ( a , b ) with a < b . Since h is bijective and it preserves the order in the real line, d ( h × h ) fulfills H4B.

For the last part, we have that lim λ d ( c , λ ) = lim λ d ( c , λ ) for any c R , and that this value is finite. Since h is bijective and it preserves the order in the real line, d ( h × h ) fulfills H4D.□

As a consequence of all the previously exposed material, the main result of this part of the section can be stated and proved as follows.

Theorem 3.13

Consider a function d : R 2 [ 0 , ) such that d C 2 ( R 2 \ ( Δ Λ ) , [ 0 , ) ) , where R 2 \ ( Δ Λ ) is dense in R 2 \ Δ . Assume that there exists an increasing bijective differentiable map h : R R such that d ( h × h ) C 2 ( R 2 \ Δ , [ 0 , ) ) . Finally, suppose also that d fulfills the following properties:

  1. d ( x , y ) > 0 for every ( x , y ) Δ , and d ( x , x ) = 0 for every x R .

  2. d ( x , y ) = d ( y , x ) for every ( x , y ) R 2 .

  3. 12 d ( x , y ) 0 for every ( x , y ) Δ Λ .

  4. The function d fulfills at least one of the hypotheses 4 A , 4 B , or 4 D in Theorems 3.4, 3.5, or 3.7, respectively.

Then, d defines a distance on R .

Proof

Depending on whether d fulfills hypothesis H4A, H4B, or H4D we shall use Theorem 3.4, 3.5, or 3.7 to conclude. First, if d fulfills H1 and H2 so does d ( h × h ) , due to Remark 3.9. Second, Lemma 3.11 allows us to deduce H3′ for d ( h × h ) . Third, at least one of the hypotheses H4A, H4B, or H4D is fulfilled by d and, due to Lemma 3.12, also by d ( h × h ) . We highlight that d ( h × h ) is a continuous map and that its cross partial derivative is smooth enough outside the diagonal because of the hypotheses. Therefore, d ( h × h ) is a metric and, consequently, d is a metric due to Remark 3.9.□

4 Examples

Here we present some classical examples of distances to which the previous criteria can be applied to provide a proof that they are distances. Initially, we provide three examples of three candidates to distances d and, in each case, via Theorems 3.4, 3.5, 3.6, 3.7, or the general version in 3.13, we deduce that d is indeed a distance. More examples of known distances can be found in [1].

Example 4.1

(Concave translation invariant metric) The function d ( x , y ) = g ( y x ) is a distance, whenever g C 2 ( [ 0 , ) ) is concave, g ( 0 ) = 0 and g ( x ) > 0 if x > 0 .

Let us check the hypothesis of Theorem 3.4. We have the required regularity outside of the diagonal, and also positive definiteness and symmetry. If ( x , y ) Δ ,

12 d ( x , y ) = g ( y x ) , if x < y , g ( x y ) , if x > y ,

and since g is concave and twice differentiable on ( 0 , ) , 12 d ( x , y ) 0 for ( x , y ) Δ . Finally, such g is necessarily a non-decreasing function, so H4A in Theorem 3.4 is also satisfied, and d is a metric.

Example 4.2

( p -relative metric) Given p [ 1 , ) , the function

d ( x , y ) = y x ( x p + y p ) 1 p , ( x , y ) R 2 , ( x , y ) 0 , 0 , ( x , y ) = 0 ,

is a distance.

In order to apply any of the previous results, the only possible option is to check the hypotheses of Theorem 3.13, since d is not smooth on the set Λ of the points ( x , y ) where x y = 0 , at least when p is small enough.

First, if we select h ( x ) = x 2 n + 1 in a such a way that ( 2 n + 1 ) p > 2 , we are able to ensure the condition d ( h × h ) C 2 ( R 2 \ Δ , [ 0 , ) ) . In particular, we highlight that, in contrast to what happens with d , d ( h × h ) is two times continuously differentiable on R 2 \ Δ .

As usual, positive definiteness and symmetry are clear. Besides, hypothesis H4D is immediate to check, since

lim λ d ( c , λ ) = lim λ λ c ( c p + λ p ) 1 p = 1 = lim λ + λ c ( c p + λ p ) 1 p = lim λ + d ( c , λ ) .

Thus, we only need to check H3 or, in other words, that the cross partial derivative of d is non-negative outside Δ Λ . Due to symmetry, we can assume x > y . An straightforward computation for the three cases ( x > y > 0 , x > 0 > y , 0 > x > y ) gives

12 d ( x , y ) = sgn ( x ) x 2 p 1 sgn ( y ) y 2 p 1 ( x p + y p ) 2 + 1 p + p sgn ( x y ) x y ( x p + y p ) 2 + 1 p x y p 1 .

It is clear that 12 d ( x , y ) 0 on the open ray of argument π 4 . Besides, this is also true for half of the first quadrant (where x > y > 0 ), and for half of the fourth quadrant (where 0 > x > y ), since both addends involved in 12 f are clearly positive.

The inequality for the two pending cases is derived as follows. For the case of half of the third quadrant 0 > x > y , we can write x = λ y for some 0 < λ < 1 . After this substitution, cancellation of denominators, and taking into account the value for the sign function, we need to check that

y 2 p 1 ( 1 λ 2 p 1 ) p y 2 p 1 ( 1 λ ) λ p 1 .

Equivalently, we have to explain why

1 + p λ p p λ p 1 + λ 2 p 1 .

If we define the function

h ( x ) = ( x + 1 ) λ x + ( p x ) λ p + x ,

since h ( 0 ) = 1 + p λ p and h ( p 1 ) = p λ p 1 + λ 2 p 1 , it is enough to prove that h ( 0 ) h ( p 1 ) . This is straightforward since log ( λ ) < 0 and, for any x ( 0 , p 1 ) , we have that

h ( x ) = log ( λ ) ( ( x + 2 ) λ x + ( p x 1 ) λ p + x ) < 0 .

The pending case for half of the fourth quadrant 0 > y > x is similar to the previous one. We can write y = λ x for some 0 < λ < 1 . We need to check that

x 2 p 1 ( 1 + λ 2 p 1 ) p x 2 p 1 ( 1 λ ) λ p 1 .

This is equivalent to showing that

1 + p λ p p λ p 1 λ 2 p 1 ,

but we have already verified this for the case where λ 2 p 1 carries a plus sign.

Example 4.3

(Generalized chordal metric) Let α > 0 , β 0 , p 1 . The function

d ( x , y ) y x ( α + β x p ) 1 p ( α + β y p ) 1 p

is a distance.

In order to show that the previous function is a metric, we shall make some simplifications before checking that the cross partial derivative 12 is non-negative. First note that

d ( x , y ) 1 α 2 p y x ( 1 + ( β α ) x p ) 1 p ( 1 + ( β α ) y p ) 1 p .

With the idea of a change in variables, we rewrite the denominator

d ( x , y ) 1 α 2 p y x 1 + β 1 p x α 1 p p 1 p 1 + β 1 p y α 1 p p 1 p ,

and the numerator

d ( x , y ) 1 α 1 p β 1 p β 1 p α 1 p y x 1 + β 1 p x α 1 p p 1 p 1 + β 1 p y α 1 p p 1 p .

Thus,

d ( g ( x ) , g ( y ) ) 1 α 1 p β 1 p g ( y ) g ( x ) ( 1 + g ( x ) p ) 1 p ( 1 + g ( y ) p ) 1 p ,

where we have taken g ( s ) = ( β α ) 1 p s . Hence, if we define, d g = d ( g × g ) , we need to check that

d g ( x , y ) y x ( 1 + x p ) 1 p ( 1 + y p ) 1 p

is a metric. Since the sufficiency theorems do not care about the smoothness of the metric candidate on the diagonal, the only apparent pending issue is the smoothness of its denominator. Hence, we shall use the map h ( x ) = x 2 n + 1 for n such that ( 2 n + 1 ) p > 2 together with Theorem 3.13 in order to surpass this problem.

First, we have that d g ( h × h ) has the demanded regularity in Theorem 3.13: d g is a class two function on R 2 \ Δ . Moreover, hypotheses H1 and H3′ can be easily checked.

Besides, on the one hand, outside the diagonal ( Δ ) or the points where x y = 0 ( Λ ), the cross partial derivative is well-defined and it has the value

12 d g ( x , y ) = sgn ( y ) y p 1 sgn ( x ) x p 1 ( 1 + x p ) p + 1 p ( 1 + y p ) p + 1 p ,

which is greater than or equal to zero at any point. Therefore, H3’ holds. On the other hand, H4 of Theorem 3.13 also holds for the case H4D, since

lim λ d g ( c , λ ) = 1 = lim λ + d g ( c , λ ) .

  1. Funding information: The research of the authors Daniel Cao Labora, F. Adrián F. Tojo, and Francisco J. Fernández was supported by the Agencia Estatal de Investigación (AEI) of Spain Grant no. PID2020-113275GB-I00 funded by MCIN/AEI/10.13039/501100011033 and by “ERDF A way of making Europe,” by the “European Union” and Xunta de Galicia, Grant no. ED431C 2023/12 for Competitive Reference Research Groups (2023-2026).

  2. Author contributions: All authors have accepted responsibility for the entire content of this manuscript and consented to its submission to the journal, reviewed all the results, and approved the final version of the manuscript. All authors participated equally in the elaboration of the manuscript.

  3. Conflict of interest: The authors state no conflict of interest.

Reference

[1] M. M. Deza and E. Deza, Encyclopedia of Distances, Springer, Berlin, Germany, 2013. 10.1007/978-3-642-30958-8Search in Google Scholar

Received: 2024-05-08
Revised: 2024-12-05
Accepted: 2025-02-12
Published Online: 2025-03-14

© 2025 the author(s), published by De Gruyter

This work is licensed under the Creative Commons Attribution 4.0 International License.

Downloaded on 18.9.2025 from https://www.degruyterbrill.com/document/doi/10.1515/agms-2025-0022/html
Scroll to top button