How many total matrices and commutative matrices or commutative sets are possible in GL(r,Zn)?
Firstly, note that this only make sense for a prime, as otherwise this will not be a group so GL(...) would be incorrect notation!
I'm note entirely sure what you mean. However, define to be the center of your group (Z stands for Zentrum; Germany was the world's mathematical superpower before the 1930, when group theory was in its infancy). This set is the set of all elements which commute with every element in your group. It is a subgroup of (in fact, it is normal too).
In the center consists of all diagonal matrices where the elements on the diagonal are constant (e.g. they are all 3, or are all 5, or are all 23514). Thus, the set of matrices which commute with every other matrix is the set,
.
I hope that answers the middle bit...
What do you mean by a total matrix?
Okay. Well, let commute with every matrix in , your General Linear group. Then, specifically, commutes with the elementary matrices (matrices with 0s off the diagonal and all 1s on the diagonal apart from in one position). Then multiplying on the right by such a matrix corresponds to an elementary column operation, while multiplication on the left corresponds to an elementary row operation. This implies must be diagonal.
Further, swapping the th and th rows gives you the same matrix as swapping the th and th rows. Such operations correspond to invertible matrices. Thus, all the entries in the diagonals must be the same.
Therefore, is of the required form. Such a matrix clearly does commute with everything, and we are done.
(I would recommend sitting down with this proof for a while a mulling it over, as well as trying a few examples. It is kinda tricky to get your head around...)