A Riemannian metric on a smooth manifold assigns a smoothly varying inner product to each tangent space, enabling measurement of lengths, angles, areas, and volumes on curved spaces. In local coordinates, the metric is given by a symmetric positive-definite matrix gij(x) that encodes the geometry. Every smooth manifold admits a Riemannian metric (by partition of unity), but different metrics on the same manifold produce dramatically different geometries — the choice of metric is the central datum of Riemannian geometry.
A Riemannian metric g on a smooth manifold M is a smooth assignment of an inner product gp to each tangent space TpM. In local coordinates, the metric is specified by a symmetric, positive-definite matrix of smooth functions gij(x), and the inner product of two tangent vectors v = vⁱ∂/∂xⁱ and w = wʲ∂/∂xʲ is g(v,w) = gij vⁱwʲ. The line element ds² = gij dxⁱ dxʲ encodes the metric in a compact notation that makes transformation properties transparent. Under a coordinate change, gij transforms as a (0,2)-tensor: g'kl = gij (∂xⁱ/∂x'ᵏ)(∂xʲ/∂x'ˡ).
With a metric in hand, you can measure everything geometric. The length of a curve is the integral of the speed |γ'(t)| = √g(γ',γ'). The distance between points is the infimum of curve lengths. The angle between tangent vectors is cos θ = g(v,w)/(|v||w|). The volume of a region is the integral of the Riemannian volume form dVg = √det(gij) dx¹ ∧ ... ∧ dxⁿ. The metric also provides the musical isomorphisms ♭ and ♯ that convert between vectors and covectors — this is how the gradient ∇f (a vector) is obtained from the differential df (a covector).
Every smooth manifold admits a Riemannian metric — this follows from the partition-of-unity argument (averaging local Euclidean metrics with non-negative weights preserves positive definiteness). But the specific choice of metric determines the geometry. The flat metric on ℝⁿ, the round metric on Sⁿ, the hyperbolic metric on the Poincare disk, and the Schwarzschild metric of a black hole are all Riemannian metrics on their respective manifolds, each encoding fundamentally different geometry. The study of which manifolds admit metrics with special curvature properties (constant curvature, Einstein, Ricci-flat) is one of the central programs in modern differential geometry.
The Riemannian metric is the starting point for the rest of Riemannian geometry. From the metric, you derive the Levi-Civita connection (the unique torsion-free connection compatible with the metric), which defines parallel transport and covariant differentiation. From the connection, you derive curvature (measuring the failure of parallel transport to be path-independent). From curvature, you derive geometric and topological consequences via theorems like Gauss-Bonnet, Bonnet-Myers, and the comparison theorems. The metric is the seed from which the entire apparatus grows.