Does there exist a ring which is not a principal ideal ring and which has exactly six different ideals?

Solution 1:

Yes; the ring $R=\mathbb{F}_2[x,y]/(x,y)^2$ has exactly six ideals, namely $$R$$ $$|$$ $$(x,y)$$ $$\text{ / }\qquad |\qquad \text{ \ }$$ $$\quad\quad(x)\quad\quad(y)\,\,\,\,\quad (x+y)$$ $$\text{ \ } \qquad |\qquad \text{ / }$$ $$(0)$$ There are only 8 elements of the ring (representatives are of the form $a+bx+cy$, for $a,b,c\in\mathbb{F}_2$) and one can check that these are all the ideals by first examining all the principal ideals, which end up being the ideals $(0),(x),(y),(x+y),R=(1)$; then noting that any non-principal proper ideal must contain exactly 4 elements (as an additive subgroup of $R$, it must have size 1, 2, or 4; but if it is of size 1 or 2 it will necessarily be principal, generated by either 0 (if size 1) or its non-zero element (if size 2)), and any of the 4 elements $1+bx+cy$ is a unit, so it can't contain any of them if it is to be proper. Hence the only non-principal ideal is $(x,y)$.

By the way, this ring came up in my question here.