In general relativity, spacetime is a four-dimensional pseudo-Riemannian manifold whose geometry is encoded in the metric tensor g_μν. The metric generalizes the flat Minkowski metric η_μν of special relativity to allow curvature: the infinitesimal spacetime interval ds² = g_μν dx^μ dx^ν determines proper time along timelike paths, proper distance along spacelike separations, and the causal structure (timelike, null, spacelike) at every event. The metric is the fundamental dynamical variable of GR — it is determined by the distribution of matter and energy through Einstein's field equations, and it in turn dictates how matter and light move through spacetime.
In special relativity, spacetime is flat and described by the Minkowski metric η_μν = diag(-1, +1, +1, +1) (in units where c = 1). The interval ds² = η_μν dx^μ dx^ν = -dt² + dx² + dy² + dz² is the same for all inertial observers — it is the invariant quantity that encodes both the geometry and the causal structure of flat spacetime. Timelike intervals measure proper time; null intervals trace the paths of light; spacelike intervals measure proper distance between simultaneous events.
General relativity promotes this to curved spacetime. The Minkowski metric is replaced by a general symmetric tensor field g_μν(x) that varies from point to point: ds² = g_μν(x) dx^μ dx^ν. The metric now has ten independent components (owing to symmetry g_μν = g_νμ), and they are functions of the spacetime coordinates. In the presence of matter and energy, the geometry is no longer flat — the metric components encode gravitational effects. Near a massive body, g_00 deviates from -1 in a way that produces gravitational time dilation; the spatial components deviate from the flat values in ways that curve spatial geometry. The Schwarzschild metric, for example, describes the spacetime outside a spherically symmetric mass and is fully specified by the ten functions g_μν evaluated in a particular coordinate system.
The metric does far more than measure distances. It defines the inner product on the tangent space at each point, which in turn defines angles, orthogonality, and volume elements. It determines the connection (Christoffel symbols), which specifies how vectors are parallel-transported and how geodesics curve. It determines the curvature tensors (Riemann, Ricci, scalar), which encode tidal forces. And it determines the causal structure: the light cones tilt and deform as g_μν varies, dictating which events can influence which others. All of gravitational physics is contained in g_μν.
A crucial property of the metric is its signature. In four-dimensional spacetime, the metric has one negative and three positive eigenvalues (or the reverse, depending on convention) everywhere — this (-,+,+,+) or (+,-,-,-) signature is what makes the geometry pseudo-Riemannian rather than Riemannian. The negative sign is what creates the distinction between time and space, and it is what produces light cones. Without it, there would be no causal structure and no distinction between past and future. Physically, the signature is inherited from special relativity: in any sufficiently small region, the equivalence principle guarantees that coordinates can be chosen so that g_μν reduces to η_μν, confirming the Lorentzian signature.
Finally, the metric is the dynamical variable of general relativity in the same sense that the electromagnetic four-potential A_μ is the dynamical variable of electrodynamics. Einstein's field equations G_μν = 8πG T_μν are second-order partial differential equations for g_μν, with the stress-energy tensor T_μν as the source. Solving for the metric given a matter distribution is the central computational task of GR. The ten components of g_μν minus four coordinate degrees of freedom and four constraint equations from the Bianchi identities leave two physical degrees of freedom — precisely the two polarizations of gravitational waves, the dynamical excitations of spacetime geometry itself.