In mathematics, the Hilbert metric, also known as the Hilbert projective metric, is an explicitly defined distance function on a bounded convex subset of the n-dimensional Euclidean space Rn. It was introduced by David Hilbert as a generalization of Cayley's formula for the distance in the Cayley–Klein model of hyperbolic geometry, where the convex set is the n-dimensional open unit ball. Hilbert's metric has been applied to Perron–Frobenius theory and to constructing Gromov hyperbolic spaces.