There ought to exist a reformulation of quantum mechanics which does not refer to an external classical spacetime manifold. Such a reformulation can be achieved using the language of noncommutative differential geometry. A consequence which follows is that the ‘weakly quantum, strongly gravitational’ dynamics of a relativistic particle whose mass is much greater than Planck mass is dual to the ‘strongly quantum, weakly gravitational’ dynamics of another particle whose mass is much less than Planck mass. The masses of the two particles are inversely related to each other, and the product of their masses is equal to the square of Planck mass. This duality explains the observed value of the cosmological constant, and also why this value is nonzero but extremely small in Planck units.