  We develop from scratch a theory of invariants within the framework of
non-commutative geometry. Given an operator Q (a supercharge in physics
language) and an operator a (whose square equals the identity I), we derive a
general formula for an invariant Z(Q,a) depending on Q and a. In case a=I, our
formula reduces to the McKean-Singer representation of the index of Q. The
function Z is invariant in the following sense: if Q=Q(s) depends on a
parameter s, and if Z(Q(s),a) is differentiable in s, then in fact Z(Q(s),a) is
independent of s. We give detailed conditions on Q(s) for which Z(Q(s),a) is
differentiable in s. At the end of this paper, we consider a 2-dimensional
generalization of our theory motivated by space-time supersymmetry. In the case
that expectations are given by functional integrals, Z(Q,a) has a simple
integral representation. We also explain in detail how our construction relates
to Connes' entire cyclic cohomology, as well as to other frameworks.
