1. A method for re-ordering and visualizing a matrix in the presence of a data hierarchy stored on a computer system, the method comprising: receiving a matrix, A, in the computer system, the matrix A having rows and columns; reordering the matrix A so that groups of related rows and columns are brought in adjacent matrix positions, wherein reordering the matrix A obeys constraints imposed by the data hierarchy on at least one of the rows and the columns; and reordering the hierarchy on at least one of the rows and columns, wherein affinities in the data hierarchy are extracted by the reordering of the data hierarchy.