# Ring of rational functions for reducible variety

Let $X$ be some affine algebraic variety over $\mathbb{k}$ (i.e. some closed subset in $\mathbb{A}_\mathbb{k}^n$). First suppose $X$ to be irreducible. Then the algebra $\mathbb{k}[X]$ is a domain and we can consider the field of rational functions $\mathrm{Quot}_{\mathbb{k}[X]}=\mathbb{k}(X)$. Could you explain me how to build an analogue of this field in the case when $X$ is not necessarily irreducible? Then $\mathbb{k}[X]$ must not be a domain and we are to build some kind of localization?
Also, what is the destination of rational functions? Why we cannot be satisfied with only regular maps and regular functions?

-

The analogue of the quotient field for a ring with zero divisors is the total ring of fractions: basically, just invert everything that is not a zero divisor. Geometrically, an element of this ring can be viewed as a collection of rational functions, one on each irreducible component of $X$, such that they coincide on intersections.
Rational functions are important for a wide variety of reasons. Asking this question is like asking why $\mathbf Q$ is important. Why weren't we happy with $\mathbf Z$? Well, it wasn't big enough for what we wanted to do, so we enlarged it.
You are welcome @Nikita. Well, they are defined: they take the value $\infty$. The points where they are finite could be called the "regular locus" or something like that. What kind of description would you like the set to have? – Bruno Joyal Dec 5 '13 at 21:36