  This paper has four main parts. In the first part, we construct a
noncommutative residue for the hypoelliptic calculus on Heisenberg manifolds,
that is, for the class of Heisenberg PsiDOs introduced by Beals-Greiner and
Taylor. This noncommutative residue appears as the residual trace on integer
order Heisenberg PsiDOs induced by the analytic extension of the usual trace to
non-integer order Heisenberg PsiDOs. Moreover, it agrees with the integral of
the density defined by the logarithmic singularity of the Schwartz kernel of
the corresponding Heisenberg PsiDO. In addition, we show that this
noncommutative residue provides us with the unique trace up to constant
multiple on the algebra of integer order Heisenberg PsiDOs. In the second part,
we give some analytic applications of this construction concerning zeta
functions of hypoelliptic operators, logarithmic metric estimates for Green
kernels of hypoelliptic operators, and the extension of the Dixmier trace to
the whole algebra of integer order Heisenberg PsiDOs. In the third part, we
present examples of computations of noncommutative residues of some powers of
the horizontal sublaplacian and the contact Laplacian on contact manifolds. In
the fourth part, we present two applications in CR geometry. First, we give
some examples of geometric computations of noncommutative residues of some
powers of the horizontal sublaplacian and of the Kohn Laplacian. Second, we
make use of the framework of noncommutative geometry and of our noncommutative
residue to define lower dimensional volumes in pseudohermitian geometry, e.g.,
we can give sense to the area of any 3-dimensional CR manifold. On the way we
obtain a spectral interpretation of the Einstein-Hilbert action in
pseudohermitian geometry.
