If X is a variety over the complex numbers, one reasonable thing to do is to consider the associated analytic space $X\_{an}$ and to take the topological Euler characteristic of that.


Is there a purely algebraic way to obtain this number?


If X is non-singular then one might define it as the integral of the top Chern class of its tangent bundle.


The reason I ask is that I'm currently reading Joyce's [survey](http://arxiv.org/abs/0910.0105) on Donaldson-Thomas invariants and I wanted to know if by any chance he were using some more sophisticated notion.


On related note: if X is a non-proper scheme over C, why is its Euler characteristic well-defined?



How do you define the Euler Characteristic of a scheme?
If $X$ is a smooth variety over the complex numbers, you can use the topological Euler characteristic of the support $X(\mathbb{C})$ of the scheme. The most efficient way to compute it is to use **Chern classes** and the **Poincaré-Hopf theorem**: the Euler characteristic is the degree of the top Chern class. Chern classes can be defined purely algebraically (in homology) as it is done for example in Chapter 3 of Fulton's book "Intersection Theory". 


When $X$ is **singular**, there are many nonequivalent generalizations of the Euler characteristic. One efficient approach is again to work in the spirit of the Poincaré-Hopf theorem by first defining Chern classes for singular varieties. This provides a purely algebraic treatment. I will give a tour of the 4 most famous examples:


-The **Chern-MacPherson class** (also known as the **Chern-Schwartz-MacPherson class** ) is probably the most important. It can be defined on the Chow group of a variety using constructible functions. It enjoys beautiful functorial properties under proper maps and it is compatible with specializations. The existence of the Chern-MacPherson class realizes a conjecture of Deligne and Grothendieck of 1969 as the unique natural transformation between the covariant functor of constructible functions and the usual covariant functor of $\mathbb{Z}$-homology such that it maps the characteristic function of a manifold to its (homological) Chern class. The Chern-MacPherson class computes the **topological Euler characteristic** of a (possibly singular) variety.


-The **Chern-Mather-class** enters the definition of the Chern-MacPherson class. It is relevant to compute stringy invariants. It has nice properties under proper birational maps and can be simply defined using a Nash-blow-up. 


These two classes (MacPherson and Mather) can be generalized to scheme by considering the support of the scheme. This makes calculations much more easy, but obviously one looses a lot of the information carried by the scheme. The next two definitions are much more "scheme friendly" but they have less understood functorial properties.


-The **Chern-Fulton** and the **Chern-Fulton-Johnson** classes are both extremely sensitive to the scheme structure. They coincide in the case of local proper intersections. In general they don't satisfy the "inclusion-exclusion principle" which is satisfies by the topological Euler characteristic.


References
----------


For a friendly introduction with references to the appropriate literature, I would recommend  [this short lecture notes](http://www.math.fsu.edu/~aluffi/publications/warsaw.pdf) by Paolo Aluffi. 
The general treatment is discussed in Fulton's book **Intersection Theory** (specially section s 4.2.6, 4.2.9 and 19.1.7). For applications to motivic integration and stringy invariants see for example 
 [this review](http://www.math.wisc.edu/~maxim/motivic.pdf) or  [this one](http://www.math.fsu.edu/~aluffi/archive/paper235.pdf).


