Let $(R,m,k)$ be a local commutative ring and $M$ be a $k$-module. I want to prove that $$\mathrm{length}_R(M)=\dim_k(M)$$
Since it is so obvious, I doubt my own proof.
Let $n=\dim_k(M)$ (could be infinity). Then $M\cong k^n$ as $k$-module (vector space) and hence $M\cong k^n$ as $R$-modules as well (via the natural map $R\to k$), which implies that $\mathrm{length}_R(M)=n$.
Is my proof correct?