Conormal bundle of Cartier divisors Given any closed immersion of schemes $i:Z\to X$ defined by a sheaf of ideals $\mathcal{I}$ on $X$, apparently the conormal bundle is $\mathcal{C}_{Z/X}:= {\mathcal{I}}/{\mathcal{I}^2}$ "seen as a sheaf on $Z$". My guess is that it means that in fact $\mathcal{C}_{X/Y}=i^*({\mathcal{I}}/{\mathcal{I}^2})$, but I am not entirely sure (so that's my first question).
Also, an effective Cartier divisor on a scheme $X$ is a closed subscheme given by a sheaf of ideals $\mathcal{I}$ such that on an affine cover the ideal corresponding to $\mathcal{I}$ are all principal and generated by a non-zero-divisor. With this definition the sheaf $\mathcal{O}(-D)$ is nothing but $\mathcal{I}$ and $\mathcal{O}(D)$ is its "dual" sheaf $\mathcal{Hom}_X(\mathcal{I},\mathcal{O}_X)$ (notice that this way the bidual is not necessarily isomorphic to $\mathcal{I}$). Now I would like to know why $\mathcal{O}(-D)|_D=\mathcal{C}_{Z/X}$ (which most likely means that there exists a canonical isomorphism).
I tried the obvious thing but I am very confused: locally (say in $\text{Spec}A$) $\mathcal{I}$ comes from an ideal $I=(f)$ with $f$ a non-zero-divisor. Then $\mathcal{O}(-D)|_D$ becomes $I\otimes_A A/I\cong I/I^2$. On the other hand, $\mathcal{I}/\mathcal{I}^2$ is locally $I/I^2$ and the pullback is then $I/I^2\otimes_A A/I\cong I\otimes_A A/I\otimes_A A/I\cong I\otimes A/I\cong I/I^2$. This just can't be right because then it would be true for any closed subscheme, and there are surely many errors in definitions/tensor product. Could you help me correcting that (or propose your own solution if you prefer)?
 A: You are correct that it is extremely common to abuse notation and write $\mathscr{I}/\mathscr{I}^2$ for the conormal sheaf of a (closed) immersion when what one really intends (and should write to be technically correct) is $i^*(\mathscr{I}/\mathscr{I}^2)$. The reason this abuse takes place, as you probably know, is that for $i:Z\to X$ a closed immersion, $i_*$ is fully faithful with essential image the $\mathscr{O}_X$-modules annihilated by $\mathscr{I}$ (such modules are necessarily supported in $Z$) and for such an $\mathscr{O}_X$-module $\mathscr{F}$, one indeed has that the unit $\eta_\mathscr{F}:\mathscr{F}\to i_*(i^*\mathscr{F})$ of the adjunction $i^*\dashv i_*$ is an isomorphism, as can be checked on stalks, reducing to the fact that if $M$ is an $A$-module for some ring $A$, killed by an ideal $I\subseteq A$, then the natural map $M\to M\otimes_A(A/I)$ is an isomorphism.
Now let $i:D\to X$ be an effective Cartier divisor, meaning a closed subscheme of $X$ whose ideal sheaf $\mathscr{I}$ is invertible. One denotes $\mathscr{I}$ by $\mathscr{O}_X(-D)$ and defines the ``associated invertible module" to be $\mathscr{O}_X(D):=\mathscr{I}^{-1}:=\mathscr{I}^\vee=\mathscr{H}om_{\mathscr{O}_X}(\mathscr{I},\mathscr{O}_X)$. I'm not sure what you mean when you say "the bidual is not necessarily isomorphic to $\mathscr{I}$." For any finite locally free $\mathscr{O}_X$-module $\mathscr{F}$, the natural evaluation map $\mathscr{F}\to(\mathscr{F}^\vee)^\vee$ is an isomorphism, which can be checked on stalks (for source modules of finite presentation, taking stalks is compatible with formation of $\mathrm{Hom}$ sheaves).
Anyway, for your question: why is it the case that $\mathscr{O}_X(-D)\vert_D\simeq\mathscr{C}_{Z/X}$. You absolutely have the right idea. The LHS is $i^*(\mathscr{I})$, while the RHS is $i^*(\mathscr{I}/\mathscr{I}^2)$. The canonical map $\mathscr{I}\to\mathscr{I}/\mathscr{I}^2$ pulls back to $i^*(\mathscr{I})\to\mathscr{C}_{Z/X}$. Because $i_*$ is fully faithful, that this map is an isomorphism can be verified after applying $i_*$. The stalk of the resulting map at a point $x\in X-Z$ is the zero map between the zero modules, so that's fine. At a point $z\in Z$, the stalk is $\mathscr{I}_z\otimes_{\mathscr{O}_{X,z}}\mathscr{O}_{Z,z}\to\mathscr{I}_z/\mathscr{I}_z^2\otimes_{\mathscr{O}_{X,z}}\mathscr{O}_{Z,z}$. But $\mathscr{O}_{Z,z}=\mathscr{O}_{X,z}/\mathscr{I}_z$. Similarly to the first paragraph, in general, for a ring $A$ and an $A$-module $M$, and an ideal $I$, the natural map $M\otimes_A(A/I)\to (M/IM)\otimes_A(A/I)$ is an isomorphism. Indeed, the source has a canonical isomorphism to $M/IM$, and the same fact allows one to identify the target with $(M/IM)/I(M/IM)=M/IM$ since $M/IM$ is killed by $I$. Under these identifications, your map is just the identity, so you win.
Notice that this doesn't actually have anything to do with Cartier divisors (the third paragraph anyway). It works for an arbitrary closed immersion, and indeed, the principle is summarized (admittedly with a tiny deficit of precision) by the phrase "tensoring a module $M$ killed by $I$ with $A/I$ does nothing."
