# How to compute difference between 2 similarity matrices?

Hello, I have two n*n correlation matrices with values ranging between -1,1. (2 correlation matrix because I have the same n terms under 2 different conditions) I then transformed the correlation into a similarity matrix where values range between [0,1]. The similarity was computed using the formula here: http://genomebiology.com/content/inline/gb-2007-8-7-r149-i2.gif where lij = summation(aiu.auj) and aiu= is correlation value between ith and uth element in the correlation matrix. ki,kj in our case is n-1.

This gives me 2 similarity matrices.

My question is how can I compute the difference between the similarity matrices (SIM)? Will doing a simple abs(SIM1-SIM2) make statistical/mathematical sense? Is there a robust way to find/quantify difference between two similarity matrices?

Any ideas will be truly appreciated. Thanks in advance.

• en.wikipedia.org/wiki/… – Steve Huntsman Mar 28 '13 at 19:01
• Sorry, but I seem to be misinterpreting your similarity matrix construction, because I am not getting a matrix with entries in $[0,1]$.... – Suvrit Mar 29 '13 at 18:37

1. Compute distance between the correlation matrices themselves---if your correlation matrices happen to be invertible, then you can use the Riemannian distance $\delta(X,Y) := \|\log(Y^{-1/2}XY^{-1/2}\|_F$ ($F$ signifies the Frobenius norm) between these matrices, because Hermitian positive definite matrices form a Riemannian manifold.
2. If I parsed your formulae correctly, then you are defining a new matrix \begin{equation*} w_{ij} = \frac{a_i^Ta_j + a_{ij}}{n-a_{ij}}, \end{equation*} where $A = [a_{ij}]$ is the original correlat ion matrix. But from its construction, even the matrix $w_{ij}$ is positive semidefinite. However, this matrix $W_{ij}$ need not have entries in $[0,1]$. It can still have negative entries, so maybe I am missing something?