TITLE: Height and minimal number of generators of an ideal.
QUESTION [5 upvotes]: Can anyone could give me a reference in a book about the proof of the following

Let $I$ be an ideal of a ring. We denote with $\operatorname{ht}(I)$ the height of $I$, and by $\mu(I)$ the minimal number of generators of $I$. Then $$\operatorname{ht}(I)\le\mu(I).$$ 

Does it hold only for primes ideals?
Thanks in advance.

REPLY [3 votes]: Usually this is proved for prime ideals, but it holds for any ideal. 
If $I$ is generated by $n$ elements, and $P$ is a minimal prime over $I$, then $\operatorname{ht}P\le n$. But $\operatorname{ht}I=\min_{I\subseteq P}\operatorname{ht}P$, so the conclusion follows.