One thing we haven’t given good examples of is fields. We can get some from factoring out a maximal ideal from a commutative ring with unit, but the most familiar example — rational numbers — comes from a different construction.
First we define a multiplicatively closed set. This is a subset of a commutative ring with unit which is, predictably enough, closed under the ring multiplication. We also require for technicality’s sake that contains the unit . A good place to get such multiplicatively closed sets is as complements of prime ideals — given two elements and in but not in the prime ideal , their product must also be outside . Another good way is to start with some collection of elements and take the submonoid they generate under multiplication.
In general not all the elements of will be invertible in . What we want to do is make a bigger ring that properly contains (a homomorphic image of) in which all elements of do have inverses. We’ll do this sort of like how we built the integers by adding negatives to the natural numbers.
Consider the set of all elements with and . We’ll think of this as the “fraction” . Now of course we have too many elements. For example, should be “the same” as for all . We introduce the following equivalence relation: if and only if there is a with . Notice that if contained no zero-divisors we could do away with the “there is a ” clause, but we might need it in general.
So as usual we pass to the set of equivalence classes and assert that the result is a ring. The definitions of addition and multiplication are exactly what we expect if we remember fractions from elementary school. Choose representatives and , and define and . From here it’s a straightforward-but-tedious verification that these operations are independent of the choices of representatives and that they satisfy the ring axioms.
We call the resulting ring by a number of names. Two of the most common are and . If is generated by some collection of elements we sometimes write . There are a few more, but I’ll leave them alone for now.
It comes with a homomorphism , sending to . If contains no zero-divisors then this is an isomorphism onto its image, since then would imply that . That is, a copy of sits inside . This homomorphism has a nice universal property: if is any homomorphism of commutative rings with units sending each element of to a unit, then factors uniquely as . That is, is the “most general” such homomorphism.
Now let’s say we start with an integral domain . This means that the ideal consisting of only the zero element is prime. Then its complement — all nonzero elements of — is a multiplicatively closed set . We construct the field of fractions by adding inverses to all the nonzero elements. Now every nonzero element has an inverse, so this really is a field. In fact, it’s the “most general” field containing .
And, finally, let’s apply this construction to the integers. They are an integral domain, so it applies. Now the field of fractions consists of all fractions with , with the above-defined sum and product. That is, it consists of the fractions we all know from elementary school. We call this field : the field of rational numbers.