Automorphisms of matrix rings I am trying to classify automorphisms of matrix rings.  I was surprised to be able to find little on the subject by searching (here or elsewhere) though this could be an indication of my poor searching skills rather than the lack of material.
For the moment, I am looking at matrices over a field but I am trying to be as general as possible about the field: not necessarily $\mathbb{R}$ or $\mathbb{C}$ or even necessarily of characteristic $0$.
I am not sure whether it is standard but I am only interested in automorphisms which in a sense preserve the field.  More exactly, they should have this property:
$$\phi(\lambda M) = \lambda\phi(M)$$
I am most interested in automorphisms due to the matrix structure rather than ones which are in a sense inherited from the field.
One obvious class of automorphisms is those of the form:
$$A \rightarrow P^{-1}AP$$ where $P$ is invertible.
Now, I need to either find others or prove that all must have this form.
After trying and failing for a while to prove that all must have this form, I started to look for counterexamples.  I found a partial one.  For $M_2(\mathbb{R})$, the automorphism:
$$
\left(\begin{matrix}
        x_{11} & x_{12} \\
        x_{21} & x_{22} \\
        \end{matrix}\right) 
\rightarrow
\left(\begin{matrix}
        x_{11} & -x_{12} \\
        -x_{21} & x_{22} \\
        \end{matrix}\right) 
$$
[This was originally mistyped giving the appearance that it was only defined for symmetric matrices.]
cannot be expressed in this form but if I extend to $M_2(\mathbb{C})$ it can with
$$ P = 
\left(\begin{matrix}
        i & 0 \\
        0 & -i \\
        \end{matrix}\right) 
$$
So, I may need to consider whether allowing extensions of the field would cover all automorphisms.  The question now becomes: are all automorphisms of this form if field extensions are allowed or can I find a counterexample to that.
My attempts mostly involve considering possible images of simple matrices e.g. ones with a single entry of $1$ and otherwise $0$.
This is not homework, I am long past that.  It is an old man doing self-imposed brain exercise.
Some hints rather than a complete answer would be appreciated since the purpose is to exercise my brain.
 A: What you are interested in are the $K$-algebra automorphisms of $M_n(K)$, where $K$ is an arbitrary field (i.e. the ring automorphisms which are $K$-linear).
They are perfectly known. In fact, any such automorphism is inner, that is, of the form $${\rm Int}(P): M\in M_n(K)\mapsto PMP^{-1}\in M_n(K),$$ where $P\in GL_n(K)$.
Your counterample is not a counterexample because it is not defined for every matrix (you took only symmetric ones).
The following exercise provides you an explicit way to write any automorphisme of $K$-algebras of $M_n(K)$ as an inner automorphism:
Let $n\geq 1$ be an integer. For $1\leq i,j\leq n$, we denote by $E_{ij}\in M_n(K)$ the matrix whose entries are all zero, except for the entry at row $i$ and column $j$, which equals $1$.
Let $\rho:M_n(K)\to M_n(K)$ be an automorphism of $K$-algebras.
1) Show that for all $M\in M_n(K),$ $M$ and $\rho(M)$ have the same characteristic polynomial. Deduce that the image of a projector of rank $1$ is a projector of rank $1$.
2) Deduce that there exist two non-zero vectors $C,C'\in K^n$ such that 
$\rho(E_{11})=CC^{'t}$ and $C^{'t}C=1$.
For $j=1,\ldots,n,$ we set $C_j=\rho(E_{j1})C$. 
3) For $1\leq i,j, m\leq n$, check that $\rho(E_{ij})C_m=\delta_{jm}C_i$.
4) Compute $\rho(E_{1j})C_j$; deduce that $C_1=C$, and that $C_j$ is non-zero for $j=1,\ldots,n.$
5) Deduce from $2)$ that $(C_1,\ldots,C_n)$ is a $K$-basis of $K^n$.
6) Let $P\in M_n(K)$ be the matrix whose columns are $C_1,\ldots,C_n$. Use the previous questions to show that $P$ is invertible and that $\rho(E_{ij})P=P E_{ij}$ for $1\leq i,j\leq n.$
7) Deduce that $\rho={\rm Int}(P)$.
If I have time, I will give you a detailed solution, but later on.
