Algebraic Number Theory - Integral Basis Let $K$ be a number field with $[K:Q] =n$. Let $O_k$ be its ring of algebraic integers.
I understand how there is an integral basis for $Q$, i.e. $\exists$ a $Q$-basis of $K$ consisting of elements of $O_k$. Let this integral basis be denoted by $\omega_1, \omega_2, \dots, \omega_n \in O_k$.
However, I do not understand how this leads to the fact that 
$$\bigoplus_{i=1}^n Z\omega_i \subseteq O_k$$
Could someone elaborate please? Thank you.
 A: That sum is (isomorphic to) the set of all numbers $\sum a_i\omega_i$ where the $a_i$ are integers. But if the $\omega_i$ are in $O_k$ then of course any integer linear combination of them is also in $O_k$. 
A: The text may be trying to make the following point:


*

*if $\omega_1,\ldots,\omega_r$ are any elements of $O_k$ then their $\mathbb Z$-span, which one might denote by $$\sum_i \mathbb Z \omega_i,$$ is contained in $O_k$ (since $O_k$ is closed under addition).

*However, unless that $\omega_i$ are linearly independent over $\mathbb Z$, their span in $O_k$ won't be isomorphic to the direct sum of the $\mathbb Z \omega_i$.
There is always a natural surjection  $$\bigoplus_i \mathbb Z_i \to \sum_i \mathbb Z \omega_i$$ (the source being the direct sum and the target being the span in $O_k$), but in general it has a kernel; indeed, the kernel is the collection of all linear dependence relations between the $\omega_i$.
Now if the $\omega_i$ are an integral basis, then they are linearly independent over $\mathbb Z$, and so the direct sum is embedded into $O_k$.
