edm2gram {edmcr} | R Documentation |
Linear Matrix Operator
Description
edm2gram
Linear transformation of a Euclidean Distance Matrix to a Gram Matrix
Usage
edm2gram(D)
Arguments
D |
A Euclidean Distance Matrix |
Details
While we specify that the input should be a Euclidean Distance Matrix (as this results in a Gram Matrix) the domain of edm2gram is the set of all real symmetric matrices. This function is particularly useful as it has the following property:
where is the space of symmetric, hollow matrices, negative definite on the space spanned by
and
is the space of centered positive definite matrices.
We can combine these two properties with a well known result: If D is a real symmetric matrix with 0 diagonal (call this matrix pre-EDM),
then D is a Euclidean Distance Matrix iff D is negative semi-definite on .
Using this result, combined with the properties of edm2gram we therefore have that
D is an EDM iff D is pre-EDM and is positive semi-definite.
Value
G A Gram Matrix, where G = XX', and X is an nxp matrix containing the point configuration.
Examples
XY <- cbind(runif(100,0,1),runif(100,0,1))
D <- dist(XY)
edm2gram(as.matrix(D))