Metric tensor
Symmetric (0,2) tensor g_{μν} that defines distances, angles, and proper times on a manifold. ds² = g_{μν} dx^μ dx^ν. In flat SR spacetime g = η = diag(+1, −1, −1, −1); in GR g_{μν}(x) varies with position and encodes all gravitational information.
Definition
The metric tensor g_{μν} is the symmetric (0,2) tensor field on a manifold that turns it into a Riemannian (or, in physics, pseudo-Riemannian) manifold by defining an inner product on every tangent space. Its primary job is to assign a length to infinitesimal displacements: the line element ds² = g_{μν} dx^μ dx^ν is the squared arc-length of a coordinate increment dx^μ, and integrating ∫ √(g_{μν} dx^μ/dλ · dx^ν/dλ) dλ along a curve gives the proper length (or, with the GR signature, the proper time). The metric also defines angles between vectors, raises and lowers tensor indices via g^{μν} g_{νρ} = δ^μ_ρ, and is the only structural object on the manifold needed to derive the Levi-Civita connection and from it the curvature tensors.
In special relativity the metric is flat: η_{μν} = diag(+1, −1, −1, −1) (using the +−−− signature) and is the same at every point of Minkowski space. In general relativity the metric is g_{μν}(x) — a tensor field whose components depend on position. The dependence is exactly what encodes gravity: every gravitational effect, from time dilation in the Schwarzschild solution to the cosmological expansion of the FLRW spacetime, is read off the spatial variation of g_{μν}. Einstein's field equations are equations for the metric — given matter content T_{μν}, they determine g_{μν} up to coordinate freedom. Riemann's 1854 lecture introduced the idea; Einstein and Grossmann adopted it in 1912.