The Metric Tensor
Here is a question so basic it sounds silly: how do you measure a distance? On a flat sheet of graph
paper the answer is Pythagoras — a tiny step (dx, dy) has length
ds with ds^2 = dx^2 + dy^2. But now describe the
same flat plane using polar coordinates (r,\theta). A step
d\theta in angle covers a bigger arc the further out you are — its length is
r\,d\theta, not d\theta. So now
ds^2 = dr^2 + r^2\,d\theta^2.
Where did that r^2 come from? It is the metric tensor doing
its job. The metric is the object that tells you how to turn coordinate differences into real,
physical distances — and once distances change from place to place, or space itself curves, it becomes
the single most important tensor in physics. This page is about that one object,
g_{ij}.
What the metric is
The metric tensor is a symmetric
rank-2 tensor
g_{ij} whose job is to eat two small displacement vectors and return their
inner product. Fed the same displacement twice, it returns the squared length — the master formula
(with the Einstein summation convention) is:
-
Squared distance.
ds^2 = g_{ij}\,dx^i\,dx^j — sum over both repeated indices.
-
Dot products, lengths, angles. For any two vectors,
\mathbf{u}\cdot\mathbf{v} = g_{ij}\,u^i v^j; the metric is what
defines length and angle in the space.
Read off the metric by matching the line element. Flat Cartesian space,
ds^2 = dx^2 + dy^2, has
g_{ij} = \delta_{ij} — the identity, ones on the diagonal. Polar
coordinates, ds^2 = dr^2 + r^2 d\theta^2, have
g_{ij} = \begin{pmatrix} 1 & 0 \\ 0 & r^2 \end{pmatrix}.
Same flat plane, different coordinates, different-looking metric — but it measures the very same
distances. That is the whole point: the metric carries the geometry, whatever coordinates you dress it
in.
Seeing the metric: why the r² is there
The figure makes the polar metric visible. A fixed wedge of angle
\Delta\theta is drawn from the origin; slide the radius
r outward and watch the arc it subtends. The coordinate step
\Delta\theta never changes, but the physical arc length
r\,\Delta\theta grows in proportion to r.
That growth is exactly the factor g_{\theta\theta} = r^2 in the line
element: length-per-unit-\theta is r, so
length-squared-per-unit-\theta^2 is r^2. The
metric is the dictionary between coordinate steps and true distances, and here it says "one radian of
angle is worth r units of length."
The metric's second job: raising and lowering indices
In the tensor world
there are two flavours of index — contravariant (upstairs, v^i) and
covariant (downstairs, v_i). The metric is the machine that converts between
them. Lowering an index means contracting with g_{ij}; raising it means
contracting with the inverse metric g^{ij}:
v_i = g_{ij}\,v^j, \qquad v^i = g^{ij}\,v_j, \qquad g^{ik}g_{kj} = \delta^i_{\,j}.
The inverse metric is literally the matrix inverse of g_{ij}; together they
multiply to the Kronecker delta. This raising and lowering is not bookkeeping fluff — it is how you
form the dot product \mathbf{u}\cdot\mathbf{v} = u_i v^i = g_{ij}u^i v^j,
and in curved space it is the only correct way to compare vectors with covectors. A symmetric
n\times n metric has \tfrac{n(n+1)}{2} independent
components — the count that matters when you tally the unknowns in a field theory.
Flat versus curved — the deepest use
Here is the payoff. In genuinely flat space you can always find coordinates in which
the metric is the plain identity \delta_{ij} everywhere at once —
the polar r^2 is just a coordinate artefact you can transform away. In a
curved space you cannot: on the surface of a sphere of radius
a,
ds^2 = a^2\,d\theta^2 + a^2\sin^2\!\theta\;d\varphi^2, \qquad g_{ij} = \begin{pmatrix} a^2 & 0 \\ 0 & a^2\sin^2\theta \end{pmatrix},
and no clever change of coordinates can make this constant everywhere — the honest curvature of the
sphere is locked inside how g_{ij} varies from point to point. This is the
idea Einstein built general relativity on: gravity is not a force but the curvature of
a four-dimensional spacetime metric g_{\mu\nu}. Even flat spacetime has a
non-trivial metric — the Minkowski metric
\eta_{\mu\nu} = \mathrm{diag}(-1, 1, 1, 1), whose crucial minus sign is what
separates time from space and makes the whole of special relativity work.
Worked examples
Example 1 — read off a metric. Cylindrical coordinates have
ds^2 = dr^2 + r^2 d\theta^2 + dz^2. Matching
ds^2 = g_{ij}dx^i dx^j, the metric is diagonal:
g_{ij} = \mathrm{diag}(1, r^2, 1).
Example 2 — the inverse metric. For the polar metric
g_{ij} = \mathrm{diag}(1, r^2), the inverse is
g^{ij} = \mathrm{diag}(1, 1/r^2) — invert each diagonal entry. Check:
g^{\theta\theta}g_{\theta\theta} = \tfrac{1}{r^2}\cdot r^2 = 1 = \delta^\theta_{\,\theta}.
Example 3 — a distance on a sphere. On a unit sphere
(a=1), a small step of d\theta = 0.1 at the equator
(\theta = 90^\circ) and d\varphi = 0.1 has
ds^2 = 1\cdot(0.1)^2 + 1\cdot\sin^2(90^\circ)\cdot(0.1)^2 = 0.02, so
ds = \sqrt{0.02}\approx 0.141.
Example 4 — counting components. In 4-dimensional spacetime the metric is a symmetric
4\times 4 tensor, so it has
\tfrac{n(n+1)}{2} = \tfrac{4\cdot5}{2} = 10 independent components — the ten
functions Einstein's equations solve for.
Only in flat space written in Cartesian coordinates. The instant you switch to polar, cylindrical or
spherical coordinates — or onto any curved surface — the metric picks up position-dependent entries
like r^2 or a^2\sin^2\theta. Assuming
g_{ij}=\delta_{ij} and using bare Pythagoras in polar coordinates is a
classic blunder: it would say a step d\theta always has the same length,
when really it scales with r.
And do not confuse "the metric looks complicated" with "the space is curved." The polar metric
\mathrm{diag}(1, r^2) has a messy-looking entry but describes a perfectly
flat plane — you can transform it back to \delta_{ij}. Curvature is
about whether such a transformation exists everywhere at once, not about how the metric
happens to look in your chosen coordinates.
In everyday space the metric is positive-definite: every real displacement has a
positive squared length. Spacetime is different. The Minkowski metric
\eta_{\mu\nu}=\mathrm{diag}(-1,1,1,1) gives the "distance" between two events
as ds^2 = -c^2 dt^2 + dx^2 + dy^2 + dz^2 — the time part enters with the
opposite sign. That single minus is the entire geometric content of special relativity.
Its consequences are everything you know about relativity. When ds^2 < 0
the separation is timelike (a cause can reach an effect); ds^2 > 0
is spacelike (no signal can connect them); and ds^2 = 0 traces the
path of light itself. The invariant interval ds^2, unlike separate distances
and times, is agreed on by every observer — the metric is what all of them share. A metric that mixes
plus and minus signs is called indefinite, and spacetime's is why the future is not just
"more space."