Definition of a valuation of a rational fraction Let $F$ be a field. Then the field of rational fractions over $F$ in indeterminates $x_1,...,x_n$, denoted by $F(x_1,...,x_n)$, is the field of fractions of the polynomial ring $F[x_1,...,x_n]$.
P.A.Grillet ("Abstract Algebra") defines a valuation of a rational fraction $f(x_1,...,x_n)/g(x_1,...,x_n)$ at $(a_1,...,a_n) \in F^n$ as $f(a_1,...,a_n)g(a_1,...,a_n)^{-1}$, but he says it is only defined if $g(a_1,...,a_n) \neq 0$ and in this case it invariant under the change of the representative of the equivalence class which is the rational fraction. Concretely, if $f_1(x_1,...,x_n), f_2(x_1,...,x_n), g_1(x_1,...,x_n), g_2(x_1,...,x_n)$ are polynomials over $F$ so that $g_1$ and $g_2$ are nonzero and $f_1(x_1,...,x_n)g_2(x_1,...,x_n) = f_2(x_1,...,x_n)g_1(x_1,...,x_n)$, then $f_1(a_1,...,a_n)g_1(a_1,...,a_n)^{-1} = f_2(a_1,...,a_n)g_2(a_1,...,a_n)^{-1}$.
I understand why $f_1(a_1,...,a_n)g_1(a_1,...,a_n)^{-1} = f_2(a_1,...,a_n)g_2(a_1,...,a_n)^{-1}$ if $g_1(a_1,...,a_n), g_2(a_1,...,a_n) \neq 0$ and $f_1(x_1,...,x_n)g_2(x_1,...,x_n) = f_2(x_1,...,x_n)g_1(x_1,...,x_n)$ (it follows directly from the fact that evaluation $F[x_1,...,x_n]\to F$ at $(r_1,...,r_n)$ is a homomorphism of rings.
What I don't understand if why we necessarily have $g_2(a_1,...,a_n) \neq 0$ if $g_1(a_1,...,a_n) \neq 0$ and $f_1(x_1,...,x_n)g_2(x_1,...,x_n) = f_2(x_1,...,x_n)g_1(x_1,...,x_n)$. Indeed, if $g_1(a_1,...,a_n) \neq 0$ it is possible that $g_2(a_1,...,a_n) = 0$ together with $f_2(a_1,...,a_n) = 0$.
 A: 
What I don't understand if why we necessarily have $g_2(a_1,...,a_n) \neq 0$ if $g_1(a_1,...,a_n) \neq 0$ and $f_1(x_1,...,x_n)g_2(x_1,...,x_n) = f_2(x_1,...,x_n)g_1(x_1,...,x_n)$.

No, that's not true, so there's no way to prove it.  To see this, take a particular example.
Let $g_1(x) = x+8964$, $g_2(x) = (x+8964)(x + 1997)$, $f_1(x) = x+1$, $f_2(x) = (x+1)(x + 1997)$.  It's easy to see that $f_1(x)g_2(x) = f_2(x)g_1(x)$ and $g_1(-1997) \ne 0$, but $g_2(-1997) = 0$.
A: Well, consider the general construction of the field of fractions from an integral domain $R$.
For this, one defines an equivalence relation on $R\times (R\setminus\{0\})$:
$(a,b) \equiv (c,d)$ if $ad=bc$.
The equivalence classes are written as fractions: $a/b := \{(c,d)\mid (a,b)\equiv (c,d)\}$. On the quotient set $K =\{a/b\mid a,b\in R,b\ne 0\}$ define addition and multiplication as usual. In this way, $K$ becomes a field and $R\rightarrow K:r\mapsto r/1$ is an embedding (ring monomorphism).
The construction shows that for the fractions $a/b$ one has $b\ne 0$ by definition.
