When is a line bundle the pullback of another line bundle? Let $X$ be a compact Riemann surface, $Y$ a smooth complex variety and $\pi : X \times Y \rightarrow Y$ the projection. Given a line bundle $L$ on $X \times Y$ which restricts to  the trivial bundle on the fibers of $\pi$, can one say that $L$ is the pull-back of a line bundle on $Y$? If not, are there additional conditions that make this true?
Thanks!
 A: This is basically the content of Hartshorne exercise III.12.4:

Let $Y$ be an integral scheme of finite type over an algebraically closed field $k$. Let $f:X\to Y$ be a flat projective morphism whose fibers are all integral schemes. Let $\mathcal{L},\mathcal{M}$ be invertible sheaves on $X$, and assume for each $y\in Y$ that $\mathcal{L}_y\cong \mathcal{M}_y$ on the fiber $X_y$. Then show that there is an invertible sheaf $\mathcal{N}$ on $Y$ so that $\mathcal{L}\cong \mathcal{M}\otimes f^*\mathcal{N}$. [Hint: Use the  results of this section to show that $f_*(\mathcal{L}\otimes\mathcal{M}^{-1})$ is locally free of rank 1 on $Y$.]

The key result here is (a corollary to) the semicontinuity theorem:

Corollary 12.9 (Grauert). Let $f:X\to Y$ be a projective morphism of noetherian schemes with $Y$ integral and $\mathcal{F}$ a coherent sheaf on $X$ flat over $Y$. Assume also that for some $i$, the function $h^i(y,\mathcal{F})$ is constant on $Y$. Then $R^if_*(\mathcal{F})$ is locally free on $Y$, and for every $y$ the natural map $$R^if_*(\mathcal{F})\otimes k(y)\to H^i(X_y,\mathcal{F}_y)$$ is an isomorphism.

So applying this to our situation at hand, we may see that the pushforwards of your line bundle trivial on the fibers is again a line bundle on the target. After some messing about with pushforwards and pullbacks (see here, for instance), one may see that your line bundle trivial on the fibers is indeed the pullback of a line bundle on $Y$.
