# How to compare two distance matrices?

Suppose that I have two distance matrices for the same set of items. By a distance matrix I mean a square matrix whose (i,j)th entry holds the distance (in terms of cosine similarity) between ith and jth items. The ith and jth items are the same items in both matrices. Such a situation might happen when we gather information about a set of items from two different sources.

What I want to do is to compare these two distance matrices. Whether they are similar or not with respect to the distance relations among items.

One idea is to find the correlation between the elements of the two matrices (only the upper triangular elements since these are symmetric matrices). This can be done by Mantel's test.

Another thing comes to mind is to build clusters out of these distance matrices and compare the resultant two clusterings. But does this give any additional information over Mantel's test?

Can we use other measures to understand the similarity between these two distance matrices or the above two methods are enough?

To make things concrete, the items are documents. One set consists of wikipedia documents written in English and the other set consists of the same documents written in another language (say German). Documents are encoded as tf*idf vectors and their similarity values are measured using cosine similarity. So one distance matrix hold the similarities of the English documents and the other one holds the similarities of the German documents

Thanks Ahmet

-
It's easy to come up with many different ways of quantifying "similar" in this context. It's hard to choose among them without knowing anything about why you seek to measure similarity, what you will conclude from the result, and what the possible consequences of an incorrect conclusion might be. It would also help immensely to have some kind of model, either physical or statistical, describing how differences between the matrices can arise. Could you perhaps share some of that kind of information with us? –  whuber Mar 20 '12 at 16:05
The items are documents. One set consists of wikipedia documents written in English and the other set consists of the same documents written in another language (say German). Documents are encoded as tf*idf vectors and their similarity values are measured using cosine similarity. So one distance matrix hold the similarities of the English documents and the other one holds the similarities of the German documents. I hope this is useful –  Ahmet Yılmaz Mar 20 '12 at 19:05
Define a distance $d(A,B)=\|A-B\|$ using some suitable matrix norm $\|\cdot\|$, use it in your problem and see if the answers are meaningful. One possible norm is $\|A\|=\max_{1\leq j\leq n} \sum_{i=1}^m |a_{ij}|$. –  Zen Mar 20 '12 at 22:00