# An equivalent condition for having finite length

Let $R$ be a commutative noetherian ring, $M$ a finitely generated $R$-module. How can I prove that

$M$ has finite length if and only if $M_p=0$ for every non-maximal prime ideals $p$?

Since $M$ is finite over a Noetherian $R$, it admits a filtration $M=M_0\supsetneq M_1\supsetneq\cdots\supsetneq M_n=0$ of $R$-submodules with successive quotients isomorphic to $R/\mathfrak{p}$ for some prime ideal $\mathfrak{p}$ of $R$. If $\mathfrak{p}$ appears in this way for the filtration, say $M_i/M_{i+1}\cong R/\mathfrak{p}_i$, then localizing at $\mathfrak{p}$ shows that $(M_i)_\mathfrak{p}/(M_{i+1})_\mathfrak{p}\cong R_\mathfrak{p}/\mathfrak{p}R_\mathfrak{p}\neq 0$, so $(M_i)_\mathfrak{p}$ is non-zero, and by exactness of localization $M_\mathfrak{p}$ is not zero.
Now, if your condition holds, it shows by the reasoning above that the quotients in the filtration are of the form $R/\mathfrak{m}$ with $\mathfrak{m}$ maximal. Thus the given filtration is a composition series, so $M$ has finite length.
Conversely, if $M$ has finite length, take a composition series $M=M_0\supsetneq M_1\supsetneq\cdots\supsetneq M_n=0$. Take a non-maximal prime $\mathfrak{p}$. Since $M_{n-1}\cong R/\mathfrak{m}$ for some maximal $\mathfrak{m}$, when we localize at $\mathfrak{p}$ we get $(M_{n-1})_\mathfrak{p}\cong R_\mathfrak{p}/\mathfrak{m}R_\mathfrak{p}=0$ because $\mathfrak{m}$ is not contained in $\mathfrak{p}$. Now do this with $M_{n-2}/M_{n-1}$ to get that it is zero after localizing at $\mathfrak{p}$, and hence so is $M_{n-2}$. Now keep going in this fashion and you'll get $M_\mathfrak{p}=0$.