# Basis of ring of algebraic integers and free modules

I believe this question is very dumb.

We know the following proposition from Algebraic Number Theory, by J. Milne:

In particular, if $$[K:\mathbb{Q}]=n$$, then the ring of integers $$\mathcal{O}_{K}$$ is a free $$\mathbb{Z}$$-module of rank $$n$$.

Since $$K$$ is a finite extension of $$\mathbb{Q}$$, then $$K=\mathbb{Q}(\alpha)$$ for some $$\alpha \in \mathcal{O}_{K}$$. The minimal polynomial for $$\alpha$$ has degree $$n$$ and $$\{1,\alpha,...,\alpha^{n-1}\}$$ form a basis of $$K$$ as $$\mathbb{Q}$$-vector space. In particular, $$\{1,\alpha,...,\alpha^{n-1}\}$$ is $$\mathbb{Z}$$-linearly independent.

So, I have a set linearly independent with $$n$$ elements. I believe it is a basis for $$\mathcal{O}_{K}$$ as $$\mathbb{Z}$$-module. Therefore $$\mathcal{O}_{K}=\mathbb{Z}[\alpha]$$. But it is not true in general.

For example, if I take $$K=\mathbb{Q}(\theta)$$ where $$\theta^{3}+\theta^{2}-2\theta+8=0$$. Then $$\{1,\theta,\theta^{2}\}$$ is not a basis because $$\beta =\frac{\theta+\theta^{2}}{2}$$ is algebraic integer and $$\beta \notin \mathbb{Z}[\theta]$$.

I would like to understand why there is no contradiction between the proposition and the set $$\{1,\alpha,...,\alpha^{n-1}\}$$ is not always a basis for $$\mathcal{O}_{K}$$.

I believe that the problem is that I can have a linearly independent set with n element, n = rank of the free module, but this set does not span the free module.

• What you might be looking for is an algorithm to find an integral basis, that is, a basis for $\mathcal{O}_{K}$ as a $\mathbb{Z}$-module of rank $n$. You may refer to math.stackexchange.com/questions/2263077/… Bear in mind, that it is rather rare that the basis elements of $\mathbb{Q}(\alpha)$ over $\mathbb{Q}$ happens to also be an integral basis for $\mathbb{O}_{K}$ as a $\mathbb{Z}$-module. Commented May 29, 2020 at 6:55
• Your last observation is exactly it. Even in the rank 1 case, $2 \mathbb{Z} \subseteq \mathbb{Z}$ and $\{2\}$ is a linearly independent subset, but it's not a basis for $\mathbb{Z}$. While a vector space with dimension $0$ must be $\{0\}$, there are lots of nontrivial rank $0$ $\mathbb{Z}$-modules. Commented May 29, 2020 at 20:33

I am not totally sure about what you are asking, since you ask why there is no contradiction between the proposition and some set not being a basis, as it is clear that one does not contradict the other (since both are true).

Let me try to guess what is your problem, by making some clarifications:

If $$K/\mathbb{Q}$$ is a finite extension of degree $$d$$ and $$K=\mathbb{Q}(\alpha)$$ with $$\alpha \in \mathcal{O}_K$$, then $$\mathbb{Z}[\alpha]$$ has rank $$d$$ as $$\mathbb{Z}$$-module, and hence $$\mathbb{Z}[\alpha]\subset \mathcal{O}_K$$ has finite index, but it is rarely an equality.

Another question if it one can choose $$\alpha$$ such that $$\mathbb{Z}[\alpha]= \mathcal{O}_K$$; this is of course, a property of the field, and the answer is again negative in general. Such fields are called monogenic fields.

Finally, since $$\mathbb{Z}[\alpha]\subset \mathcal{O}_K$$ has finite index, say $$m$$, then we have $$K\supset \mathbb{Z}[\frac{\alpha}{m}]\supset \mathcal{O}_K$$ which is a way to make explicit what the proposition says in this case.

• I believe that actually my question is: Let A be a ring and let M be A free module of rank n. Is possible that I can find a set with n linearly independent elements in M such that this set is not a basis for M? Commented May 29, 2020 at 15:10
• Yes. Let $A$ be an integral domain. Take $M=A$ which is free of rank $1$, and take $e\in M$ a non zero element which is not invertible. Then $e$ is linearly independent over $A$ since it is non zero and $A$ is an integral domain. However, this is not a basis. Otherwise, $M=A=Ae$, and we would have $1=ae$ for some $a$, meaning $e$ is invertible. For a concrete example, take $M=A=\mathbb{Z}$ and $e=2$. Commented May 29, 2020 at 15:15

For a free module over a field (or skew-field), a maximal linearly independent set is a basis. But that is certainly not true over an arbitrary ring.

A silly example: $$\mathbb Z$$ is a free $$\mathbb Z$$-module of rank $$1$$, but the maximal linearly independent set $$\{ 2\}$$ is not a basis.