Let $k$ be a field and $f:M_n(k) \to M_m(k)$ be a morphism of $k$-algebras ($n,m \in \mathbb N$). Prove that $n$ divides $m$.
I have no idea what to do here. I thought that maybe I should take an appropriate block matrix in $M_n(k)$ and use the fact that $f(AB)=f(A)f(B)$ but I suppose I have to use the fact that $f(kA)=kf(A)$ as well. I would appreciate any suggestions.
HINT:
Consider the $M_m(k)$ module $k^m$. Any $M_m(k)$ module is a direct sum of copies of $k^m$.
The same is true for $M_n(k)$ and $k^n$.
Under the morphism $M_n(k) \to M_m(k)$ $\ \ k^m$ becomes an $M_n(k)$ module. Hence it's a sum of copies of $k^n$. Now take $\dim_k$.