# Calculating the metric tensor.

1. Mar 12, 2013

### MathematicalPhysicist

Suppose, I have the next metric:
$$g = du^1 \otimes du^1 - du^2 \otimes du^2$$

And I want to calculate $$g(W,W)$$, where for example $$W=\partial_1 + \partial_2$$

How would I calculate it?

Thanks.

2. Mar 12, 2013

### WannabeNewton

The metric tensor is bilinear so $g_p(\partial _{1} + \partial _{2}, \partial _{1} + \partial _{2}) = g_p(\partial _{1} + \partial _{2},\partial _{1}) + g_p(\partial _{1} + \partial _{2},\partial _{2}) = \\g_p(\partial _{1},\partial _{1}) + g_p(\partial _{2},\partial _{1}) + g_p(\partial _{1},\partial _{2}) + g_p(\partial _{2},\partial _{2}) = g_{11}(p) + 2g_{12}(p) + g_{22}(p) = 1 +0 - 1 = 0$.

Assuming by $\partial _{i}|_{p}$ you are talking about the coordinate basis vectors, $g_p(\partial _{i},\partial _{j}) = g_{ij}$.

3. Mar 12, 2013

### MathematicalPhysicist

ok, thanks.

4. Mar 12, 2013

### HallsofIvy

Staff Emeritus
In matrix terms we can representn $g = du^1 \otimes du^1+ 0 du^1\otimes du^2+ 0 du^2\otimes du^1 - du^2 \otimes du^2$ as
$$\begin{pmatrix}1 & 0 \\ 0 & -1\end{pmatrix}$$

$$\begin{pmatrix}1 & 1\end{pmatrix}\begin{pmatrix}1 & 0 \\ 0 & -1\end{pmatrix}\begin{pmatrix}1 \\ 1 \end{pmatrix}= \begin{pmatrix}1 & -1\end{pmatrix}\begin{pmatrix}1 \\ 1\end{pmatrix}= 1+ (-1)= 0$$