# Ideal of number fields

Let $$K$$ be a number field over $$\mathbb{Q}$$ and let $$n$$ be $$[K:\mathbb{Q}]$$

Then it is clear for an ideal $$I \in I(K)$$ that $$I$$ is a vector space over $$K$$ of degree $$\leq n$$.

Now it is clear that a principal ideal $$P \in P(K)$$ is a vector space over $$\mathbb{Q}$$ of degree $$n$$.

It follows therefore that an ideal $$I$$ is a vector space over $$\mathbb{Q}$$ of degree $$\leq n^n$$.

Can you do better? It's wishful thinking to suppose $$I$$ is a vector space over $$\mathbb{Q}$$ of degree $$\leq n$$ or isn't it?

The ideal $$I$$ is not a vector space over either $$K$$ or $$\mathbb Q$$ (or any field), so it does not have a $$K$$- or $$\mathbb Q$$-dimension.
An ideal $$I$$ of a number field $$K/\mathbb Q$$ is by definition an ideal of the ring of integers $$\mathcal O_K$$. In particular, it's an $$\mathcal O_K$$-module. The ring $$\mathcal O_K$$ is a free $$\mathbb Z$$-module of rank $$n = [K\,\colon\mathbb Q]$$, so if $$I$$ is a principal ideal, then $$I$$ is also a free $$\mathbb Z$$-module of rank $$n$$. On the other hand, it is true that any $$I$$ can be generated as an ideal by two elements (this is a consequence of the fact that $$\mathcal O_K$$ is a Dedekind domain). Note however that if $$I$$ is not principal (so you really need at least two generators), then it cannot be free as a $$\mathbb Z$$-module, so it is not isomorphic to any $$\mathbb Z^k$$. The best you can say is that $$I$$ can be generated by $$2n$$ elements over $$\mathbb Z$$.
Explicitly, if $$\alpha_1,\dots ,\alpha_n$$ forms an integral basis for $$\mathcal O_K$$, so that the $$\alpha_i$$ generate $$\mathcal O_K$$ as a $$\mathbb Z$$-module, and if $$I$$ is generated by $$\theta, \phi\in\mathcal O_K$$, then $$\{ \theta\alpha_1, \dots , \theta\alpha_n, \phi\alpha_1, \dots , \phi\alpha_n \}$$ is a set of generators for $$I$$ over $$\mathbb Z$$.