Triangular inequality . This is the name of one of the characterizations in the axiomatic definition of distance and then speaking of metric space. Similarly when defining a norm [1]
This property also serves to characterize the metrics or distances that ultimately define topological structures and various geometries.
Summary
[ hide ]
- 1 Statement
- 2
- 1 Metrics.
- 1.1 Discrete metrics.
- 1.2 Euclidean metrics.
- 3 References
- 4
- 1 Metrics.
Statement
Let three points A, B, C of a space and give their respective distances, it is true:
- | AB | <| BC | + | AC | .
- | AC | <| AB | + | BC | .
- | BC | <| AB | + | AC | .
This property is called triangular inequality .
The variant of instead of strict inequality using semi-inequality (less than or equal) is used in some metrics and definitions of mathematical structures.
Importance.
Triangular inequality allows defining that three segments a , b , c may or may not form a triangle. Below is a Python code snippet showing a Boolean function that determines whether these segments can shape the sides of a triangle by applying the triangle inequality.
def Sides_Triangle (a, b, c): return (a <b + c) and (b <a + c) and (c <a + b)
Metrics.
It is one of the basic properties that serves from the algebraic, geometric points of view to identify metrics or distances.
In any case, if d is a metric, it must satisfy the triangular inequality:
- d (a, b) <d (a, c) + d (c, b)for any 3 objects a , b , c .
Discrete metric.
Let the discrete Metric be defined as follows:
- d (x, y) = 0if x = y .
- d (x, y) = 1if not.
For a , b , c different objects, the triangular inequality is always satisfied:
d (a, b) <d (a, c) + d (c, b)
<=> 1 <1 + 1
<=> 1 <2 (True).
Euclidean metric.
Let the Euclidean metric or Euclidean distance be defined according to the expression:
where A = (a 1 ; a 2 ; …; a n ) and B = (b 1 ; b 2 ; …; b n ) .
If we also have another point C = (c 1 ; c 2 ; …; c n ) . It is also true:
d (A, B) <d (A, C) + d (C, B)

