# principal divisor in smooth projective variety of dim>1

For a smooth projective curve $C$ and $f,g \in k(C)^*$, we have $\text{div}(f)=\text{div}(g)$ iff $f=ag$ for some nonzero constant $a$. Is this still true for higher dimension smooth projective variety $X$ ? I believe this boils to : for all nonconstant $f \in k(X)$, $f$ must vanish somewhere on $X$? This sounds intuitive and trivial, but I can't find it in any reference. Any suggestion? Thank you.

-
Since $X$ is proper and irreducible, $f$'s image in ${\mathbb P}^1$ must be these things too, hence either a point or all of ${\mathbb P}^1$. – Allen Knutson Jun 19 '13 at 3:30
If $f$ is nowhere zero, then $1/f$ is everywhere regular, but since $X$ is projective this means that $f$ is constant. Then again, this is the same proof as Allen's using different words. – Sándor Kovács Jun 19 '13 at 5:08
To Allen: I thought of this argument too, but in higher dimension, a rational function $f \in k(X)$ only defines a rational map from $X$ to $\mathbb{P}^1$. The domain of definition $U$ is an open subset of $X$, thus what we have is a morphism from a quasi projective variety $U$ (which is no longer proper) to $\mathbb{P}^1$. – LLL Jun 19 '13 at 15:25
The complement $C$ of $U$ is where the numerator and denominator both vanish. If those share a component of codim $1$, we can divide numerator and denominator by that. So the complement is codim $2$. Let $\tilde X$ be the closure of the graph of the partially defined function, so contains ${\tilde C} := {\mathbb P}^1 \times C$. On $\tilde X$ the previous argument applies and we have a nonempty $f^{-1}(0)$. The remaining worry is that it lies inside $\tilde C$, but that's also codim $1$, so they'd share components. They can't because each component of $\tilde C$ maps onto ${\mathbb P}^1$. – Allen Knutson Jun 19 '13 at 16:56
To Allen: I see. Thanks for the explanation. – LLL Jun 19 '13 at 17:34