Finding the metric from the line element If given the line element $ds^2$, which is the quadratic form associated to the metric $g$, I would use the polarization identity to find $g$. Is this always necessary? For instance, given the line element on the upper half plane $ds^2=\frac{dx^2+dz^2}{z^2}$, one can calculate that the metric is $g=\begin{bmatrix}1/z^2 & 0\\0 &1/z^2\end{bmatrix}$. Can one see this just from the fact that $ds^2$ only has diagonal terms? $ds^2(\frac{\partial}{\partial x})$ and $ds^2(\frac{\partial}{\partial z})$ gives you the diagonal terms, but if your line element only contains squares, does it follow that the off diagonal terms are zero?
 A: Using the line element is just a convenient way to describe the metric. You can see ${\rm d}s^2$ as the bilinear map $g$ itself, bearing in mind that the symmetric product is $${\rm d}x^i\,{\rm d}x^j = \frac{{\rm d}x^i\otimes {\rm d}x^j + {\rm d}x^j\otimes {\rm d}x^i}{2},$$and we have $$\sum_{i,j}g_{ij}\,{\rm d}x^i\,{\rm d}x^j = \sum_{i,j} g_{ij}\,{\rm d}x^i\otimes {\rm d}x^j$$in view of the symmetry $g_{ij} = g_{ji}$. So, for example, if we know that ${\rm d}s^2 = ({\rm d}x^2 + {\rm d}z^2)/z^2$, we can compute $$\begin{align}{\rm d}s^2(\partial_x,\partial_x) &= \frac{{\rm d}x^2(\partial_x,\partial_x) + {\rm d}z^2(\partial_z,\partial_z)}{z^2} \\ &= \frac{({\rm d}x\otimes {\rm d}x)(\partial_x,\partial_x) + ({\rm d}z\otimes {\rm d}z)(\partial_z,\partial_z)}{z^2} \\ &= \frac{{\rm d}x(\partial_x){\rm d}x(\partial_x) + {\rm d}z(\partial_x){\rm d}z(\partial_x)}{z^2} \\ &= \frac{1\cdot 1 + 0\cdot 0}{z^2} \\ &= \frac{1}{z^2}, \end{align}$$and similarly for ${\rm d}s^2(\partial_x,\partial_z) = 0$ and ${\rm d}s^2(\partial_z,\partial_z) = 1/z^2$. Of course no one writes all the steps like I did above -- they just do it in their heads. But this is what is going on behind the scenes.
