Euclidean distance matrix

From testwiki
Revision as of 03:22, 3 January 2024 by imported>Andriy prm (Characterizations: squares of the distances were missing in the statement)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In mathematics, a Euclidean distance matrix is an Template:Math matrix representing the spacing of a set of Template:Mvar points in Euclidean space. For points x1,x2,,xn in Template:Mvar-dimensional space Template:Math, the elements of their Euclidean distance matrix Template:Mvar are given by squares of distances between them. That is

A=(aij);aij=dij2=xixj2

where denotes the Euclidean norm on Template:Math.

A=[0d122d132d1n2d2120d232d2n2d312d3220d3n2dn12dn22dn320]

In the context of (not necessarily Euclidean) distance matrices, the entries are usually defined directly as distances, not their squares. However, in the Euclidean case, squares of distances are used to avoid computing square roots and to simplify relevant theorems and algorithms.

Euclidean distance matrices are closely related to Gram matrices (matrices of dot products, describing norms of vectors and angles between them). The latter are easily analyzed using methods of linear algebra. This allows to characterize Euclidean distance matrices and recover the points x1,x2,,xn that realize it. A realization, if it exists, is unique up to rigid transformations, i.e. distance-preserving transformations of Euclidean space (rotations, reflections, translations).

In practical applications, distances are noisy measurements or come from arbitrary dissimilarity estimates (not necessarily metric). The goal may be to visualize such data by points in Euclidean space whose distance matrix approximates a given dissimilarity matrix as well as possible — this is known as multidimensional scaling. Alternatively, given two sets of data already represented by points in Euclidean space, one may ask how similar they are in shape, that is, how closely can they be related by a distance-preserving transformation — this is Procrustes analysis. Some of the distances may also be missing or come unlabelled (as an unordered set or multiset instead of a matrix), leading to more complex algorithmic tasks, such as the graph realization problem or the turnpike problem (for points on a line).[1][2]

Properties

By the fact that Euclidean distance is a metric, the matrix Template:Mvar has the following properties.

In dimension Template:Mvar, a Euclidean distance matrix has rank less than or equal to Template:Math. If the points x1,x2,,xn are in general position, the rank is exactly Template:Math

Distances can be shrunk by any power to obtain another Euclidean distance matrix. That is, if A=(aij) is a Euclidean distance matrix, then (aijs) is a Euclidean distance matrix for every Template:Math.[3]

Relation to Gram matrix

The Gram matrix of a sequence of points x1,x2,,xn in Template:Mvar-dimensional space Template:Math is the Template:Math matrix G=(gij) of their dot products (here a point xi is thought of as a vector from 0 to that point):

gij=xixj=xixjcosθ, where θ is the angle between the vector xi and xj.

In particular

gii=xi2 is the square of the distance of xi from 0.

Thus the Gram matrix describes norms and angles of vectors (from 0 to) x1,x2,,xn.

Let X be the Template:Math matrix containing x1,x2,,xn as columns. Then

G=XTX, because gij=xiTxj (seeing xi as a column vector).

Matrices that can be decomposed as XTX, that is, Gram matrices of some sequence of vectors (columns of X), are well understood — these are precisely positive semidefinite matrices.


To relate the Euclidean distance matrix to the Gram matrix, observe that

dij2=xixj2=(xixj)T(xixj)=xiTxi2xiTxj+xjTxj=gii2gij+gjj

That is, the norms and angles determine the distances. Note that the Gram matrix contains additional information: distances from 0.

Conversely, distances dij between pairs of Template:Math points x0,x1,,xn determine dot products between Template:Mvar vectors xix0 (Template:Math):

gij=(xix0)(xjx0)=12(xix02+xjx02xixj2)=12(d0i2+d0j2dij2)

(this is known as the polarization identity).

Characterizations

For a Template:Math matrix Template:Mvar, a sequence of points x1,x2,,xn in Template:Mvar-dimensional Euclidean space Template:Math is called a realization of Template:Mvar in Template:Math if Template:Mvar is their Euclidean distance matrix. One can assume without loss of generality that x1=𝟎 (because translating by x1 preserves distances).

Template:Math theorem This follows from the previous discussion because Template:Mvar is positive semidefinite of rank at most Template:Mvar if and only if it can be decomposed as G=XTX where Template:Mvar is a Template:Math matrix.[4] Moreover, the columns of Template:Mvar give a realization in Template:Math. Therefore, any method to decompose Template:Mvar allows to find a realization. The two main approaches are variants of Cholesky decomposition or using spectral decompositions to find the principal square root of Template:Mvar, see Definite matrix#Decomposition.

The statement of theorem distinguishes the first point x1. A more symmetric variant of the same theorem is the following: Template:Math theorem

Other characterizations involve Cayley–Menger determinants. In particular, these allow to show that a symmetric hollow Template:Math matrix is realizable in Template:Math if and only if every Template:Math principal submatrix is. In other words, a semimetric on finitely many points is embedabble isometrically in Template:Math if and only if every Template:Math points are.[5]

In practice, the definiteness or rank conditions may fail due to numerical errors, noise in measurements, or due to the data not coming from actual Euclidean distances. Points that realize optimally similar distances can then be found by semidefinite approximation (and low rank approximation, if desired) using linear algebraic tools such as singular value decomposition or semidefinite programming. This is known as multidimensional scaling. Variants of these methods can also deal with incomplete distance data.

Unlabeled data, that is, a set or multiset of distances not assigned to particular pairs, is much more difficult to deal with. Such data arises, for example, in DNA sequencing (specifically, genome recovery from partial digest) or phase retrieval. Two sets of points are called homometric if they have the same multiset of distances (but are not necessarily related by a rigid transformation). Deciding whether a given multiset of Template:Math distances can be realized in a given dimension Template:Mvar is strongly NP-hard. In one dimension this is known as the turnpike problem; it is an open question whether it can be solved in polynomial time. When the multiset of distances is given with error bars, even the one dimensional case is NP-hard. Nevertheless, practical algorithms exist for many cases, e.g. random points.[6][7][8]

Uniqueness of representations

Given a Euclidean distance matrix, the sequence of points that realize it is unique up to rigid transformations – these are isometries of Euclidean space: rotations, reflections, translations, and their compositions.[1]

Template:Math theorem Template:Collapse top Rigid transformations preserve distances so one direction is clear. Suppose the distances xixj and yiyj are equal. Without loss of generality we can assume x1=y1=0 by translating the points by x1 and y1, respectively. Then the Template:Math Gram matrix of remaining vectors xi=xix1 is identical to the Gram matrix of vectors yi (Template:Math). That is, XTX=YTY, where Template:Mvar and Template:Mvar are the Template:Math matrices containing the respective vectors as columns. This implies there exists an orthogonal Template:Math matrix Template:Mvar such that Template:Math, see Definite symmetric matrix#Uniqueness up to unitary transformations. Template:Mvar describes an orthogonal transformation of Template:Math (a composition of rotations and reflections, without translations) which maps xi to yi (and 0 to 0). The final rigid transformation is described by T(x)=Q(xx1)+y1. Template:Collapse bottom


In applications, when distances don't match exactly, Procrustes analysis aims to relate two point sets as close as possible via rigid transformations, usually using singular value decomposition. The ordinary Euclidean case is known as the orthogonal Procrustes problem or Wahba's problem (when observations are weighted to account for varying uncertainties). Examples of applications include determining orientations of satellites, comparing molecule structure (in cheminformatics), protein structure (structural alignment in bioinformatics), or bone structure (statistical shape analysis in biology).

See also

Notes

Template:Reflist

References

Template:Matrix classes