Let $A$ be a commutative algebra (over the complex numbers, with a unit) and let $M$ be a finitely generated projective $A$-module, and let $m\_1,\ldots,m\_n$ be a set of generators of $M$. The Dual Basis Theorem states that there exists $m\_1^\ast,\ldots,m\_n^\ast\in M^\ast$ such that $x=\sum m\_i^\ast(x)m\_i$ for all $x\in M$. This implies that one can write the identity map on $M$ as the tensor $\mathbf{1}=\sum m\_i^\ast\otimes m\_i$ and one defines $\operatorname{tr}\mathbf{1}=\sum m\_i^\ast(m\_i)$. What are the properties of $\operatorname{tr}\mathbf{1}$? Is there any relation to, for instance, the rank of $M$? When is it proportional to the unit element in $A$?



Trace of the identity map in a projective module
More abstractly: Let $A$ be a commutative unital ring and let $M$ be a f.g. projective $A$-module. The rank $rk\_P(M)$ of $M$ at a prime ideal may be defined as the vector space dimension of $K\otimes\_A M$ where $K$ is the residue field. Because projective modules of local rings are free, this is a locally constant function of the prime (so a constant if $A$ is a domain). The trace of the identity of $M$ is the unique element of $A$ such that in every local ring $A\_P$ it goes to $rk\_P(M)1$.


