I know that the metric tensor $g_{ij}$ is defined as:

$$g_{ij} = X_i \cdot X_j$$

where $x_i$ and $x_j$ are the covariant basis vectors ($X_i = \frac{\partial X}{\partial X^i}$) (the definition is from my book "Introduction to Tensor Analysis and the Calculus of Moving" by Pavel Grinfeld).

Surfaces. Now, I know that the metric encodes all the information about the geometry of the space it specifies. My confusion is to relate the definition above to the line elements. Suppose for example that the line element of a 2d space is given by: $$dl^2 = 2(dx^1)^2 + 5(x^1) (dx^2)^2$$. Now from this definition I can see that $g_{11} = 2 $ and $g_{22} = 5(x^1)$ (the other coefficients are zero). However, using the definition why is $X_1 \cdot X_1 = 2$?

## Best Answer

The text book is a bit misleading as it uses the natural scalar product on $\mathbb R^n$ to define the metric but if we ignore this fact everything is good. Suppose we are talking about polar coordinates that is $x= r \cos \theta$ and $y = r \sin \theta$. Then the "covariant basis vectors" would be (choosing $X_1 \leftrightarrow \hat r$ and $X_2 \leftrightarrow \hat \theta$)

$$\hat r = \frac{\partial x}{ \partial r} \hat x + \frac{\partial y}{ \partial r} \hat y = \cos \theta \,\hat x + \sin \theta \,\hat y $$

and similarly

$$\hat \theta = \frac{\partial x}{ \partial \theta} \hat x+ \frac{\partial y}{ \partial \theta} \hat y = -r\sin \theta \,\hat x + r \cos \theta \,\hat y$$

The components of the metric tensor is then

$$g_{rr} = \hat r \cdot \hat r =1 \qquad g_{\theta\theta} = \hat \theta\cdot\hat \theta = r^2 $$

and the other components $g_{r\theta} = \hat r \cdot \hat \theta$ are zero. So the total line element is then

$$ \mathrm{d}l^2= \mathrm{d}r^2+ r^2 \mathrm{d}\theta^2$$

To get back to your example, first note that the metric you gave is not a good one because it has zero component for $x_1=0$ and even negative one for $x_1<0$. Suppose we chose the line element

$$\mathrm{d}l^2=2 \mathrm{d}X_1^2+ X_1^2 \mathrm{d}X_2^2$$

instead. You can clearly see the how the polar coordinate line element is related to this one. The book assumes that you know first an equation like the polar coordinate one $x= r \cos \theta$ and $y = r \sin \theta$ and then tells you how to compute the metric from this information, which is what I did above.

Now of course, line elements are much more general than that and a priori you can write down a line element without referring to any "covariant basis vectors" or stuff like that (hence my complaint in the beginning). I think this was your main confusion. You wrote down a metric and asked where are the "covariant basis vectors"? The upshot is you don't need them!