First, some easy observations: T is injective since for any A, there is some B such that the matrices tA+B have different determinants for different scalars t (easy exercise). By multiplying T by T(1)^{-1}, it may be assumed that T(1)=1.

Now note that T preserves the rank of matrices. Indeed, T must preserve the rank n matrices, and then the rank n-1 matrices are just the nonsingular locus in the variety of matrices with determinant 0. This implies T preserves rank n-1 matrices. Rank n-2 matrices are then the nonsingular locus in rank < n-1 matrices so they are preserved, and so on.

Now rank k projections are exactly those rank k matrices which when subtracted from the identity give you something of rank n-k; this is easy to see from Jordan normal form. Thus T sends rank 1 projections to rank 1 projections. Two projections have disjoint ranges and commute iff their sum is also a projection. In particular, for Pi the projections onto a basis ei, T sends Pi to projections Qi onto some other basis fi. Now let U be the change of basis matrix from the ei to the fi. Conjugating T by U shows that we may assume T fixes each Pi. That is, picking the standard basis, T fixes all diagonal matrices.

Now matrices whose only nonzero entries are all either in the first row or first column are characterized by the fact that they are rank 1 and they remain rank 1 if their first diagonal entry changes but they become rank 2 if any other diagonal entry changes. Similar statements hold for other rows and columns. It follows that T(eij) is a multiple of either eij or eji for all j and i, for eij the matrix with ij entry 1 and all others 0. It is now easy to check that we must either always have T(eij)=eij or always have T(eij)=eji, i.e. T(A)=A or T(A)=A^t.