Metrics and quasimetrics induced by point pair function

We study the point pair function in subdomains $G$ of $\mathbb{R}^n$. We prove that, for every domain $G\subsetneq\mathbb{R}^n$, the this function is a quasi-metric with the constant less than or equal to $\sqrt{5}\slash2$. Moreover, we show that it is a metric in the domain $G=\mathbb{R}^n\setminus\{0\}$ with $n\geq1$. We also consider generalized versions of the point pair function, depending on an arbitrary constant $\alpha>0$, and show that in some domains these generalizations are metrics if and only if $\alpha\leq12$.


Introduction
During the past few decades, several authors have contributed to the study of various metrics important for the geometric function theory. In this field of research, intrinsic metrics are the most useful because they measure distances in the way that takes into account not only how close the points are to each other but also how the points are located with respect to the boundary of the domain. These metrics are often used to estimate the hyperbolic metric and, while they share some but not all of its properties, intrinsic metrics are much simpler than the hyperbolic metric and therefore more applicable.
Let G be a proper subdomain of the real n-dimensional Euclidean space R n . Denote by |x − z| the Euclidean distance in R n and by d G (x) the distance from a point x ∈ G to the boundary ∂G, i.e. d G (x) := inf{|x − z| | z ∈ ∂G}. One of the most interesting intrinsic measures of distance in G is the point pair function p G : G × G → [0, 1) defined as This function was first introduced in [3, p. 685], named in [6] and further studied in [4,10,11,12,13]. In [3,Rmk 3.1,p. 689] it was noted that the function p G is not a metric when the domain G coincides with the unit disk B 2 .
In order to be a metric, a function needs to be fulfill certain three properties, the third of which is called the triangle inequality. The point pair function has all the other properties of a metric but it only fulfills a relaxed version (2.1) of the original triangle inequality, as explained in Section 2. We call such functions quasi-metrics and study what is the best constant c such that the generalized inequality (2.1) holds. Namely, it was proven in [10, Lemma 3.1, p. 2877] that the point pair function is a quasi-metric on every domain G R n with a constant less than or equal to √ 2, but this result is not sharp for any domain G.
For this reason, we continue here the investigations initiated in the paper [10]. We give an answer to the question posed in [10, Conj. 3.2, p. 2877] by proving in Theorem 4.14 that, for all domains G R n , the point pair function is a quasi-metric with a constant less than or equal to √ 5/2. For the domain G = R n \{0} with n ≥ 1, we prove Theorem 4.6 which states that the point pair function p G defines a metric. In Lemma 4.17, we explain for which domains the constant √ 5/2 is sharp. We also investigate what happens when the constant 4 in (1.1) is replaced by another constant α > 0 to define a generalized version p α G of the point pair function p G as in (5.1). In particular, we prove that, for α ∈ (0, 12], this function p α G is a metric if G is the positive real axis R + (Theorem 5.2), the punctured space R n \{0} with n ≥ 2 (Theorem 5.11), or the upper half-space H n with n ≥ 2 (Theorem 5.13). Furthermore, we also show in Theorem 5.15 that the function p α G is not a metric for any values of α > 0 in the unit ball B n .
The structure of this article is as follows. In Section 2, we give necessary definitions and notations. First, in Section 3, we study the point pair function in the 1-dimensional case and then consider the general n-dimensional case in Section 4. In Section 5, we inspect the generalized version p α G of the point pair function in several domains. At last, in Section 6, we state some open problems.

Preliminaries
In this section, we introduce some notation and recall a few necessary definitions related to metrics.
We will denote by [x, y] the Euclidean line segment between two distinct points x, y ∈ R n . For every x ∈ R n and r > 0, B n (x, r) is the x-centered open ball of radius r, and S n−1 (x, r) is its boundary sphere. If x = 0 and r = 1 here, we simply write B n instead of B n (0, 1). Let H n denote the upper-half space {x = (x 1 , ..., x n ) ∈ R n | x n > 0}. Furthermore, hyperbolic sine, cosine and tangent are denoted as sh, ch and th, respectively, and their inverse functions are arsh, arch, and arth.
For a non-empty set G, a metric on G is a function d : G × G → [0, ∞) such that for all x, y, z ∈ G the following three properties hold: (1) Positivity: d(x, y) ≥ 0, and d(x, y) = 0 if and only if x = y, If a function d : (1), (2) and the inequality for all x, y, z ∈ G with some constant c ≥ 1 independent of the points x, y, z, then the function d is a quasi-metric [9, p. 4307], [15, p. 603], [16,Def. 2.1,p. 453]. Note that this term "quasi-metric" has slightly different meanings in some works, see for instance [1,2,14].
The point pair function defined in (1.1) is a metric for some domains G R n and a quasi-metric for other domains [10, Lemma 3.1, p. 2877]. Note that the triangular ratio metric introduced by P. Hästö [7], is a metric for all domains G R n [7, Lemma 6.1, p. 53], [3, p. 683] and, because of the equality p H n (x, y) = s H n (x, y) [4, p. 460], the point pair function is a metric on H n . However, the point pair function is not a metric for either the unit ball [3, Rmk 3.1, p. 689] or a two-dimensional sector with central angle θ ∈ (0, π) [10, p. 2877].

The point pair function in the one-dimensional case
In this section, we prove that, for every 1-dimensional domain G, the point pair function p G is either a metric or a quasi-metric with the sharp constant √ 5/2, depending on the number of the boundary points of G (Corollary 3.8).
To do this, we need to establish the following lemma which is also required for the proof of another important result, Theorem 3.6.
Proof. I) First we will investigate the function At every critical point of F (x, y, z), we have ∇F (x, y, z) = 0 and, therefore, From the two latter equalities above, we can deduce that By combining these expressions of A and B with the equality (3.3), we have and, consequently, x + y = x + z. This implies that y = z and we see that F (x, z, y) has no extrema in the domain D.
II) Now, let us investigate the case where (x, z, y) is a boundary point of the aforementioned domain D. If x = −1, x = 0, z = y or y = 1, then evidently F (x, y, z) ≥ 0. Thus, we only have to consider the case z = 0. Without loss of generality, we can assume that x > −1 and y < 1. Since the inequality (3.2) in the case z = 0 is equivalent to the inequality , −1 < x < 0 < y < 1. By denoting s = −x/(2 + x) and t = y/(2 − y) for 0 ≤ s, t ≤ 1, we have

and (3.2) is equivalent to
This can also be written as Now, let u = s + t and v = st. Then 0 < 4v ≤ u 2 < 4, and we can write (3.5) in the form After simple transformations, we obtain 5v + 4u + 2 + 1 5v Since v/u 2 ≤ 1/4, we only need to prove that 5v + 4u .
By denoting v 1/2 = ζ, we can write the last inequality in the form It is easy to see that h ′′ (ζ) ≥ 0 for ζ ≥ 0, therefore h is convex for positive ζ. Consequently,  Proof. We need to show that the function satisfies the inequality (2.1) for all points x, y, z ∈ (−1, 1) with the constant c = √ 5/ 2. If x, y and z are all either non-negative or non-positive, then p G (x, y) ≤ p G (x, z) + p G (z, y) trivially. In the opposite case, either one of the points is negative and other two points are non-negative, or we have one positive and two non-positive points. Because of symmetry, we can just consider the first possibility. If z is negative, then the inequality p G (x, y) ≤ p G (x, z) + p G (z, y) holds for all x, y ∈ [0, 1). Consequently, we can assume that x < 0 ≤ z ≤ y. In this case, our inequality can be simplified to The inequality above follows from Lemma 3.1. Since, in the case x = −1/3, z = 0 and y = 1/3, the equality holds we see that the constant √ 5/2 is the best possible.
We note that, for any 1-dimensional domain G R, the boundary ∂G consists of either one or two points. Using this fact, we formulate: Proof. First, we note that the point pair function is invariant under translation and stretching by a nonzero factor. If card(∂G) = 1, then for some x 0 we have ∂G = {x 0 } and with the help of the function f : x → a(x − x 0 ), a = 0, we can map the domain G onto the positive real axis R + . The function f preserves the point pair function, i.e. p R + (f (x), f (y)) = p G (x, y) for all x, y ∈ G. Therefore, from the very beginning we can assume that G = R + . Since p R + (x, y) = |x − y|/(x + y) coincides with the triangular ratio metric s R + (x, y) for all x, y ∈ R + , we conclude that in this case the point pair function is a metric.
If card(∂G) = 2, then we have 1). We see that, as above, f preserves the point pair function, therefore we can assume that G = (−1, 1), and the result follows from Theorem 3.6.

The point pair function in the n-dimensional case
In this section, we investigate the quasi-metric property of the point pair function by considering its behaviour in n-dimensional domains, n ≥ 1. Our main results are Theorems 4.6 and 4.14. First, we will establish Lemma 4.1, which has quite complicated and technical inequalities but is necessary for the proof of Theorem 4.6. We note that some results close in spirit to those described in Lemmas 4.1 and 5.8 below are established in [8]. Moreover, Proof. It is sufficient to prove that By squaring both sides of (4.4), we have After simple transformations, we obtain To establish the inequality above, it is sufficient to prove that Squaring this inequality, we have By the inequality of arithmetic and geometric means, we have 2sh x ch y sh y ch x sh uch v sh v ch u ≤ sh 2 x ch 2 y sh 2 v ch 2 u + sh 2 u ch 2 v sh 2 y ch 2 x, therefore, sh 2 x ch 2 y sh 2 y ch 2 x + sh 2 u ch 2 v sh 2 v ch 2 u + 2sh x ch y sh y ch x sh u ch v sh v ch u ≤ [sh 2 xch 2 y + sh 2 uch 2 v][sh 2 ych 2 x + sh 2 vch 2 u].
This inequality implies (4.5), therefore, (4.2) is proved. The inequality (4.3) can be obtained by applying the function th to both sides of (4.2).
Theorem 4.6. For n ≥ 1, the point pair function is a metric on G = R n \{0}.
Proof. Because the point pair function trivially satisfies the properties (1) and (2) of a metric, we only need to prove the triangle inequality. Therefore, we will show that p G (x, y) ≤ p G (x, z) + p G (z, y) for x, y, z ∈ G = R n \{0}. Note that, for all points x, y in this domain, 1) First we consider the case n = 2. Then we can identify points of R 2 with complex numbers.
Because of homogeneity of p G (x, y), we can assume that z = 1, so that the triangle inequality becomes We can assume that R ≥ r.
First we will show that if either 0 < r ≤ R ≤ 1 or 1 ≤ r ≤ R, then (4.7) holds. Let us fix some u and v such that x = u 2 , y = v 2 . Then (4.7) is equivalent to the inequality If 0 < r ≤ R ≤ 1, then |u|, |v| ≤ 1 and Therefore, if we put then, by (4.9), we have sh p ≤ sh q + sh s. But this immediately implies p ≤ q + s and th p ≤ th q + th s what is equivalent to (4.7). Since the inequality (4.8) does not change after replacing u and v with u −1 and v −1 , we see that for the case 1 ≤ r ≤ R the inequality (4.9) is also valid.
Thus, we only need to consider the case r ≤ 1 ≤ R. We have consequently, the inequality (4.7) can be written in the form This can be simplified to If we denote then the inequality (4.10) takes the form (4.12) Let a = | sin(φ − ψ)|, b = | sin φ|, c = | sin ψ|, u = arsh b and v = arsh c. Then a ≤ sh (u + v), since a = | sin φ cos ψ − sin ψ cos φ| ≤ | sin φ cos ψ| + | sin ψ cos φ| If A, B and C are as in (4.11), then we have A = sh (arsh B + arsh C). By applying the function th to the inequality (4.2) of Lemma 4.1 and combining this with the inequality th (u + v) ≤ th u + th v for u, v ≥ 0, we obtain (4.12).
2) Now we consider the case n = 2. If n = 1, then the statement of the theorem immediately follows from the case 1). Therefore, we will assume that n ≥ 3. Consider the subspace E of R n containing the points 0, x, y and z. Since the Euclidean distance and the function p G are invariant under orthogonal transformations of R n and for n ≥ 2 the triangle inequality is valid, we can assume that E coincides with R 3 .
Without loss of generality we can put |z| = 1. Now consider the vectors Ox, Oy, and Oz from the origin to the points x, y, and z, respectively. Let 2α be the angle between Ox and Oz, 2β be the angle between Oz and Oy, and 2γ be the angle between Ox and Oy; α, β, γ ∈ [0, π/2). Then, by the law of cosines, where R = |x| and r = |y|. Applying the same arguments as above in the case n = 2, we see that we only need to prove the inequality (4.13) where A, B and C is defined by (4.11). Denote a = sin γ, b = sin α, c = sin β. Consider the triangular angle, formed by the vectors Ox, Oy and Oz. It has plane angles equal 2α, 2β and 2γ. Since each plane angle of a triangular angle is less than the sum of its other two plane angles, we obtain 2γ ≤ 2α + 2β, therefore, γ ≤ α + β.
Theorem 4.14. On every domain G R n , n ≥ 1, the point pair function p G is a quasi-metric with a constant less than or equal to √ 5/2.
Proof. To prove that the point pair function p G is a quasi-metric, we only need to find such a constant c ≥ 1 that for all points x, y, z ∈ G. Let where x, y, and z are distinct points from G. Define where the supremum is taken over all domains G R n and triples of distinct points. We will call such domains and triples admissible. We need to prove that c * = √ 5/2. Let us fix a domain G R n and two distinct points x, y ∈ G. Since G = R n , the boundary ∂G = ∅, therefore, there exist points u, v ∈ ∂G such that d G (x) = |x − u| and d G (y) = |y − v|. In the general case, the points u and v might not be unique because there can be several boundary points on the spheres S n−1 (x, d G (x)) and S n−1 (y, d G (y)).
We note that the value p G decreases as G grows, i.e. if G ⊂ G 1 , then p G 1 ( x, y) ≤ p G ( x, y) for all x, y ∈ G.
Consider the two following cases. 1) If u = v, then we can set G 1 = R n \{u}. It is clear that G ⊂ G 1 and p G (x, y) = p G 1 (x, y). Taking into account the invariance of p G under the shifts of R n , we can assume that u = 0. Then, by Theorem 4.6, we have p G 1 (x, y) ≤ p G 1 (x, z)+p G 1 (z, y) for all z ∈ G 1 . From the monotonicity of p G with respect to G, we obtain Therefore, c(x, y, z; G) ≤ 1.
2) Let now u = v. We put y). Consequently, c(x, y, z; G) ≤ c(x, y, z; G 1 ) and the supremum in (4.15) is attained on domains of the type G u,v 1 . Denote a = |x − z|, b = |z − y|, c = |x − y|, ρ = |x − u|, r = |y − v|. By the triangle inequality, we have With the help of the triangle inequality, we also have and this implies d ∆ ( z) ≥ d G 1 (z). Using the obtained inequalities and the fact that the function t → t/ t 2 + γ 2 is increasing on R + when γ is a real nonzero constant, we have and, similarly, p ∆ ( z, y) ≤ p G 1 (z, y). From this, we deduce that c(x, y, z; G 1 ) ≤ c( x, y, z; ∆).
Since the point pair function is invariant under shifts and stretchings, we can assume that ∆ = [−1, 1]. But, by Theorem 3.6, the point pair function fulfills the inequality for all points x, y, z ∈ (−1, 1) with the constant √ 5/2. Therefore, we have c * ≤ √ 5/2. To prove that c * = √ 5/2, consider ∆ = [−1, 1] ⊂ R 1 as a part of R n . Let u = −1 and v = 1 be the endpoints of ∆. Consider the domain G 1 = G u, v 1 . For all x, y ∈ ∆ we have p G 1 ( x, y) = p ∆ ( x, y). Since in (4.16) the constant √ 5/2 is sharp if we take x, y and z from (−1, 1), we obtain that it is sharp for G 1 and, therefore, for the class of proper subdomains on R n . The theorem is proved. Now, we will investigate the sharpness of the constant √ 5/2, if a proper subdomain G of R n is fixed.
Lemma 4.17. If a domain G R n , n ≥ 1, contains some ball B n (z 0 , r) and there are two points u, v ∈ ∂G such that the segment [u, v] is a diameter of B n (z 0 , r), then c = √ 5/2 is the best possible constant for which the inequality y)), x, y, z ∈ G, is valid.
Proof. By Theorem 4.14, the point pair function is a quasi-metric with the constant √ 5/2. The sharpness of this constant follows from the fact that the equality holds for the points x = z 0 + (u − z 0 )/3, z = z 0 and y = z 0 + (v − z 0 )/3 (see Figure 1).

Figure 1.
A domain G and points x, y, z ∈ G for which the equality (4.18) holds.
It follows from Lemma 4.17 that the point pair function p G is a quasi-metric with the best possible constant √ 5/2 if the domain G is, for instance, a ball, a hypercube, a hyperrectangle, a multipunctured real space of any dimension n ≥ 1, or a two-dimensional, regular and convex polygon with an even number of vertices.

The generalized point pair function
In this section, we will consider the generalized version of the point pair function. Namely, note that, by replacing the constant 4 with some α > 0, we obtain the function Let us first consider the case where the domain G is the positive real axis.
Theorem 5.2. For a constant α > 0, the function is a metric if and only if α ≤ 12.
Proof. To prove that for every fixed 0 < α ≤ 12, the function p α R + (x, y) is a metric on the positive real axis, it is sufficient to establish the triangle inequality p α y). Fix first two points x, y > 0. By symmetry, we can assume that x ≤ y. Next, we fix z such that the sum p α R + (x, z) + p α R + (z, y) is at minimum. Without loss of generality, we can assume that 0 < x ≤ z ≤ y because, for all z ∈ (0, x), , y), and, if y < z, then the triangle inequality p α R + (x, y) ≤ p α R + (x, z) + p α R + (z, y) holds trivially. Because the function p α R + is invariant under any stretching by any factor r > 0, we can assume that z = 1.
then it is easy to show that consequently, If u → u 0 or v → v 0 and either u 0 or v 0 equals 1, then G(u, v) tends to a non-negative value. Similarly, this condition holds if u 0 or v 0 equals +∞. Therefore, to prove that the inequality (5.4) holds we only need to show that G(u, u) ≥ 0, u ≥ 1 or, equivalently, This inequality can be written as By denoting t = u 2 + u −2 , we will have t ≥ 2, and the inequality (5.6) takes the form or, equivalently, The inequality (5.7) is valid for α ≥ 12 and t ≥ 2 because for such α and t we have Consequently, the inequality (5.3) holds and, for 0 < α ≤ 12, the function p α R + is a metric. It also follows that the constant 12 here is sharp because, for α > 12, we have 3t 2 − αt + 2α − 12 < 0, 2 < t < (α − 6)/3, and, therefore, the inequality (5.7) is not valid at every point of [2, +∞).
In Theorem 5.11, we prove a result about the function p α G similar to Theorem 5.2 but for the case where G = R n \{0}. See Figure 2 for the disks of the function p α G in R 2 \{0}. However, in order to prove Theorem 5.11, we need to first consider the following lemma.
Lemma 5.8. If A, B, C > 0 and a, b, c ≥ 0 are chosen so that the inequalities Proof. Since the functions t → t/ √ 1 + t 2 and t → t/(1 + t) are increasing on [0, ∞), we can assume that the equality takes place in (5.9).
Consider the function We need to prove that F (x, y) ≥ 0, x, y ≥ 0. We have F (0, 0) = 0. Assume that for some x, y ≥ 0, not equal to zero at the same time, F (x, y) < 0. Consider now the function g(t) = F (tx, ty), t ∈ [0, 1]. It is continuous and g(0) = 0, g(1) < 0. We will show that for small positive t, the inequality g(t) > 0 holds. Actually, , as t → 0. Now, we will show that (5.10) Denote Then a 1 = b 1 + c 1 < 1 and In this notation, the inequality (5.10) can be written in the form It is easy to prove that and it is therefore sufficient to show that which follows from the fact that a 1 > b 1 and a 1 > c 1 .
Theorem 5.11. For a constant α > 0, the function is a metric if and only if α ≤ 12.
Proof. We will only outline the proof because it is similar to that of Theorem 4.6 but, instead of (4.11), we use the following values: By Theorem 5.2, such values satisfy (5.9). We also note that the parameters a, b and c, considered in both the first and second parts of the proof of Theorem 4.6, satisfy the

Open questions
On the base of numerical tests, we propose the following conjectures.
Conjecture 6.1. For a constant α > 0, the function , x, y ∈ R n \B n , n ≥ 2, (6.2) is a metric if and only if α ≤ 12. Conjecture 6.5. The point pair function p G is a metric on the domain G = R 3 \Z, where Z is the z-axis. Remark 6.6. From the proof of Theorem 5.15 it follows that, for α > 0, the generalized version p α B n of the point pair function can only be a quasi-metric in the unit ball with a constant c(α) that has the following lower bound: By differentiation, we have It can be shown that the square-root expression on the right hand side of the inequality (6.7) obtains its maximum with respect to k ∈ (0, 1) at the point k = α + 3 − √ 4α + 9 α + 2 ∈ (0, 1).
Declarations: Availability of data and material Not applicable, no new data was generated. Competing interests On behalf of all the authors, the corresponding author states that there are no competing interest. Funding The work of the second author is performed under the development program of Volga Region Mathematical Center (agreement no. 075-02-2022-882). The research of the third author was funded by the University of Turku Graduate School UTUGS. Authors' contributions DD contributed new ideas and checked the results. SN organized this research and contributed several theorems. OR suggested research ideas and contributed several results. MV did several experiments and suggested problems. Acknowledgments The authors are grateful to the referees for their work.