TITLE: Can you completely permute the elements of a matrix by applying permutation matrices?
QUESTION [35 upvotes]: Suppose I have a $n\times n$ matrix $A$. Can I, by using only pre- and post-multiplication by permutation matrices, permute all the elements of $A$? That is, there should be no binding conditions, like $a_{11}$ will always be to the left of $a_{n1}$, etc.
This seems to be intuitively obvious. What I think is that I can write the matrix as an $n^2$-dimensional vector, then I can permute all entries by multiplying by a suitable permutation matrix, and then re-form a matrix with the permuted vector.

REPLY [28 votes]: Given two elements $a_1$ and $a_2$, the properties "$a_1$ and $a_2$ are on different rows" and "$a_1$ and $a_2$ are on different columns" are preserved by any permutation. Proof:
A column permutation won't affect what row anything is on. A row permutation has to send an entire row to the same row, so if they start on the same row, they end on the same row. Permutations are invertible, so if they can't take two elements on the same row to different rows, they can't take elements on different rows to the same row.  
An analogous argument holds for being on the same or different columns.
Thus, a row and column permutation is completely characterized by what it does to a diagonal; to find out where it sends an arbitrary element, just take the row that its row was sent to, and the column its column was sent to.