转载自http://mathworld.wolfram.com/MetricTensor.html
Roughly speaking, the metric tensor is a function which tells how to compute the distance between any two points in a given space. Its components can be viewed as multiplication factors which must be placed in front of the differential displacements in a generalized Pythagorean theorem:
(1)

In Euclidean space, where is the Kronecker delta (which is 0 for and 1 for ), reproducing the usual form of the Pythagorean theorem
(2)

In this way, the metric tensor can be thought of as a tool by which geometrical characteristics of a space can be “arithmetized” by way of introducing a sort of generalized coordinate system (Borisenko and Tarapov 1979).
In the above simplification, the space in question is most often a smooth manifold , whereby a metric tensor is essentially a geometrical object taking two vector inputs and calculating either the squared length of a single vector or a scalar product of two different vectors (Misner et al. 1978). In this analogy, the inputs in question are most commonly tangent vectors lying in the tangent space for some point, a fact which facilitates the more common definition of metric tensor as an assignment of differentiable inner products to the collection of all tangent spaces of a differentiable manifold (O’Neill 1967). For this reason, some literature defines a metric tensor on a differentiable manifold to be nothing more than a symmetric nondegenerate bilinear form (Dodson and Poston 1991).
An equivalent definition can be stated using the language of tensor fields and indices thereon. Along these lines, some literature defines a metric tensor to be a symmetric tensor field on a smooth manifold so that, for all , is nondegenerate and for some nonnegative integer (Sachs and Wu 1977). Here, is called the index of and the expression refers to the index of the respective quadratic form. This definition seems to occur less commonly than those stated above.
Metric tensors have a number of synonyms across the literature. In particular, metric tensors are sometimes called fundamental tensors (Fleisch 2012) or geometric structures (O’Neill 1967). Manifolds endowed with metric tensors are sometimes called geometric manifolds (O’Neill 1967), while a pair consisting of a real vector space and a metric tensor is called a metric vector space (Dodson and Poston 1991). Symbolically, metric tensors are most often denoted by or , although the notations (O’Neill 1967), (Fleisch 2012), and (Dodson and Poston 1991) are also sometimes used.
When defined as a differentiable inner product of every tangent space of a differentiable manifold , the inner product associated to a metric tensor is most often assumed to be symmetric, nondegenerate, and bilinear, i.e., it is most often assumed to take two vectors as arguments and to produce a real number such that
(3)

(4)

(5)

(6)

Note, however, that the inner product need not be positive definite, i.e., the condition
(7)

with equality if and only if need not always be satisfied. When the metric tensor is positive definite, it is called a Riemannian metric or, more precisely, a weak Riemannian metric; otherwise, it is called nonRiemannian, (weak) pseudoRiemannian, or semiRiemannian, though the latter two terms are sometimes used differently in different contexts. The simplest example of a Riemannian metric is the Euclidean metric discussed above; the simplest example of a nonRiemannian metric is the Minkowski metric of special relativity, the fourdimensional version of the more general metric of signature which induces the standard Lorentzian Inner Product on dimensional Lorentzian space. In some literature, the condition of nondegeneracy is varied to include either weak or strong nondegeneracy (Marsden et al. 2002); one may also consider metric tensors whose associated quadratic forms fail to be symmetric, though this is far less common.
In coordinate notation (with respect to a chosen basis), the metric tensor and its inverse satisfy a number of fundamental identities, e.g.
(8)

(9)

and
(10)

where is the matrix of metric coefficients. One example of identity (0) comes from special relativity where is the matrix of metric coefficients for the Minkowski metric of signature , i.e.
(11)

Generally speaking, identities (3), (2), and (1) can be succinctly written as
(12)

where
(13)


(14)

What’s more,
(15)

gives
(16)

and hence yields a quantitative relationship between a metric tensor and its inverse.
In the event that the metric is positive definite, the metric discriminants are positive. For a metric in twospace, this fact can be expressed quantitatively by the inequality
(17)

The orthogonality of contravariant and covariant metrics stipulated by
(18)

for gives linear equations relating the quantities and . Therefore, if metrics are known, the others can be determined, a fact summarized by saying that the existence of metric tensors gives a geometrical way of changing from contravariant tensors to covariant ones and vice versa (Dodson and Poston 1991).
In twospace,
(19)


(20)


(21)

Therefore, if is symmetric,
(22)


(23)

In any symmetric space (e.g., in Euclidean space),
(24)

and so
(25)

The angle between two parametric curves is given by
(26)

so
(27)

and
(28)

In arbitrary (finite) dimension, the line element can be written
(29)

where Einstein summation has been used. In three dimensions, this yields
(30)

and so it follows that the metric tensor in threespace can be written as
(31)

Moreover, because for when working with respect to orthogonal coordinate systems, the line elementfor threespace becomes
(32)


(33)

where are called the scale factors. Many of these notions can be generalized to higher dimensions and to more general contexts.