Restriction of Line Bundles on Surfaces Suppose I have a smooth projective surface $S$, and irreducible curves $C,C'$ in $S$. I was wondering if:
$$\mathcal{O}_S(C)|_{C'}\cong \mathcal{O}_{C'}(C\cap C') $$
It would make sense, as on $C'$, $C\cap C'$ are points so a divisor on a curve and reflects my geometric intuition. The problem is that I don't know well how to deal with restrictions; my only way was to work locally. Thanks in advance!
 A: In general, your statement is correct. Of course, if $C$ and $C'$ intersect anywhere with multiplicity greater than one, then you have to take that into account in your definition of $\mathcal O_{C'}(C \cap C')$ - but I guess you are already aware of this.
There is just one case where you have to work a little harder, and that is when your irreducible curves $C$ and $C'$ are equal to each other. (Or when $C$ and $C'$ contain a common irreducible component, if they are not assumed irreducible to begin with.) In this scenario, you need to find a curve $\widetilde C$ that is linearly equivalent to $C$, but not equal to $C$, and then you say that $\mathcal O_S(C)|_C \cong O_C(C \cap \widetilde C)$. For example, if $S = \mathbb P^2$ and if $C$ is a line in $S$, then you could take $\widetilde C$ to be any other line; the two lines intersect at one single point with multiplicity one, and the result is then that $\mathcal O_S(C)|_C$ is isomorphic to $\mathcal O_{\mathbb P^1}(1)$.
Your result is well known and well documented. Take a look at Hartshorne V.1, where the formula $\mathcal O_S(C)|_{C'} = \mathcal O_{C'}(C \cap C')$ is used to prove that the intersection multiplicity between $C$ and $C'$ is equal to the degree of the invertible sheaf $\mathcal O_S(C)|_{C'}$ on $C'$.

So how can we understand your result formally? Let's think about what the restriction really is. We have a closed immersion
$$ i : C' \hookrightarrow S. $$
What you call the "restriction" of $\mathcal O_{S}(C)$ to $C'$ is really the inverse image of $\mathcal O_S(C)$ via $i$, that is:
$$ \mathcal O_S(C)|_{C'} := i^\star \mathcal O_S(C).$$
There is an easy way to take inverse images of invertible sheaves. Suppose $\mathcal L$ is an invertible sheaf on $S$. Pick a open cover $\{ U_\alpha \}$ of $S$ that trivialises $\mathcal L$, and suppose that, for each $\alpha, \beta$, the transition function for the sheaf $\mathcal L$ on the overlap region $U_{\alpha \beta} : = U_\alpha \cap U_\beta$ is the function $g_{\alpha\beta} \in \mathcal O_S(U_{\alpha \beta})$. Then the inverse image sheaf $i^\star \mathcal L$ is the invertible sheaf on $C'$ with trivialising open cover $\{ i^{-1}(U_\alpha) \}$ and transition functions $i^\star (g_{\alpha\beta})$ on the relevant overlaps. 
Let us now apply this to the sheaf $\mathcal L = \mathcal O_S(C)$. First, we should remind ourselves of how $\mathcal O_S(C)$ is defined. Let $\{ U_\alpha \}$ be an open cover of $S$, and for each $\alpha$, let $f_\alpha \in \mathcal O_S(U_\alpha)$ be a regular function on $U_\alpha$ whose vanishing locus is $C \cap U_\alpha$ (and which vanishes with multiplicity one on this locus). The collection of tuples
$\{ (U_\alpha, f_\alpha) \}$ is called the Cartier divisor associated to the curve $C$, and for smooth $S$, such a collection is guaranteed to exist (see Hartshorne II.6.11). Having introduced these $U_\alpha$'s and $f_\alpha$'s, the sheaf $\mathcal L = \mathcal O_S(C)$ is then defined to be the invertible sheaf with trivialising open cover $\{ U_\alpha \}$ and transition functions $g_{\alpha\beta} = f_\beta / f_\alpha$ on the overlap regions $U_{\alpha\beta}$.
We also need to identify the invertible sheaf $\mathcal O_{C'}(C \cap C')$. Here, $C \cap C'$ should be viewed not as a set-theoretic intersection, but as the divisor class $ \sum_{P \in C \cap C'} m_P(C \cap C') P$ on the curve $C'$, where for each point $P$, $m_P(C \cap C')$ denotes the intersection multiplicity between $C$ and $C'$ at $P$. The key observation is that the Cartier divisor associated to the divisor $\sum_{P \in C \cap C'} m_P(C \cap C') P$ is the collection of tuples $\{ (i^{-1}(U_\alpha), i^\star(f_\alpha) ) \}$. This statement is equivalent to saying that for every $P \in i^{-1}(U_\alpha) = C' \cap U_\alpha$, the order of vanishing of $i^\star(f_\alpha)$ at $P$ is equal to the intersection multiplicity $m_P(C \cap C')$, and this is clearly true.
[To spell out the commutative algebra behind this, assume without loss of generality that $U_\alpha$ is the affine surface ${\rm Spec}(A)$, and suppose that $C \cap U_\alpha$  and $C' \cap U_\alpha$ and are of the form ${\rm Spec}(A/(f))$ and ${\rm Spec}(A/(g))$ for some $f, g \in A$. (If these conditions aren't satisfied to begin with, then we can chose the $U_\alpha$'s to be smaller.) Let $i^\star : A \to A / (g)$ be the natural morphism of rings associated to the closed immersion of $C' \cap U_\alpha$ into $U_\alpha$. Then the order of vanishing of $i^\star(f)$ at the point $P \in {\rm Spec}(A/(g))$ is the valuation of $i^\star(f)$ in the discrete valuation ring $A_{\mathfrak m_P}/(g)$. Algebraically, this is equal to the dimension of the vector space $A_{\mathfrak m_p} / (f, g)$ over the field $k = A_{\mathfrak m_p} /{(\mathfrak m_p)_{\mathfrak m_p}}$, which by definition is the intersection multiplicity of ${\rm Spec}(A/(f))$ and ${\rm Spec}(A/(g))$ at $P$, as required. (NB This whole story wouldn't work if $C = C'$, because if $f = g$, then $i^\star(f)$ is zero, and the valuation isn't finite, so the calculation above doesn't make sense - this is the special case I mentioned earlier.)]
Having established that the Cartier divisor associated to the divisor $\sum_{P \in C \cap C'} m_P(C \cap C')P$ is the collection of tuples $\{ (i^{-1}(U_\alpha), i^\star(f_\alpha) )\}$, we have shown that the line bundle $\mathcal O_{C'}(C \cap C')$ is the line bundle with trivialising open cover $\{ i^{-1}(U_\alpha) \}$ and transition functions $i^\star(f_\beta) / i^\star(f_\alpha)$ on each overlap $U_{\alpha\beta}$. But $i^\star(f_\beta) / i^\star(f_\alpha)$ is the pullback $i^\star(f_\beta / f_\alpha)$ of the transition functions for the sheaf $\mathcal O_S(C)$, so by our earlier characterisation of pullbacks, we may conclude that $\mathcal O_{C'}(C \cap C') = i^\star \mathcal O_S(C)$.
