Path metric Created 2026-09-24 Updated 2026-11-05
Given positive edge lengths on a graph, define the distance between two vertices by
where ranges over finite graph paths. An absent path gives distance . On a finite connected graph, this is a metric: reversing and concatenating routes gives symmetry and the triangle inequality, while the least edge length bounds every nonempty path away from zero. It is also a metric on a connected locally finite graph, since every path leaving a fixed vertex pays at least the positive minimum of its finitely many incident edge lengths.
Positive edge lengths alone do not guarantee a metric on an arbitrary infinite graph. Join two vertices through intermediate vertices , with both edges having length . Then for every , so distinct vertices have distance zero. On each finite-distance component the general construction is a pseudometric; its zero-distance classes give a metric quotient.