# Matrix clustering in Mathematica?

Suppose I have a square matrix $M$, which you can think of as the weighted adjacency matrix of a graph $G$. I want to order the vertices of $G$ in such a way that the entries of the matrix $M$ are clustered. By this I mean that the weights that are close in value should appear close in $M$.

I know Mathematica has some clustering algorithms implemented. How can I do this with Mathematica?

• See FindClusters and/or ClusteringComponents – kglr Oct 13 '14 at 20:05
• @kguler I have seen those functions, but I don't know how to use them to solve my problem. – becko Oct 13 '14 at 20:48
• Good question.. – Daniel Lichtblau Oct 14 '14 at 1:00