A tree metric on a finite set is a metric obtained by labeling
the leaves of an edge-weighted tree by the elements of
and defining
to be the sum of the edge weights along the unique path
between the leaves
and
.
A finite metric is a tree metric iff it satisfies the four-point condition. The representing tree is unique after suppressing unlabeled vertices of degree 2 and requiring its internal edge weights to be positive. Tree metrics are used in the study of phylogenetic trees and distance matrices.