Returns a list with two sublists. The first sublist is formed by the values of the matrix M and the second by its corresponding multiplicities.