Domains and their field of fractions
An integral domain is a nonzero commutative ring with no zero divisors: ab = 0 forces a = 0 or b = 0. Equivalently, nonzero elements cancel — this is exactly what you need to do algebra like in the integers. The construction that turns a domain into a field mimics how Q is built from Z: form fractions a/b with b ≠ 0, declare a/b = c/d when ad = bc, and check the operations are well defined.
The result is the field of fractions Frac(R), the smallest field containing R, and it comes with a universal property: any injective homomorphism from R into a field factors uniquely through Frac(R). For R = Z you get Q; for R = k[x] you get the rational functions k(x); for the Gaussian integers Z[i] you get Q(i). Cancellation is not optional — if R had zero divisors, a/b = 0/1 would not be detectable by ad = bc and the relation would fail to be an equivalence.
The tower of factorization domains
Now the heart of the guide: three classes of domain, each guaranteeing more about factorization. A Euclidean domain has a size function (a norm N) supporting division with remainder: for a, b ≠ 0 there exist q, r with a = bq + r and r = 0 or N(r) < N(b). A principal ideal domain (PID) is a domain in which every ideal is generated by one element. A unique factorization domain (UFD) is one in which every nonzero non-unit factors into irreducibles, uniquely up to order and associates.
The inclusions Fields ⊂ Euclidean ⊂ PID ⊂ UFD ⊂ Integral domains. Why ED ⇒ PID: Let I ≠ 0 be an ideal. Pick b ∈ I with N(b) minimal among nonzero elements of I. For any a ∈ I divide: a = bq + r, r = a − bq ∈ I. If r ≠ 0 then N(r) < N(b), contradicting minimality. So r = 0, hence a = bq ∈ (b). Thus I = (b) is principal. ∎ Why PID ⇒ UFD (sketch): Noetherian (every ideal f.g.) ⇒ factorizations into irreducibles exist; in a PID irreducible ⇒ prime, which forces uniqueness. Strictness of the chain: Z[(1+√−19)/2] is a PID but NOT Euclidean (no norm works). Z[x] is a UFD but NOT a PID: (2, x) is not principal. Z[√−5] is NOT a UFD: 6 = 2·3 = (1+√−5)(1−√−5).
Walk the chain of strictness slowly, because it is exam-classic. The ring Z[(1+√−19)/2] is a PID with no Euclidean function at all — proving it is a PID needs a clever "almost Euclidean" (Dedekind-Hasse) argument, and proving it is not Euclidean rules out every conceivable norm. The polynomial ring Z[x] is a UFD (we prove this next guide via Gauss's lemma) but not a PID, witnessed by the ideal (2, x), which needs two generators. And Z[√−5] is the canonical failure of unique factorization: 6 factors two genuinely different ways, because 2, 3, 1±√−5 are all irreducible but not prime.
Irreducible versus prime
The distinction that makes the whole tower work: an irreducible element cannot be split into a product of two non-units; a prime element p has the stronger property that p | ab ⇒ p | a or p | b. Prime always implies irreducible in a domain, but the converse holds only in UFDs. In Z[√−5] the element 2 is irreducible yet not prime — it divides (1+√−5)(1−√−5) = 6 without dividing either factor — and that single failure is exactly why factorization is not unique there.