Let $X$ be a smooth projective surface over $\mathbb{C}$. How to show that for any zero-dimensional subscheme $Z$ of $X$, the Euler characteristic $\chi(\mathcal{O}\_Z,\mathcal{O}\_Z)={\sum}\_i (-1)^i \ dim \ Ext^i\_{\mathcal{O}\_X} (\mathcal{O}\_Z,\mathcal{O}\_Z)$ is the same for all $Z$ of length $n$? 


(I read that one could use a form of the Hirzebruch-Riemann-Roch theorem $\chi(\mathcal{O}\_Z,\mathcal{O}\_Z)= {\int}\_X ch(\mathcal{O}\_Z) ch(\mathcal{O}\_Z)^{\vee} td(X)$ to compute this Euler characteristic, but I am wondering if there is a more elementary way to see this? If not, is there a reference for this form of Hirzebruch-Riemann-Roch?) 



How to show that a form of Euler characteristic is constant for a family of schemes?
Define $\chi(\mathcal M,\mathcal N)$ for all finite length $\mathcal O\_X$-modules. It is additive in both arguments so for its computation we get
$$
\chi(\mathcal M,\mathcal N) = \sum\_{x,y}
\mathrm{lgth}\_x(\mathcal M)\mathrm{lgth}\_y(\mathcal N)\chi(k(x),k(y)).
$$
Clearly $\chi(k(x),k(y))=0$ if $x\neq y$ and the exactness of the Koszul resolution shows that 
$$
\chi(k(x),k(x)) = \sum\_i(-1)^i\binom{n}{i} = (1-1)^n=0,
$$
where we let $X$ be smooth and $n$-dimensional. Hence we actually get $\chi(\mathcal M,\mathcal N)=0$ for all $\mathcal M$ and $\mathcal N$ of finite length.


