# edm2gram: Linear Matrix Operator In great-northern-diver/edmcr: Euclidean Distance Matrix Completion Tools

## Description

`edm2gram` Linear transformation of a Euclidean Distance Matrix to a Gram Matrix

## Usage

 `1` ```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:

edm2gram(D_{n}^{-}) = B_{n}^{+}

where D_{n}^{-} is the space of symmetric, hollow matrices, negative definite on the space spanned by x'e = 0 and B_{n}^{+} 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 D_{n}^{-}.

Using this result, combined with the properties of edm2gram we therefore have that D is an EDM iff D is pre-EDM and edm2gram{D} is positive semi-definite.

## Value

G A Gram Matrix, where G = XX', and X is an nxp matrix containing the point configuration.

## Examples

 ```1 2 3 4``` ``` XY <- cbind(runif(100,0,1),runif(100,0,1)) D <- dist(XY) edm2gram(as.matrix(D)) ```

great-northern-diver/edmcr documentation built on Dec. 20, 2021, 12:52 p.m.