exceptional divisor on a smooth surface Let $D=\sum d_iD_i$ be an exceptional divisor on a smooth projective surface $X$.
i.e., the intersection matrix $(D_i.D_j)$ is negative definite.
I have 2 stupid questions. 


*

*Fix an ample divisor $A$ on $X$.
Then why do there exist $r_i\in \mathbb{Q}$ s.t. $(\sum r_iD_i).D_j=-(A.D_j)$ for every $j$?
(Why negative definiteness of $(D_i.D_j)$ implies this?)

*If $\sum r_iD_i$ is effective and $(\sum r_iD_i).D_j=0$ for all $j$, then $r_i>0$ for all $i$
Thanks.
 A: As Rita points out, 1) is trivial, because the matrix $(D_i\cdot D_j)$ is invertible. Also, as she points out, the second statement is not quite true. Well, actually, it is completely false. Again by the fact that the matrix $(D_i\cdot D_j)$ is invertible, if $(\sum r_iD_i)\cdot D_j=0$ for all $j$, then necessarily $r_i=0$ for all $i$. On the other hand, this is easily fixable. 
In fact, one can make a somewhat stronger statement:

Claim If the $r_i$ are arbitrary and $(\sum r_iD_i)\cdot D_j\leq 0$ for all $j$, then $r_i\geq 0$, that is, $\sum r_iD_i$ is effective and if furthermore $\cup D_i$ is connected and there exists a $j$ such that $(\sum r_iD_i)\cdot D_j\neq 0$, then $r_i>0$ for all $i$.

Proof
Let $\sum r_iD_i=A-B$ with $A,B$ effective and suppose $B\neq 0$. Then
$B^2<0 \leq A\cdot B$, so 
$$
0 < A\cdot B - B^2= \left(\sum r_iD_i\right)\cdot B = \sum_{r_j<0} (-r_j)\left(\sum r_iD_i\right)\cdot D_j \leq 0,
$$
which is a contradiction and hence $B=0$, that is, $\sum r_iD_i$ is effective. 
Next we want to prove that if there exists a $k$ such that $r_k=0$, then $(\sum r_iD_i)\cdot D_j=0$ for all $j$. Let $k$ be such that $r_k=0$. Then
$$
\left(\sum r_iD_i\right)\cdot D_k = \sum_{i: D_i\cdot D_k>0} r_i (D_i\cdot D_k) \geq 0.
$$
Now if there exists a $j$ among these such that $r_j\neq 0$, then $\left(\sum r_iD_i\right)\cdot D_k>0$, otherwise $r_j=0$ for all $j$ such that $D_j\cap D_k\neq \emptyset$. Now repeat this step with one of these $j$'s. 
Since $\cup D_i$ is connected, this proves the claim. $\square$
