Tensor Contraction
Today, we’re keeping it brief and diving into tensor contraction, particularly its application in Riemannian geometry. Our motivating example will be the Ricci tensor, which, as we’ll see, is actually a contraction of the curvature tensor.
For the remaining of this post, suppose that $V_1,\dots, V_k$ and $W$ are all finite-dimensional vector spaces over the real numbers1, and $\alpha : V_i \times V_j \to W$ a bilinear map.
To see how this actually works, we’ll go over some simpler cases and then afterwards see how the Ricci tensor arises as the contraction of the curvature tensor.
Let’s start with $k = 2$ as this should be familiar to most of you who have taken linear algebra.
Another important example is when we have a vector space $V$ and consider its dual space $V^\ast$. You might already guess what the map $\alpha$ is going to be in this case.
Consider now the case with $k = 3$ and for example a $(1,2)$-tensor
\[T=T_{i\,\,k}^{\,\,j}\cdot \varepsilon^i\otimes e_j\otimes \varepsilon^k \in V^\ast \otimes V \otimes V^\ast,\]in a fixed bases $e_1,\dots,e_n$ and $\varepsilon^1,\dots,\varepsilon^n$ for $V$ and $V^\ast$ respectively.
There are a few different contractions we can perform here and since these depend on the bilinear map $\alpha$, some of them are a bit more difficult to construct. For a $(1,2)$-contraction we can always consider the canonical pairing $\alpha : V^\ast \times V \to \Bbb R$ which gives
\[\begin{align*} \operatorname{tr}_{\alpha,1,2}(T) &= T_{i\,\,k}^{\,\,j} \operatorname{tr}_{\alpha,1,2}(\varepsilon^i\otimes e_j\otimes \varepsilon^k) \\ &= T_{i\,\,k}^{\,\,j} \delta^i_j \varepsilon^k \\ &= T_{i\,\,k}^{\,\,i} \varepsilon^k. \end{align*}\]Likewise for a $(2,3)$-contraction we can use the canonical pairing to obtain
\[\begin{align*} \operatorname{tr}_{\alpha,2,3}(T) &= T_{i\,\,k}^{\,\,j} \operatorname{tr}_{\alpha,2,3}(\varepsilon^i\otimes e_j\otimes \varepsilon^k) \\ &= T_{i\,\,k}^{\,\,j} \delta^k_j \varepsilon^i \\ &= T_{i\,\,k}^{\,\,k}\varepsilon^i. \end{align*}\]What about a $(1,3)$-contraction? For such a contraction we would need a bilinear map $\alpha : V^\ast \times V^\ast \to W$ for some vector space $W$. In general there is no such a map, but suppose we have the additional datum of an inner product $g$ on $V$. This yields an isomorphism $g^\flat : V \to V^\ast$ with inverse $g^\sharp : V^\ast \to V$. Using this we can define a bilinear map
\[\begin{align*} h : V^\ast \times V^\ast &\to \Bbb R \\ (\varphi,\psi) &\mapsto g\left(g^\sharp(\varphi),g^\sharp(\psi)\right). \end{align*}\]This in turn gives us a way to perform the $(1,3)$-contraction with $\alpha = h$. We obtain
\[\begin{align*} \operatorname{tr}_{\alpha,1,3}(T) &= T_{i\,\,k}^{\,\,j} \operatorname{tr}_{\alpha,1,3}(\varepsilon^i\otimes e_j\otimes \varepsilon^k) \\ &= T_{i\,\,k}^{\,\,j} h(\varepsilon^i, \varepsilon^k) e_j \\ &= T_{i\,\,k}^{\,\,j} g^{ik}e_j, \end{align*}\]where $g^{ij}$ are the components of the inverse metric $h$. In practice you’ll see this being called lowering an index. Traditionally we can only contract a tensor with one upper index and one lower index, but like above, when we have two upper indices we ought to lower on of them with the metric.
If this is the first time you are seeing index gymnastics, here is a quick intro. If $T$ is any $(k,l)$-tensor and $i \in \{1,\dots,k+l\}$ is any covariant index position for $T$ (meaning that the $i$th argument is a vector, not a covector), we can form a new tensor $T^\sharp$ of type $(k+1,l-1)$ by setting
\[T^\sharp(\alpha_1,\dots, \alpha_{k+l}) = T(\alpha_1,\dots, \alpha_{i-1},\alpha^\sharp_i,\alpha_{i+1},\dots, \alpha_{k+l}),\]where $\alpha_1,\dots, \alpha_{k+l}$ are vectors or covectors as appropriate. For example, if $T = T_{i\,\,k}^{\,\,j} \varepsilon^i \otimes e_j \otimes \varepsilon^k$ is a tensor of type $(1,2)$, then we can raise the first index to obtain a tensor of type $(2,1)$. We obtain
\[\begin{align*} T^\sharp(\alpha,\omega, X) &= T(\alpha^\sharp, \omega, X) \\ &= T\left(\left(\alpha_i\varepsilon^i\right)^\sharp, \omega_j\varepsilon^j, X^ke_k\right) \\ &= T\left((g^{li}\alpha_i)e_l, \omega_j\varepsilon^j, X^ke_k\right) \\ &= T(e_l,\varepsilon^j, e_k)g^{li}\alpha_i\omega_j X^k \\ &= g^{li} T_{l\,\,k}^{\,\,j}e_i \otimes e_j \otimes \varepsilon^k(\alpha,\omega,X) \\ &= T^{ij}_{\,\,\,k}e_i \otimes e_j \otimes \varepsilon^k(\alpha,\omega,X). \end{align*}\]That is, $T^\sharp = T^{ij}_{\,\,\,k}e_i \otimes e_j \otimes \varepsilon^k$. Similarly, if $i$ is a contravariant index position, we can define a $(k-1,l+1)$-tensor $T^\flat$ by
\[T^\flat(\alpha_1,\dots, \alpha_{k+l}) = T(\alpha_1,\dots, \alpha_{i-1},\alpha^\flat_i,\alpha_{i+1},\dots, \alpha_{k+l}).\]For example with the above $(1,2)$-tensor $T = T_{i\,\,k}^{\,\,j} \varepsilon^i \otimes e_j \otimes \varepsilon^k$, we can transform it into an $(0,3)$-tensor by lowering the middle index. We obtain
\[\begin{align*} T^\flat(X,Y, Z) &= T(X, Y^\flat, Z) \\ &= T\left(X^ie_i, (g_{jl}Y^j)\varepsilon^l, Z^ke_k\right) \\ &= T(e_i,\varepsilon^l, e_k)X^ig_{jl}Y^jZ^k \\ &= g_{jl} T_{i\,\,k}^{\,\,l}\varepsilon^i \otimes \varepsilon^j \otimes \varepsilon^k(X,Y,Z) \\ &= T_{ijk}\varepsilon^i \otimes \varepsilon^j \otimes \varepsilon^k(X,Y,Z), \end{align*}\]i.e. $T^\flat = T_{ijk}\varepsilon^i \otimes \varepsilon^j \otimes \varepsilon^k$. To avoid the notational overload, people usually the symbols $T^\sharp$ and $T^\flat$ without explicitly specifying which index position the sharp or flat operator is to be applied to — when there is more than one choice, we will always stipulate in words what is meant.
Consider now a Riemannian manifold $(M,g)$ and the curvature tensor
\[R : \Gamma(TM) \times \Gamma(TM) \times \Gamma(TM) \to \Gamma(TM).\]In local coordinates we have
\[R = R^{\,\,\,\,\,\,l}_{ijk} dx^i \otimes dx^j \otimes dx^k \otimes \partial_l.\]The Ricci tensor is now simply the contraction $\operatorname{tr}_{\alpha,1,4}$, where $\alpha$ is the evaluation pairing $\alpha : T^\ast M \times TM \to \Bbb R$. We obtain
\[\begin{align*} \operatorname{Ric} &= \operatorname{tr}_{\alpha,1,4}(R) \\ &= R^{\,\,\,\,\,\,l}_{ijk} \operatorname{tr}_{\alpha,1,4}(dx^i \otimes dx^j \otimes dx^k \otimes \partial_l) \\ &= R^{\,\,\,\,\,\,l}_{ijk} \alpha(dx^i, \partial_l)dx^j \otimes dx^k \\ &= R^{\,\,\,\,\,\,l}_{ijk} \delta^i_l dx^j \otimes dx^k \\ &= R^{\,\,\,\,\,\,i}_{ijk} dx^j \otimes dx^k \\ &= R_{jk} dx^j \otimes dx^k, \end{align*}\]where2 $R_{jk} = R^{\,\,\,\,\,\,i}_{ijk}$.
While we are at it, the Scalar curvature $S$ is defined by taking the $(1,2)$-contraction of $\operatorname{Ric}$ relative to the inner product $h$ on the cotangent space induced by the Riemannian metric. In this instance, we obtain
\[\begin{align*} S &= \operatorname{tr}_{h,1,2}(\operatorname{Ric}) \\ &= R^{\,\,\,\,\,\,i}_{ijk} \operatorname{tr}_{h,1,2}(dx^j \otimes dx^k) \\ &= g^{jk}R^{\,\,\,\,\,\,i}_{ijk} \\ &= g^{jk}R_{jk}. \end{align*}\]That’s all this time around.