There is a lexicographic ordering of -tuples. Thus, the rows of a -matrix can be ordered lexicographically decreasing from the top by permutations, or analogously the columns from the left. It is shown that -matrices allow a simultaneous ordering of the rows and the columns. Those matrices are called doubly ordered, and their structure is determined. An answer is given to the question of whether a -matrix can be transformed into a block diagonal matrix by permutations of the rows and the columns; in fact, the double ordering of a -matrix already displays the finest block diagonal structure. Moreover, fast algorithms are presented that double order a -matrix.