---
title: Squared Distance Matrix Overview
url: https://www.emergentmind.com/topics/squared-distance-matrix
type: topic
---

# Squared Distance Matrix Overview

A squared distance matrix is a symmetric hollow matrix whose entries encode squared pairwise distances. In graph-theoretic usage, for a connected graph \(G\) with graph distance \(d_{ij}\), the squared distance matrix \(\Delta(G)\) has diagonal entries \(0\) and off-diagonal entries \(d_{ij}^2\); equivalently, \(\Delta(G)=D(G)\circ D(G)\) when \(D(G)\) is the distance matrix. In Euclidean distance matrix theory, a matrix \(D=(d_{ij})\) is an Euclidean distance matrix precisely when \(d_{ij}=\|p^i-p^j\|^2\) for some point configuration, so the standard EDM is already a squared distance matrix. The same formal object therefore appears in graph spectra, Euclidean embedding, inverse problems, algorithmic linear algebra, and several optimization frameworks [2012.04341][1903.07458][1810.06182].

## 1. Definitions and ambient settings

For a connected graph \(G\) on vertices \(1,\dots,n\), the squared distance matrix is defined entrywise by
\[
\Delta(G)_{ij}=
\begin{cases}
0,& i=j,\\
d_{ij}^2,& i\neq j,
\end{cases}
\]
where \(d_{ij}\) is the length of a shortest path. Several papers also write \(\Delta(G)=D(G)\circ D(G)\), the Hadamard square of the distance matrix \(D(G)\) [2012.04341][2211.13341]. In weighted trees with scalar edge weights, the same definition is used with \(d(i,j)\) equal to the sum of edge weights on the unique \(ij\)-path, and in trees with matrix weights the construction becomes block-valued, with \(\Delta_{ij}=d(i,j)^2\) as an \(s\times s\) block [1810.06182][2205.01734].

For finite point sets in metric spaces, the squared distance matrix is likewise \(\mathfrak D=(d(\xi_i,\xi_j)^2)\). In Euclidean geometry this coincides with the classical Euclidean distance matrix, defined by \(d_{ij}=\|p^i-p^j\|^2\) for points \(p^1,\dots,p^n\) in Euclidean space [1903.07458]. The infinite-size variant considered on a countable set \(\{\xi_k\}_{k\in\mathbb Z}\) in a Riemannian manifold keeps the same entrywise definition \(\mathfrak D(n,m)=\operatorname{dist}(\xi_n,\xi_m)^2\) [2509.10773].

This common definition hides substantial variation in structure. In some settings the matrix is governed by combinatorial block patterns, as in complete multipartite or starlike block graphs; in others it is constrained by realizability in Euclidean space, sphericality, or positivity of associated Gram-type matrices. A plausible implication is that the main theory of squared distance matrices is not a single theorem family but an interface between metric geometry and matrix analysis.

## 2. Euclidean realizability and spherical constraints

A real symmetric zero-diagonal matrix \(D=(d_{ij})\) is an Euclidean distance matrix if there exist points \(p^1,\dots,p^n\) such that
\[
d_{ij}=\|p^i-p^j\|^2.
\]
A central criterion is the Gram-matrix test: for any vector \(s\) with \(e^Ts=1\),
\[
B=-\tfrac12 (I-es^T)D(I-se^T),
\]
and \(D\) is an EDM iff \(B\succeq 0\). With \(s=e/n\), this becomes \(B=-\tfrac12 JDJ\), where \(J=I-\tfrac1n ee^T\). For spherical EDMs, the vector \(w\) satisfying \(Dw=e\) is decisive: if the embedding dimension is \(r<n-1\), then sphericality is equivalent to \(\operatorname{rank}(D)=r+1\), equivalently \(e^Tw>0\), and the radius is
\[
\rho=\frac{1}{\sqrt{2e^Tw}}.
\]
Unit sphericality is therefore characterized by \(e^Tw=\tfrac12\) [1903.07458].

The one-entry perturbation problem for unit spherical EDMs gives a refined local classification. If one fixes all entries of a unit spherical EDM \(D\) except the symmetric pair \((k,l)\), then the admissible set
\[
T_{kl}=\{\,t:\ D+tE_{kl}\ \text{is a unit spherical EDM}\,\}
\]
can take only three forms: a nontrivial interval, exactly two points one of which is \(0\), or the singleton \(\{0\}\). The analysis uses Gram matrices, Gale transforms, and a Cayley–Menger reformulation. In the Cayley–Menger approach,
\[
\widetilde D=
\begin{pmatrix}
0 & e^T\\
e & D
\end{pmatrix},
\]
and the paper shows that \(D\) is unit spherical iff \(\widetilde D\) is nonspherical [1903.07458].

These results separate Euclidean realizability from mere hollow symmetry. A squared distance matrix can be symmetric and zero-diagonal without being an EDM, whereas unit spherical EDMs satisfy stringent rank, positivity, and perturbative constraints.

## 3. Spectral theory for finite graph classes

For graph-based squared distance matrices, inertia and energy are prominent invariants. If \(M\) is Hermitian, its inertia is
\[
i(M)=\bigl(i_+(M),i_-(M),i_0(M)\bigr),
\]
the counts of positive, negative, and zero eigenvalues [2211.13341]. In complete multipartite graphs \(K_{n_1,\dots,n_t}\), the distance structure is especially rigid: vertices in the same part are at distance \(2\), vertices in different parts are at distance \(1\), so the diagonal blocks of \(\Delta(G)\) are \(4(J_{n_i}-I_{n_i})\) and the off-diagonal blocks are \(J_{n_i\times n_j}\). From this block form one obtains the characteristic polynomial
\[
P_{A(G)}(x)=(x+4)^{\,n-t}\left(\prod_{i=1}^{t}(x+4-3n_i)-\sum_{i=1}^{t}n_i\!\!\prod_{j\ne i}(x+4-3n_j)\right).
\]
If every part has size at least \(2\), then
\[
\operatorname{In}(A(G))=(t,0,n-t),
\qquad
E_\Delta(G)=8(n-t).
\]
If singleton parts are present, with \(h=\#\{i:n_i=1\}\ge 1\), then
\[
8(n-t)+2(h-1)\le E_\Delta(G)<8(n-t)+2h.
\]
For fixed \(n\) and \(t\), both the squared distance energy and the spectral radius are maximal at the complete split graph \(S_{n,t}\) and minimal at the Turán graph \(T_{n,t}\) [2012.04341].

Trees exhibit another rigid pattern. If \(T\) is a tree with \(\ell\) leaves and \(t\) degree-2 vertices, then the Bapat–Sivasubramanian theorem gives
\[
i_

Source: https://www.emergentmind.com/topics/squared-distance-matrix