Self-intersection of divisors and Chern class Let $X$ be a smooth, projective variety and $Y \subset X$ a smooth, effective divisor. Consider now the natural map $i^\ast:H^2(X) \to H^2(Y)$. Then,


*

*When is the image of $c_1(\mathcal{O}_X(Y)) \in H^2(X)$ under the map $i^*$ non-zero?

*If $Z$ is another smooth projective variety containing $Y$ as an effective divisor (meaning $\dim Z=\dim Y+1$), is $j^*(c_1(\mathcal{O}_Z(Y)))=i^*(c_1(\mathcal{O}_X(Y)))$ where $j^*:H^2(Z) \to H^2(Y)$ is the natural pull-back map? 

*If ($2$) is not true in general, is it true if $Z$ is a deformation of $X$?
Any reference/idea regarding the questions will be most welcome.
 A: *

*Because homological equivalence and numerical equivalence coincide for divisors (up to torsion), we see that $i^*(c_1(\mathcal O_X(Y))) = 0 \in H^2(Y,\mathbb Q)$ if and only if
$$\int_Y i^*c_1(\mathcal O_X(Y)) \cup \operatorname{cl}_Y(C) = 0$$
for every curve $C \subseteq Y$ (where $\operatorname{cl}_Y(C)$ means the cycle class of $C$ as subvariety of $Y$). By the definition of $\operatorname{cl}_Y(C)$, this means that
$$\int_C c_1(\mathcal O_X(Y)|_C) = 0,$$
i.e. $Y \cdot C = 0$ for every curve $C \subseteq Y$ (the intersection product now taking place in $X$).
For example, if $Y$ is ample, then $Y \cdot C > 0$ for all $C \subseteq Y$, so $i^*(c_1(\mathcal O_X(Y)))$ is never $0$. Another example is the case $\dim X = 2$ (and $Y$ is irreducible), where the criterion simplifies to $Y^2 = 0$ (because $C = Y$ is the only curve in $Y$).
(The above analysis assumes $\dim X \geq 2$, for otherwise there are no curves in $Y$. The case $\dim X \leq 1$ is easy to deal with.)
The analysis becomes a lot more subtle if one insists to work integrally.

*This was already shown to be false in the comments.

*It should be true if the pair $(Z,Y)$ is a deformation of $(X,Y)$ (try to write down a good definition of this; perhaps you want to fix $Y$ along the way). Slogan: 'discrete data does not change in continuous families'. (Of course this is not a proof.)
An outline of a proof could be as follows (but there might be other strategies): a smooth proper family $\mathscr X \to S$ induces isomorphisms of the cohomology of the fibres:
$$H^*(\mathscr X_s) \cong H^*(\mathscr X_t)$$
for $s,t \in S$. Similarly, if $\mathscr X \to S$ is a smooth proper family together with a closed subscheme $\mathscr Y \subseteq \mathscr X$ that is smooth over $S$ such that each fibre is a divisor, we get a commutative diagram
$$\begin{array}{ccc} H^*(\mathscr X_s) & \stackrel\sim\to & H^*(\mathscr X_t) \\ \downarrow & & \downarrow \\ H^*(\mathscr Y_s) & \stackrel\sim\to &\ H^*(\mathscr Y_t). \end{array}\label{1}\tag{1}$$
Then check that under these identifications, $c_1(\mathcal O_{\mathscr X_s}(\mathscr Y_s)) \in H^2(\mathscr X_s)$ corresponds to $c_1(\mathcal O_{\mathscr X_t}(\mathscr Y_t)) \in H^2(\mathscr X_t)$, hence by commutativity of the diagram the same goes for their pullbacks to $H^2(\mathscr Y_s)$ and $H^2(\mathscr Y_t)$. You are in the special case where $\mathscr Y_s = \mathscr Y_t$, and you probably need to assume that $\mathscr Y$ is the trivial family $Y \times S$ to make sure that the isomorphism
$$H^*(\mathscr Y_s) \stackrel\sim\to H^*(\mathscr Y_t)$$
of (\ref{1}) is the identity (as opposed to some other automorphism).
