Suppose \(T\) is a covariant \(k\)-tensor field on a Riemannian manifold and \(R\) the Riemann curvature endomorphism . Then for all vector fields \(X,Y,V_1,\ldots, V_k\) the second covariant derivative of \(T\) satisfies the following identity
\begin{align*} \nabla^2_{X,Y}T(V_1,\ldots, V_k)=&\nabla^2_{Y,X}T(V_1,\ldots ,V_k) -T(R(X,Y)V_1,V_2,\ldots ,V_k)- \cdots -\\ &-T(V_1,\ldots ,V_{k-1}, R(X,Y)V_k). \end{align*}In local coordinates this formula reads
\[ T_{i_1\ldots i_k;pq}-T_{i_1\ldots i_k;qp} =R_{pqi_1}{}^mT_{mi_2\ldots i_k}+\cdots +R_{pqi_k}{}^mT_{i_1\ldots i_{k-1}m} \][1, Theorem 7.14].

Visualization of the Ricci identity using Penrose notation.
Remarks
- There is a more general version for \((l,k)\)-tensor fields in [1].
- This result holds also for pseudo-Riemannian manifolds.
References Link to heading
- J. Lee, Introduction to Riemannian Manifolds. Cham: Springer International Publishing, 2018. doi:10.1007/978-3-319-91755-9