Is the minimal number of generators of an ideal the rank of the ideal as a free $\mathbb Z$-module?

In an algebraic number theory course, my lecturer said that any ideal of $\mathcal O_K$, where $K$ is a quadratic number field, is generated by at most two elements. I am wondering why this is. When $K$ is as above, $\mathcal O_K$ is a free $\mathbb Z$-module of rank 2, so I want to say that if an ideal was generated by more than two elements and couldn't be "reduced" to a form that is generated by two elements, then it would be a free $\mathbb Z$-module of rank $>2$, a contradiction.

I am wondering if this logic is justified, in particular:

Is the minimal number of generators of an ideal of $\mathcal O_K$ equal to the rank of the ideal as a free $\mathbb Z$-module?

(If the result is true, this would also give a solution to a generalised result about non-quadratic number fields $K$.)

I can't think of how to start with this, as I have trouble thinking about non-principal ideals.

(My lecturer also mentioned that for any $K$, an ideal of $\mathcal O_K$ will still be minimally generated by at most two generators, but that this is a deep theorem. If you can give me a reference to where this is proved I would be very grateful, though this is not my main question.)

• $O_K$ is a Dedekind domain, and the ideals of Dedekind domains are $2$-generated. – user26857 May 17 '15 at 21:54
• Why is this? This may be the result my lecturer was referring to (see final paragraph) – James May 17 '15 at 21:55
• – Sasha May 17 '15 at 21:56
• Your question is about the ideals of $O_K$ or in general? – user26857 May 17 '15 at 21:58
• The question is about $\mathcal O_K$ but if it can be answered more generally I'm happy to deal with a more general case – James May 17 '15 at 21:59

An ideal is a $\mathbb{Z}$-submodule. It is possible for two elements in $\mathbb{Z}^2$ to generate a proper submodule, but it is not possible for three elements to be linearly independent over $\mathbb{Z}$ (we can always find a nontrivial linear combination that is $0$). Furthermore, any submodule is free and therefore has a linearly independent generating set. Thus an ideal has a minimal generating set with at most two elements because in fact it is additively generated over $\mathbb{Z}$ by a set with at most two elements.

This does not rule out a priori that there exists a minimal generating set with more than two elements, in the sense that none of them could be omitted and have the set still generate the ideal. That would just be the "wrong" generating set, and we could pick a smaller, completely different one.

Note this doesn't answer the main question.

If I understood well your question, the answer is negative: in $\mathbb Z[i]$ the principal ideal $I=(2+i)$ is a free $\mathbb Z$-module of rank two.

On the other side, a two-generated ideal of a quadratic number field is necessarily a free $\mathbb Z$-module of rank two (why?).

In response to your reference questions, Daniel Marcus provides a nice proof (see his text 'Number Fields', Theorem 17) that any ideal in a number ring (thus the number ring itself) can be minimally generated by at most two elements.

• It would be nice if you shared the proof. – vonbrand Sep 5 '15 at 22:34