# Metric tensor

The metric tensor's elements are the coefficients read off of the line element

 ${\displaystyle ds^{2}=g_{\mu \nu }dx^{\mu }dx^{\nu }}$

For special relativity rectilinear coordinate inertial frames are used which given

 ${\displaystyle x^{0}=ct}$
 ${\displaystyle x^{1}=x}$
 ${\displaystyle x^{2}=y}$
 ${\displaystyle x^{3}=z}$

the metric tensor will be designated ${\displaystyle \eta _{\mu \nu }}$ and the line element will be

 ${\displaystyle ds^{2}=dct^{2}-\left(dx^{2}+dy^{2}+dz^{2}\right)}$

and the Minkowski metric tensor elements given by

${\displaystyle \eta _{00}=1}$

${\displaystyle \eta _{11}=\eta _{22}=\eta _{33}=-1}$

All other elements are 0.

Written as a matrix this is

 ${\displaystyle ||\eta _{\mu \nu }||={\begin{bmatrix}1&0&0&0\\0&-1&0&0\\0&0&-1&0\\0&0&0&-1\end{bmatrix}}}$

The metric tensor acts a an index raising

 ${\displaystyle T^{\mu }=g^{\mu \nu }T_{\nu }}$

and lowering

 ${\displaystyle T_{\mu }=g_{\mu \nu }T^{\nu }}$

opperator. And as an inner product operator in 4d spacetime

 ${\displaystyle U^{\mu }T_{\mu }=g_{\lambda \mu }U^{\mu }T^{\lambda }}$

There is an inverse relationship between the contravariant and covariant metric tensor elements

 ${\displaystyle g_{\mu \lambda }g^{\lambda \nu }=\delta _{\mu }^{\nu }}$

which can be expressed as the matrix

 ${\displaystyle ||g_{\mu \lambda }g^{\lambda \nu }||={\begin{bmatrix}1&0&0&0\\0&1&0&0\\0&0&1&0\\0&0&0&1\end{bmatrix}}}$

So solving for the contravariant metric tensor elements given the covariant ones and vica-versa can be done by simple matrix inversion.

The covariant derivative of the metric with respect to any coordinate is zero

 ${\displaystyle g_{\mu \nu };_{\lambda }=0}$
 ${\displaystyle g^{\mu \nu };_{\lambda }=0}$

where the covariant derivative is done with the use of Christoffel symbols. And so of course the covariant divergence of the metric is also zero

 ${\displaystyle g^{\mu \nu };_{\nu }=0}$