In
mathematics,
computer science and especially
graph theory, a
distance matrix is a
matrix (two-dimensional array) containing the
distances, taken pairwise, between the elements of a set. Depending upon the application involved, the
distance being used to define this matrix may or may not be a
metric. If there are elements, this matrix will have size . In graph-theoretic applications the elements are more often referred to as points, nodes or vertices.