A notion of curvature is introduced in multivariable operator theory and an analogue of the Gauss-Bonnet-Chern theorem is established. Applications are given to the metric structure of graded ideals in C[z1, . . . , zd], and the existence of “inner” sequences for closed submodules of the free Hilbert module H(C).