Metric trace (source code)

= Metric trace

The metric trace contracts two indices of a covariant rank-two tensor: $T=g^{\mu\nu}T_{\mu\nu}$. For the metric itself in $D$ dimensions, $g^{\mu\nu}g_{\mu\nu}=D$.