The Integral Domain Hierarchy, part 2
/In any area of math, it's always good idea to keep a few counterexamples in your back pocket. This post continues part 1 with examples/nonexamples from some of the different subsets of integral domains.
 $\mathbb{Z}[i\sqrt{5}]$ is an integral domain which is not a UFD
 That $\mathbb{Z}[i\sqrt{5}]$ an integral domain is easy to check (just computation).
 It's not a UFD since we can write $6=2\cdot 3 = (1+i\sqrt{5})(1i\sqrt{5})$ as two distinct facorizations into irreducibles*
 Note: Since $\mathbb{Z}[i\sqrt{5}]$ is not a UFD, neither is it a PID nor a Euclidean domain.
 $\mathbb{Z}[x]$ is a UFD which is not a PID
 We know $\mathbb{Z}[x]$ is a UFD because $\mathbb{Z}$ is a UFD (recall, a commutative ring $R$ is a UFD iff $R[x]$ is a UFD).
 The ideal $(2,x)=\{2f(x)+xg(x):f(x),g(x)\in\mathbb{Z}[x]\}$ (polynomials with even constant term) is not principal**
 $\mathbb{Z}[\frac{1}{2}+i\frac{\sqrt{19}}{2}]$ is a PID which is not a Euclidean domain
 This is a PID since it has a DedekindHasse norm (see Dummit and Foote, 3rd ed., $\S8.2$).
 It is not a Euclidean domain since it has no universal side divisors (ibid.).
 $\mathbb{Z}$ is a Euclidean domain which is not a field
 $\mathbb{Z}$ is a Euclidean domain via the absolute value norm (which gives the familiar division algorithm).
 It is not a field since the only elements which are units are $1$ and $1$.
 Write $2=\alpha \beta$ for $\alpha,\beta \in \mathbb{Z}[i\sqrt{5}]$. Then $\alpha = a+ib\sqrt{5}$ and $N(\alpha)=a^2+5b^2$ for some integers $a,b$. Since $4=N(2)=N(\alpha)N(\beta)$, we must have $a^2+5b^2=1,2$ or $4$. Notice $b=0$ must be true (since $a^2+5b^2\not\in\{1,2,4\}$ for $b\geq 1$ and for any $a$). Hence either $\alpha=a=1$ or $2$. If $\alpha=1$ then $\alpha$ is a unit. If $\alpha=2$, then we must have $\beta=1$ and so $\beta$ is a unit.
 Showing 3 is irreducible follows a similar argument.
 Write $1+i\sqrt{5}=\alpha\beta$ with $\alpha = a+ib\sqrt{5}$ so that $N(\alpha)=a^2+5b^2\in\{1,2,3,6\}$ since $6=N(\alpha)N(\beta)$. Consider two cases:
 If $b=0$, then $a^2\in\{1,2,3,6\}$ which is only true if $a^2=1$ and so $\alpha=a=\pm 1$ is a unit.
 If $b>0$, we can only have $b^2=1$ (since $b^2>1$ gives a contradiction), and so $a^2+5\in\{1,2,3,6\}$ which implies $a^2=1$. Hence $\alpha=\pm 1\pm i\sqrt{5}$ and so $N(\alpha)=6$. This implies $N(\beta)=1$ and so $\beta=\pm 1$ which is a unit.
 Showing $1i\sqrt{5}$ is irreducible follows a similar argument.

Suppose to the contrary $(2,x)=(f(x))$ for some polynomial $f(x)\in \mathbb{Z}[x]$. Since $2\in (f(x))$, we must have $2=f(x)p(x)$ for some $p(x)\in \mathbb{Z}[x]$. Hence $0=\deg f(x) + \deg p(x)$ which implies both $f(x)$ and $p(x)$ are constants. In particular, since $2=\pm 1\cdot \pm 2$, we need $f(x),p(x)\in\{\pm 1, \pm 2\}$.
If $f(x)=\pm 1$, then $(f(x))=\mathbb{Z}[x]$ which is a contradiction since $(f(x))=(2,x)$ must be a proper ideal (not every polynomial over $\mathbb{Z}[x]$ has even constant term). It follows that $f(x)=\pm 2$. But since $x\in (f(x))$ as well, $x=2r(x)$ for some $r(x)\in \mathbb{Z}[x]$. But of course this is impossible for any polynomial with integer coefficients, $r(x)$. Thus $(2,x)$ is not principal.
Reference: D. Dummit and R. Foote, Abstract Algebra, 3rd ed., Wiley, 2004. (ch. 8)