In the mathematical field of differential geometry, a metric tensor (or simply metric) is an additional structure on a manifold M (such as a surface) that allows defining distances and angles, just as the inner product on a Euclidean space allows defining distances and angles there. More precisely, a metric tensor at a point p of M is a bilinear form defined on the tangent space at p (that is, a bilinear function that maps pairs of tangent vectors to real numbers), and a metric field on M consists of a metric tensor at each point p of M that varies smoothly with p.
A metric tensor g is positive-definite if g(v, v) > 0 for every nonzero vector v. A manifold equipped with a positive-definite metric tensor is known as a Riemannian manifold. Such a metric tensor can be thought of as specifying infinitesimal distance on the manifold. On a Riemannian manifold M, the length of a smooth curve between two points p and q can be defined by integration, and the distance between p and q can be defined as the infimum of the lengths of all such curves; this makes M a metric space. Conversely, the metric tensor itself is the derivative of the distance function (taken in a suitable manner).[citation needed]
While the notion of a metric tensor was known in some sense to mathematicians such as Gauss from the early 19th century, it was not until the early 20th century that its properties as a tensor were understood by, in particular, Gregorio Ricci-Curbastro and Tullio Levi-Civita, who first codified the notion of a tensor. The metric tensor is an example of a tensor field.
The components of a metric tensor in a coordinate basis take on the form of a symmetric matrix whose entries transform covariantly under changes to the coordinate system. Thus a metric tensor is a covariant symmetric tensor. From the coordinate-independent point of view, a metric tensor field is defined to be a nondegenerate symmetric bilinear form on each tangent space that varies smoothly from point to point.