ideal class group
Some rings of integers enjoy unique factorization and some do not, and we want a single object that captures exactly how far a given ring is from the well-behaved case. The idea is to declare two ideals “the same” when they differ only by a principal ideal — by an honest element. The leftover distinctions, after we ignore everything principal, assemble into a group whose size measures the failure of unique factorization.
Let R be a Dedekind domain with fraction field K. The fractional ideals form an abelian group I(R) under multiplication, and the principal fractional ideals P(R) = {aR : a in K^*} form a subgroup. The ideal class group is the quotient Cl(R) = I(R) / P(R). Two ideals lie in the same class exactly when one is a nonzero scalar multiple of the other.
For the ring of integers of a number field, the class group is finite, and it is trivial exactly when O_K is a principal ideal domain, which for a Dedekind domain is the same as being a unique factorization domain. Its order is the class number. The class group sits in fundamental exact sequences and is one of the central invariants of a number field.
For K = Q(sqrt(-5)), the class group is Z/2Z. The two classes are the principal ideals and the class of the non-principal prime (2, 1 + sqrt(-5)); the square of that prime is principal, equal to (2).
A class group of order 2 means O_K just misses being a UFD by a single factor of 2.