# Part 3 - the metric

We already mentioned the notion of the magnitude of a vector, but we said nothing about what it actually is. On a plane it's easy - when we move by $v_x$ in the $x$ axis and by $v_y$ in the $y$ axis, the distance between the starting and the ending point is $\sqrt{v_x^2 + v_y^2}$ (which can be seen by drawing a right triangle and using the Pythagorean theorem - see the picture). It doesn't have to be always like that, though, and here is where the metric comes into play.

The metric is a way of generalizing the Pythagorean theorem. The coordinates don't always correspond to distances along perpendicular axes, and it is even not always possible to introduce such coordinates (but let's not get ahead of ourselves). We want then to have a way of calculating the distance between points $\Delta x^\mu$ apart, where $x^\mu$ are some unspecified coordinates.

As it turns out, it can be done by introducing numbers denoted $g_{\mu\nu}$ (2 indices mean that in 4 dimensions we have 4x4 = 16 numbers - although, as we will see in a moment, not really). Now we say that the square of the distance between points differing in respective coordinates by $\Delta x^\mu$ is equal to $g_{\mu\nu}\Delta x^\mu \Delta x^\nu$. Remember the summation convention! This means $g_{00}(\Delta x^0)^2 + g_{01}\Delta x^0 \Delta x^1 + ... + g_{10}\Delta x^1 \Delta x^0 + g_{11}(\Delta x^1)^2 + ...$
Because multiplication is commutative, $\Delta x^0 \Delta x^1 = \Delta x^1 \Delta x^0$ and we can write this as follows: $g_{00}(\Delta x^0)^2 + (g_{01}+g_{10})\Delta x^0 \Delta x^1 + g_{11}(\Delta x^1)^2 + ...$

Actually, in every physical quantity the components $g_{\mu\nu}$ for $\mu \neq \nu$ will always be summed - it doesn't matter then, how the sum is divided between $g_{\mu\nu}$ and $g_{\nu\mu}$. We can assume that those expressions are equal and swapping the indices changes nothing. This means that in 4 dimensions only 10 numbers out of 16 are actually different.

Since we have 2 indices, the metric is often written in form of a table (a matrix):

10 numbers mentioned before are the 4 diagonal numbers ($g_{00}$, $g_{11}$, $g_{22}$, $g_{33}$) and 6 numbers outside the diagonal (the same numbers will be above and below it).

In the simplest case, on a plane, the square of the distance between points is $\Delta x^2 + \Delta y^2$, so the metric looks like this:

Such a metric (ones on the diagonal, zeros everywhere else) is usually called trivial (because it is the simplest possible metric), and such a matrix can be referred to as an identity matrix.

We can now finally say what is the magnitude of a vector. If a vector represents a translation by $v^\mu$, its length (magnitude) will be $|v| = \sqrt{g_{\mu\nu}v^\mu v^\nu}$ (again, I remind you about the summation convention!).

This is not the end, though. Nobody said that the metric cannot change between points in space. If it is different in different places, that means $g_{\mu\nu}$ are not numbers, but functions, depending on the point in space. It is hard to talk about distances between points then, because the metric can change on the way. What can be defined, though, is the length of infinitely small (infinitesimal) line segment, where coordinates differ only by $dx^\mu$ (derivative-like notation is not a coincidence - with derivatives you also need points infinitely close to each other in the limit).

What about the vectors, then? Well, vectors are treated as if they were contained in one point - their initial point. More precisely, the vectors are not a part of the manifold, but of so called tangent space. We won't go deeper into this topic - it's enough to say that we still calculate their magnitude the same way, using the metric coefficients from their initial point.

Also, remember that by a vector we often mean a vector field. The expression $\sqrt{g_{\mu\nu} v^\mu v^\nu}$ then means a function which to each point of space assigns the magnitude of the vector field at that point.

It's time for an example again. One of the simplest variable metric appears when so called polar coordinates are introduced on a plane - that is, instead of $x$ and $y$ , which mean the distance from origin along perpendicular axes, we introduce $r$ - the distance from origin and $\theta$ - the angle between the direction from origin to the given point and the x axis (see the picture below).  In this case, if we change $r$ by $dr$ and $\theta$ by $d\theta$, we get a point $dr^2 + r^2 d\theta^2$ away from the initial one (we move in one direction by $dr$, and perpendicularly along a circle - by an arc $rd\theta$ long; when $dr$ and $d\theta$ are close to 0, it works as if they were sides of a right triangle - see the picture). The metric looks like this, then:
$g_{rr} = 1$
$g_{\theta\theta} = r^2$
$g_{r\theta} = g_{\theta r} = 0$
or:
$g = \left(\begin{array}{cc} 1 & 0 \\ 0 & r^2 \end{array}\right)$

Assume we have a vector field $v^r = 0$, $v^\theta = 1$. Its magnitude is $|v| = \sqrt{1 \times (v^r)^2 + r^2 \times (v^\theta)^2} = \sqrt{r^2} = r$. This means such a vector field is longer the farther it is from the origin. It's not really surprising - after all it describes movement in the $\theta$ angle, and the farther it is from the origin, the longer are the arcs corresponding to the same angle.

Another example: a sphere. When coordinates $(\theta, \varphi)$ (roughly latitude and longitude) are introduced, we get the metric:
$g = \left(\begin{array}{cc} 1 & 0 \\ 0 & \sin^2 \theta \end{array}\right)$

Calculating magnitudes of vectors is not the only use of a metric. It can also be used to calculate generalized dot products. Simply put, the dot product lets us calculate angles between vectors. In the case of two vectors on a plane it is expressed like this: $\vec{u} \cdot \vec{v} = u_xv_x + u_yv_y$. In higher dimensions it is similar, only you have to sum more products of coordinates. In the case of a non-trivial metric, it is generalized to $g_{\mu\nu} u^\mu v^\nu$. And what about the relation with the angle? As it turns out, $\vec{u} \cdot \vec{v} = |u||v|\cos \alpha$, where $\alpha$ is the angle between vectors (generally - we will later see that in relativity the dot product has a radically different meaning).

There is one more important use of the metric. Namely, it allows turning vectors into covectors and vice versa. Let's see: we have a vector $v^\mu$. Using the metric, we can create a corresponding covector $v_\mu = g_{\mu\nu}v^\nu$ (so eg. $v_0 = g_{00}v^0 + g_{01}v^1 + g_{02}v^2 + g_{03}v^3$). It is called lowering the index.

When the metric is trivial, we will always get $v_\mu = v^\mu$ - in that case vectors and covectors are practically the same. With non-trivial metrics they are different, though.

The possibility of lowering the index lets us write the magnitude of a vector like this: $|v| = \sqrt{v^\mu v_\mu}$.

You can lower indices, but what about raising them? Can you turn a covector $u_\mu$ into a vector $u^\mu$? Well, yes you can, but for that you need the inverse metric. Inverse metric is a matrix $g^{\mu\nu}$, which will give the identity matrix when multiplied by the metric: $g^{\mu\sigma}g_{\sigma\nu} = \delta^\mu_\nu$ ($\delta^\mu_\nu$ is a so-called Kronecker delta - a matrix containing 1 for $\mu=\nu$ and 0 otherwise - so it's just an identity matrix with one upper and one lower index). Raising and index looks like this, then: $u^\mu = g^{\mu\nu}u_\nu$.

So, what happens if we take a vector, lower its index and then raise it back again? We get:
$u^\mu = g^{\mu\sigma}g_{\sigma\nu}v^\nu$
As we already know, the product of the inverse metric and the metric is the Kronecker delta, so we can write this so:
$u^\mu = \delta^mu_\nu v^\nu$
But! Let's calculate $u^0$, for example:
$u^0 = \delta^0_0 v^0 + \delta^0_1 v^1 + \delta^0_2 v^2 + \delta^0_3 v^3$.
Like we mentioned, the Kronecker delta is 1 for equal indices and 0 for different, so we get:
$u^0 = 1 \times v^0 + 0 \times v^1 + 0 \times v^2 + 0 \times v^3$
$u^0 = v^0$
And it will be like that for every $\mu$. We have then: $u^\mu = v^\mu$ - the vector hasn't changed. Lowering an index and raising it back gives the initial vector as a result.

By the way, we have another conclusion: multiplying by the Kronecker delta changes nothing. $\delta^\mu_\nu v^\nu = v^\mu$, $\delta^\nu_\mu u_\nu = u_\mu$. That is actually why such a matrix is called an "identity" matrix - multiplying by it gives a result identical to what you started with.

This is all we need to know about metrics. In the next part we will say a bit about describing curves and about geodesic lines, and then we will finally move on to physics.