Definition of metric space |
- A set of elements with a distance function defined between any two elements of the set
|
|
|
- Non-negativity:
|
|
- Identity:
|
|
- Symmetry:
|
|
- Triangular inequality:
|
- Pseudometric space: Condition 2 (identity) is relaxed
|
|
- Example: Number of vertices and edges of a graph
|
- Quasimetric space: Condition 3 (symmetry) is relaxed
|
|
- Example: Time to walk from plain A to hill B
|
- Semimetric space: Condition 4 (triangular inequality) is relaxed
|
|
- Example: Air fares on certain routes
|