# Commutative Rings and Ideals

I'm having trouble understanding some of the subset theory for commutative rings. Is it possible to sandwich a non-ideal within 2 ideals of commutative rings? So for example, is it possible to construct a commutative ring A and subgroups $I \subset J \subset K \subset A$ such that I, K are ideals and J is not?

-
Sure. Take $I = (0)$ and $K = (A)$, then take $J$ any proper subset containing $0$ and at least one other element that isn't an ideal. –  Qiaochu Yuan Dec 14 '12 at 22:27
You want to avoid trivial examples, like $I=(0)$, $K=A=\Bbb Q$, and $J=\Bbb Z$? –  Brian M. Scott Dec 14 '12 at 22:28

Hard to get away from using the trivial ideal for $I$, but here is a fairly nontrivial example. Let $A=\mathbb{Z}[i]$ be the ring of Gaussian integers, $K=(1+i)$ be the principal ideal generated by $(1+i)$, $J=2\mathbb{Z}$ be the additive subgroup of even integers with 0 imaginary part, and $I=(0)$ the trivial ideal. Since $(1+i)(1-i)=2$, $J \subseteq K$. $J$ is not an ideal since $2 \in J$ but $2i \not\in J$. Thus,
$$(0) \subset 2\mathbb{Z} \subset (1+i) \subset \mathbb{Z}[i]$$
Sure I would expect you to be able to do this most of the time. Let $I \subsetneq J$ be ideals in some ring $R$. Then for any $a \in J \setminus I$ we can consider the additive subgroup of $R$ generated by $I$ and $a$. Usually this won't be all of $J$. For instance if $R=k[x]$ a polynomial ring over a field, $I=(x^3)$ and $J=(x)$ then $K$ could be additive subgroup generated by $(x^3)$ and $x$. This has a rather nice description as polynomials with no constant or $x^2$ term.