Suppose I have a smooth projective surface $S$ and a curve $C\subset S$. The self-intersection of $C$ is by definition the degree of the restriction to $C$ of the normal bundle of $C$ inside $S$.


By the very definition, if I deform $C$ inside $S$ then the self intersection does not change. Now, I wonder if this stays constant if I deform the surface as well, but keeping it smooth. More precisely: let us fix $S$ smooth first and deform $C$ to $C'\subset S$ and then deform $S$ to $S''$ via a smooth family. Let $C''\subset S''$ the deformation of $C'$ obtained through the deformation $S \to S''$. Does $(C\cdot C)=(C'' \cdot C'')$ always hold?



Self intersection and deformations
I think that, *if the curve does not disappear*, then the answer is positive.


In fact, let $\pi \colon \mathcal{X} \to \Delta$ your deformation of surfaces over a disk, with $S\_1= \pi^{-1}(t\_1)$ and $S\_2 = \pi^{-1}(t\_2)$. The assumption that $C\_1 \subset S\_1$ deforms to $C\_2 \subset S\_2$ along $\pi$ means that there exists a line bundle $\mathcal{L}$ on the total space $\mathcal{X}$ such that $$\mathcal{L}|\_{S\_1}=\mathcal{O}\_{S\_1} (C\_1), \quad \mathcal{L}|\_{S\_2}=\mathcal{O}\_{S\_2} (C\_2).$$


Therefore we have $$(C\_1 \cdot C\_1) = \mathcal{L} \cdot \mathcal{L} \cdot S\_1 = \mathcal{L} \cdot \mathcal{L} \cdot S\_2 = (C\_2 \cdot C\_2),$$
since any two fibers of $\pi \colon \mathcal{X} \to \Delta $ are clearly numerically equivalent. 


