Distance Matrix¶
An indexed square array whose entry records a declared pairwise distance or dissimilarity, with metric properties present only when the underlying function satisfies them.
Core Idea¶
For items x1,…,xn, a distance matrix stores D_ij=d(x_i,x_j). Index order and the distance rule are part of its identity. If d is a metric, the diagonal is zero, entries are nonnegative, the matrix is symmetric, and triangle inequalities hold.
Many useful matrices are nonmetric. Directed shortest-path costs can be asymmetric; disconnected pairs may be infinite; negative cycles can make unbounded path distance undefined. Algorithms must therefore consume the properties actually established, not those suggested by the word distance.
How would you explain it like I'm…
The How-Far Table
Table of Pairwise Distances
Pairwise Distance Array
Scope of Application¶
- Graph algorithms. All-pairs shortest paths populate vertex distances.
- Clustering. Pairwise dissimilarities drive linkage and embedding methods.
- Phylogenetics. Evolutionary distances summarize pairwise divergence.
- Spatial analysis. Coordinates induce geometric metric matrices.
Clarity¶
Report item order, units, direction, formula, preprocessing, unreachable values, and verified axioms. A heat map without those declarations can be visually compelling but semantically ambiguous. This distinction is operationally important. Inclusion test: Declare items, indexing, distance rule, direction, units, missing/unreachable convention, and whether metric axioms are asserted. Exclusion test: Exclude covariance matrices, adjacency matrices, similarities treated as distances without transformation, and mixed-scale entries. Nearest boundary: An adjacency matrix records direct links; a graph distance matrix records shortest-path distance, often including indirect routes. Exit condition: It ceases to represent the claimed distance when indices or rules vary across entries.
Manages Complexity¶
The matrix makes every pair query immediate and supports linear or tropical algebra, at quadratic storage cost. It compresses raw objects but discards why each distance arose.
Abstract Reasoning¶
- Fix item identities and order.
- Define one pairwise rule and units.
- Compute every ordered pair consistently.
- Test symmetry, diagonal, positivity, and triangle inequality before using metric algorithms.
- Represent unreachable or undefined values explicitly.
Knowledge Transfer¶
Distance matrices transfer across domains when pairwise meaning and required axioms are stated. Similar-looking square arrays do not inherit the identity.
Relationships to Other Abstractions¶
Current abstraction Distance Matrix Domain-specific
Parents (1) — more general patterns this builds on
-
Distance Matrix is a kind of Matrix Domain-specific
A Distance Matrix is a Matrix whose indexed entries record pairwise distances or dissimilarities among the same declared objects.
Hierarchy paths (5) — routes to 5 parentless roots
- Distance Matrix → Matrix → Tensor → Transformation → Function (Mapping)
- Distance Matrix → Matrix → Linearity
- Distance Matrix → Matrix → Representation → Abstraction
- Distance Matrix → Matrix → Tensor → Invariance
- Distance Matrix → Matrix → Tensor → Vector Space → Set and Membership
Neighborhood in Abstraction Space¶
Distance Matrix sits in a crowded region of the domain-specific corpus (25th percentile for distinctiveness): several abstractions share nearly its structure, so a description that fits it tends to fit its neighbors too.
Family — Matrices, Measures & Numeric Structures (30 abstractions)
Nearest neighbors
- Matrix Multiplication — 0.91
- Rank-Size Distribution — 0.90
- Canberra Distance — 0.89
- Database Index — 0.89
- Grey Relational Analysis — 0.89
Computed from structural-signature embeddings · 2026-10-08