Let R be a domain. A product of nonzero elements is nonzero, so S = R \setminus \{0\} is multiplicative, and the localization S^{-1}R is called the field of fractions \operatorname{Frac} R [1]. It is the localization R_{(0)} at the prime ideal (0), a local ring whose maximal ideal is 0, that is, a field. Directly, a nonzero a/s has the inverse s/a.
Since R has no zero divisors, a/1 = 0 only when a = 0, so R \to \operatorname{Frac} R is injective. If j \colon R \to K is an injective homomorphism into a field, it sends every nonzero element to a unit, so it extends uniquely to \operatorname{Frac} R \to K by a/s \mapsto j(a)j(s)^{-1} [1,2]. The image consists of the quotients of elements of j(R), the smallest subfield of K containing j(R).
For example, \operatorname{Frac} \mathbb{Z} = \mathbb{Q}, and \operatorname{Frac} k[x] = k(x) is the field of rational functions. Since every nonzero power series is x^n u with u a unit, \operatorname{Frac} k[[x]] is the field k((x)) of Laurent series, with only finitely many negative powers of x. A field is its own field of fractions.
For the Gaussian integers, \operatorname{Frac} \mathbb{Z}[i] = \mathbb{Q}(i), the numbers p + qi with p, q \in \mathbb{Q}. A quotient of Gaussian integers has rational coordinates because 1/(a + bi) = (a - bi)/(a^2 + b^2), and conversely p + qi = (m + ni)/d with integers m, n, d. In the figure, the inverses of the Gaussian integers are added in order of the norm a^2 + b^2; they have rational coordinates and gather near 0.
If R has zero divisors, no field contains it as a subring, because ab = 0 in a field forces a = 0 or b = 0. One can still invert the elements that are not zero divisors, and the result is called the total ring of fractions. For k[x, y]/(xy), whose zero set is the union of the two axes, it is k(x) \times k(y), one field of rational functions for each axis.
Every rational number can be written as a/b with b > 0 and \operatorname{gcd}(a, b) = 1, and this form is unique. The same holds in any unique factorization domain: cancel the common prime factors, and the reduced form is unique up to multiplying the numerator and the denominator by the same unit [2]. In k[x] the denominator can be made monic.
Over \mathbb{C} every polynomial splits into linear factors, so a nonzero rational function in lowest terms is f = c\prod (z - a_i)/\prod (z - b_j), where no a_i equals a b_j. The a_i are the zeros of f and the b_j its poles, so f is determined up to the constant c by its zeros and poles, counted with multiplicity.
The figure draws the level curves |f| = \mathrm{const} of f = (z - a)/(z - b). They are circles around the zero a and around the pole b, together with the line |f| = 1. Multiplying numerator and denominator by z - c puts a zero and a pole at the same point c, but the element of \mathbb{C}(z) is the same, and the level curves do not change. When b moves to a, the factor cancels and f becomes the constant 1.
A rational function f lies in the local ring \mathbb{C}[z]_{(z - a)} exactly when a is not a pole of f. A rational function without poles is a polynomial, so \mathbb{C}[z] is the intersection of all the rings \mathbb{C}[z]_{(z - a)} inside \mathbb{C}(z). In the same way, a rational number whose denominator is prime to every p is an integer, so \mathbb{Z} is the intersection of the rings \mathbb{Z}_{(p)} inside \mathbb{Q}.
In general, a domain R is the intersection of its localizations R_{\mathfrak{m}} at the maximal ideals, inside \operatorname{Frac} R [1]. If x lies in every R_{\mathfrak{m}}, the elements d \in R with dx \in R form an ideal, and writing x = a/s with s \notin \mathfrak{m} shows that this ideal is contained in no maximal ideal. So it contains 1, and x \in R.
Without unique factorization, lowest terms need not be unique. In \mathbb{Z}[\sqrt{-5}] we have 2 \cdot 3 = (1 + \sqrt{-5})(1 - \sqrt{-5}), so 2/(1 + \sqrt{-5}) = (1 - \sqrt{-5})/3. Neither form can be reduced, because 2, 3, 1 + \sqrt{-5} and 1 - \sqrt{-5} are irreducible and no two of them differ by a unit.
If f(x, y) is an irreducible polynomial, then k[x, y]/(f) is a domain, and its field of fractions is called the function field of the curve f = 0. Its elements are quotients g/h of polynomials in x and y with h not divisible by f, where two quotients are equal when they agree as functions on the curve.
For the circle x^2 + y^2 = 1 over \mathbb{R}, put t = y/(1 + x) in the function field. The line through (-1, 0) with slope t meets the circle again at x = (1 - t^2)/(1 + t^2) and y = 2t/(1 + t^2). These formulas define a homomorphism from the function field to \mathbb{R}(t), and t \mapsto y/(1 + x) defines its inverse, so the function field of the circle is \mathbb{R}(t).
The rings themselves differ. If the coordinate ring were \mathbb{R}[t], the coordinates would be polynomials x(t) and y(t) with x(t)^2 + y(t)^2 = 1. Let d be the larger of their degrees. If d \geq 1, the coefficients of t^{2d} give u^2 + v^2 = 0, where u and v are the coefficients of t^d and are not both 0, which is impossible over \mathbb{R}. So x and y would be constants, which cannot generate \mathbb{R}[t].
In the figure, a line through (-1, 0) turns, and its second point P on the circle moves together with its height t on the y-axis. Each value of t gives one point, and each point other than (-1, 0) gives one value of t. The point (-1, 0) itself would need the vertical line, so the identification is one of fields of functions, not of points.
Not every curve is like this. For y^2 = x^3 + 1, the function field is k(x)(y), where y satisfies y^2 = x^3 + 1 over k(x). For k = \mathbb{R} or \mathbb{C}, the polynomial x^3 + 1 has the simple root x = -1, so it is not a square in k(x), and the function field is an extension of degree 2 of k(x).