TITLE: Invariant basis number for matrix algebras
QUESTION [6 upvotes]: Let $\mathbb{k}$ be a field (we can suppose $k=\mathbb{R}$ or $\mathbb{C}$ if necessary). Let $M_n(\mathbb{k})$ denote the ring of matrices with entries in $\mathbb k$.
Recall that a ring $R$ has the invariant basis number (IBN) property if any two bases of a finitely generated free $R$-module must have the same cardinality.
Question: Does $M_n(\mathbb{k})$ have the invariant basis number property?
I've been able to find a result saying that any commutative $R$ has IBN. On the other hand, the simplest $R$ that I came across without IBN, namely the column finite matrices, involves infinite indexing sets. This would suggest that $M_n(\mathbb{k})$ has IBN, but I don't have a proof/reference for this fact.

REPLY [5 votes]: Yet another way, albeit less general than the ones given already:
$M_n(k)$ has composition series length $n$. If $R^p\cong R^q$ as $R$ modules, comparing composition lengths would give $np=nq$, and this would imply $p=q$.
This proof works, of course, for any Artinian ring $R$.