This question may be utterly trivial, or not, but as someone with hardly any knowledge of algebraic geometry I thought there could be a chance I get lucky.


Let X be a rational surface obtained by n blows up of $\mathbb{P}^1(\mathbb{C})\times\mathbb{P}^1(\mathbb{C})$. I write $H\_x$ and $H\_y$ for the lines x=constant and y=constant, and $E\_i$ for the total transform of the point of the $i-th$ blow up. Is there some way to find what the canonical divisor on X is? Take for example the surface X blown up at the point $x=\infty$ , $y=\infty$, and then again on that divisor at some point. 


(This example above occured when I cooked up an example to try and understand the resolution of singularities for the simple mapping x(n+2)+ax(n+1)+bx(n)=0).


I have seen for example, that the canonical divisor of $\mathbb{P}^2(\mathbb{C})$ blown up at 9 points is given by $K\_X=-3H+E\_1+E\_2+...+E\_9$. Is this true in general or only for a special class of surfaces?



(Anti)Canonical divisor of a blow up
If p:Y->X is the blowup of the surface X at a point x, and E is the exceptional divisor, then $K\_Y=p^\*K\_X+E$. Hence the formula for the blowup of P^2 at 9 points. In the $P^1 \times P^1$ case, the canonical divisor is $-2(H\_x+H\_y)$, and you can compute the canonical divisor on the blowup easily. You can find all this in any book on algebraic surfaces, I bet.


