If we start with the
ring of
integers
Z then we know how to
form the
field of
rational numbers
Q by taking all fractions
a/b
of integers
a,b with
b nonzero.
It is a remarkable and useful fact that we can extend this idea
to any commutative integral domain.
Theorem Let R be a commutative integral domain.
Then there is a field F and an injective ring homomorphism
i:R>F such that every element of F has the form
i(a)i(b)^{1}, for some a,b in R with
b nonzero.
Before we prove the theorem note that the pair (F,i) is
unique up to unique isomorphism. What does this mean?
Suppose (F',i') is also as in the theorem. Then it means
there exists a unique isomorphism of rings f:F>F'
such that fi=i'. Before we show there exists such an isomorphism
we show it is unique. For if f is such
then
f(i(a)i(b)^{1})=f(i(a))f(i(b))^{1}=i'(a)i'(b)^{1
}
and f is completely determined.
To see there exists such an isomorphism, take
f(i(a)i(b)^{1})=i'(a))i'(b)^{1}, for
a,b in R with b nonzero.

This map is welldefined
because if i(a)i(b)^{1}=i(c)i(d)^{1} then
i(adbc)=0 (because i is a homomorphism) and so adbc=0
(because i is injective).
It quickly follows that i'(a)i'(b)^{1}=i'(c)i'(d)^{1}.

f is injective because if f(i(a)i(b)^{1})=0
then f(i(a))=0 so i'(a)=0 so a=0.

f is surjective by definition.
We call the pair (F,i) (or usually just F with i
implicit) the field of fractions of R.
If we start with Z then the field
of fractions is Q and i is the the natural inclusion
that maps an integer to itself.
Proof of the theorem: The idea of the proof is very simple
and it is not at all difficult. There are however a lot of details
to check. Before we continue it's worth thinking a bit about the case
of the integers. For fractions of integers,
We have a/b=c/d iff ad=bc. This motivates the following definitions.
Let X={(a,b): a,b in R and b is nonzero}.
Define an equivalence relation on X by the rule
(a,b) R (c,d) iff ad=bc. Note that the fact that
this really is an equivalence relation is obvious as far as
reflexivity and symmetry are concerned.
For transitivity, suppose that (a,b) R (c,d) and
(c,d) R (e,f). Thus ad=bc and cf=de.
Now multiply the first equation by f and the second by b
and we see that adf=bcf=bde, that is d(afbe)=0. Since
R is an integral domain and d is nonzero, we deduce that
af=be, as needed.
Denote by <a,b> the equivalence class of (a,b)
and let F denote the set of all such equivalence classes.
(Note that intuitively <a,b> is the fraction a/b.)
We define binary operations on F as follows:

<a,b> + <c,d> = <ad+bc,bd>

<a,b> . <c,d> = <ac,bd>
Now we have to show these operations are welldefined
(i.e. don't depend on the representatives of the equivalence classes
we chose). I'll do the first one and leave the second for you.
Suppose then that
<a,b> = <a',b'> and
<c,d> =
<c',d'>. Then
(ad+bc)b'd'=ab'dd'+cd'bb'=a'bdd'+c'dbb'=(a'd'+bc)dd', as required.
Next we have to check the field axioms. This is routine stuff
so I'll miss out the bulk of details. (If you have never made an argument
like this before you should write them down yourself!)
Note that the zero element of
F is <0,1>
and the identity element
of F is <1,1>.
Note that <a,b> has inverse <b,a>.
Define a function i:R>F by i(a)=<a,1>.
Now i(a+b) = <a,1> + <b,1> = <a+b,1> = i(a+b),
i(ab) = <ab,1>= <a,1> <b,1> = i(a)i(b),
and i(1)=(1,1) and so i is a ring homomorphism. It
is injective because if <b,1>=<0,1> then b=0.
Finally, i(a)i(b)^{1}=<a,b> so every element of
F has the stated form.