TITLE: Is projectivity local on the base?
QUESTION [9 upvotes]: 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?

REPLY [14 votes]: Unfortunately no. 
Here is an example which is a variant on Hironaka's example of a non-projective 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 blow-ups. 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.

REPLY [6 votes]: 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.