# How to test whether two distance/difference matrices are different?

I would like to test that two difference/distance/dissimilarity matrices are not the same. i.e. the rows and columns between the two matrices represent the same features, but the distances are obtained from 2 populations and I'm interested in whether the difference matrices "look different" between the populations.

I'm think I'm looking for something similar to a Mantel's test, but with the null hypothesis flipped. Whereas (as I understand it) the Mantel test tests for a linear correlation between two dissimilarity matrices against a null hypothesis of no linear correlation, the null in my case is that the two dissimilarity matrices are the same, and I'm interested in rejecting that null when two dissimilarity matrices differ significantly.

As a follow up to this question, once I have some sort of omnibus test for difference, what would be the best way to decompose the differences to contributions from individual cells.

-
I am not sure I understand what you mean by difference/distance/dissimilarity matrix. Assuming that $D_{i,j}^2 = (v_i - v_j)^{\top}(v_i - v_j)$ for some vectors $v_i, v_j$, if you can accept a transformation to the crossproduct matrix $G_{i,j} = -2 v_i^{\top}v_j$ (say for example the vectors are normalized so $v_i^{\top}v_i = 1 = v_j^{\top}v_j$, and so you can subtract out the 2 from $D_{i,j}^2$). Then you can compare the two cross product matrices, $G$ and $H$ call them, by a Wilks' lambda test, I think. I'm not sure, but I think they would both have to be the same rotation away from Wishart matrices. The Wilks' lambda distribution would then describe the ratio of the products of the eigenvalues of the two matrices under the null.