Let $f:X\to Y$ be a morphism of schemes and assume that $Y$ has an open cover $\{U_i\}$ such that $f:f^{1}U_i\to U_i$ is projective. Does it follow that $f$ is projective?

3$\begingroup$ I'm not an expert, and it seems that you have some nice answers below, but let me just remark that I'm always a bit scared when I see questions about projective maps with no assumptions on the base, because the definitions of projective in Hartshorne's book and in EGA do not coincide in this generality :/ I think it's generally accepted that EGA has the "correct" definition... $\endgroup$– Kevin BuzzardNov 24 '10 at 10:21

1$\begingroup$ This is an interesting question (which already has two nice answers), since, on the other hand, being affine is local on the base by definition. This is because the spirit of the definitions is different: projective means that you can globally embed your scheme in $P^n_Y$ whereas affine does not mean that you can embed it in $\mathbb A^n_Y$. $\endgroup$– Georges ElencwajgNov 24 '10 at 10:43

$\begingroup$ By the way, how does EGA define projectivity (or at least where in EGA is it)? $\endgroup$– Harry GindiNov 24 '10 at 16:02

4$\begingroup$ Dear Harry: EGA II, Définition (5.5.2), page 104. $\endgroup$– Georges ElencwajgNov 24 '10 at 16:55

4$\begingroup$ Dear Harry: to avoid other confusion related to "very ample" for line bundles (where again EGA and Hartshorne do not agree in general), see 4.4.2, 4.4.4, 4.4.6, 4.4.7 in EGA II. $\endgroup$– BCnrdNov 25 '10 at 5:52
Unfortunately no.
Here is an example which is a variant on Hironaka's example of a nonprojective smooth proper variety.
Let $g:Z\to Y$ be a smooth projective morphism and assume that $\dim Z\geq 3$ and that there exists two smooth curves $C_1, C_2\subset Z$ such that $C_1$ and $C_2$ intersect in exactly two (closed) points, say $P$ and $Q$. Assume that $g(P)\neq g(Q)$. This situation is easy to create.
Now, let $Z_1$ be the blow up of $Z\setminus g^{1}(g(P))$ along $C_1\cap Z\setminus g^{1}(g(P))$ first and then along the strict transform of $C_2$ and let $Z_2$ be the blow up of $Z\setminus g^{1}(g(Q))$ along $C_2\cap Z\setminus g^{1}(g(Q))$ first and then along the strict transform of $C_1$. Since $C_1$ and $C_2$ only intersect in $\{P,Q\}$, it follows that $Z_1$ and $Z_2$ are isomorphic over the open set $Y\setminus \{g(P),g(Q)\}$. Let $X$ be the scheme obtained by gluing $Z_1$ and $Z_2$ along the obvious open subset and $f:X\to Y$ the induced morphism.
Finally let $U_1=Y\setminus \{g(P)\}$ and $U_2=Y\setminus \{g(Q)\}$. Then $f^{1}U_i=Z_i$ and $f$ restricted to $Z_i$ is the combination of the original $g$ and a blow up, hence projective.
However, $f$ is not projective. The proof of this goes the same way as Hironaka's: take the cycles corresponding to the fibers of the blowups. One obtains that one of the irreducible components of the fiber over $P$ is numerically equivalent to the union of the irreducible components over $Q$, but similarly one of the irreducible components of the fiber over $Q$ is numerically equivalent to the union of the irreducible components over $P$. This means that an $f$nef line bundle on $X$ has to be zero (acting with the appropriate power of its Chern class) on the "other" irreducible component of each fibers, but then it cannot be ample.
EDIT: Note that this $f$ is not projective in either the EGA or the Hartshorne sense. If in doubt, assume that $Y$ is projective over a field and then one only needs to show that $X$ is not, which is then the same according to either definition.
EDIT2: added condition $\dim Z\geq 3$ and added missing $g(\ )$'s for the images of the points $P$ and $Q$ following Qing Liu's comment.

10$\begingroup$ Harry, you are mixing up two completely unrelated uses of the word projective: one for modules over rings, another for morphisms of schemes. $\endgroup$– BCnrdNov 24 '10 at 13:50

2$\begingroup$ In this example, is there any reason not to take $Z=Y$ and $g$ to be the identity? $\endgroup$ Nov 24 '10 at 16:42

1$\begingroup$ @Dustin: no. It works with that as well. It just seemed more general. Allowing $g$ to be an arbitrary projective morphism shows that there are many counterexamples. The smoothness assumption is not needed either, but it is easier to see that the resulting $f$ is not projective using (easy) intersection theory. $\endgroup$ Nov 24 '10 at 16:50

1$\begingroup$ Harry, you are too affinecentric in your thinking. Your question makes no sense geometrically because projectivity is that ad hoc sense is not local on the source. $\endgroup$– BCnrdNov 24 '10 at 20:20

2$\begingroup$ @Sándor: nice example ! Two trivial remarks: there are some typos (confusion between the intersection points and their images in $Y$) and one should suppose $C_i$ has codimension bigger than $1$ in $Z$. $\endgroup$– Qing LiuNov 24 '10 at 20:36
No, there should be at least some noetherian hypothesis on $Y$. Take for example $Y$ to be an infinite disjoint union, say indexed by natural numbers, of points $x_i = \mathrm{spec}k$, and take for $X\to Y$ over each point $x_i$ the $i$dimensional projective space. Then $f$ is not projective although "locally projective" in your sense.

2$\begingroup$ It is no, even with noetherian hypothesis. $\endgroup$ Nov 24 '10 at 8:28

$\begingroup$ That's true, noetherian is not sufficient. Yours is a nice example, it shows that regularity conditions on $Y$ will hardly suffice to say anything. $\endgroup$ Nov 24 '10 at 8:39

3$\begingroup$ Cheer up Xandi! You answered the OP's question in probably the simplest way, and that's very nice. More advanced geometers will then savour Sándor's example. $\endgroup$ Nov 24 '10 at 10:06

8$\begingroup$ Actually, this f is EGAprojective, but not Hartshorneprojective. $\endgroup$– user2035Nov 24 '10 at 10:53

$\begingroup$ I suspected as muchthat was what prompted my comment under the original question. $\endgroup$ Nov 24 '10 at 14:19