A simple way to discover the Riemann curvature tensor
$\newcommand{\R}{\mathbb{R}}$ A natural question is determining when two Riemannian metrics are locally isometric. In other words, given two Riemannian metrics \begin{equation}\label{metrics} g = g_{ij}(x)\,dx^i\,dx^j\text{ and }h = h_{ij}(y)\,dy^i\,dy^j, \end{equation} we want to know whether there exists a smooth diffeomorphism $y(x)$ such that \begin{equation}\label{equation:isometric} g_{ij}(x)\,dx^i\,dx^j = h_{ij}(y(x))\,\frac{\partial y^i}{\partial x^p}\frac{\partial y^j}{\partial x^q}\,dx^i\,dx^j. \end{equation} This is in general a hard question to answer. We can, however, ask a simpler question. When are two metrics equal up to, say, second order at a given point? We know immediately that there is no obstruction in the first order expansion of a metric, since we can always change coordinates so that both metrics are equal to $\delta_{ij}$ at a point and their first partial derivatives vanish at the point, too. We show below that there is indeed an obstruction in the second order expansion of the metric, and this leads to the definition of the Riemann curvature tensor.
We begin by recalling how to normalize the metric up to first order. This can also be done using exponential coordinates (also known as geodesic normal coordinates), but the direct proof is quite simple.
We therefore assume that we have two metrics \eqref{metrics} such that both satisfy \eqref{zeroth-order-metric} and \eqref{first-order-metric}. Now consider a local diffeomorphism of the form \begin{equation}\label{third-order-map} y^i = x^i + B^i_{jkl}x^jx^kx^l +\text{ higher order terms}. \end{equation} If we now differentiate \eqref{equation:isometric} twice and evaluate at $0$, we get
\[\partial_{kl}^2g_{ij} = \partial_{kl}^2h_{ij} + \partial_{jkl}^3y^i + \partial_{ikl}^3y^j.\]Permuting the indices, we get \begin{equation} \partial_{jl}^2g_{ik} = \partial_{jl}^2h_{ik} + \partial_{jkl}^3y^i \label{g1} \end{equation} \begin{equation} \partial_{ik}^2g_{jl} = \partial_{ik}^2h_{jl} + \partial_{ikl}^3y^j \label{g2} \end{equation} \begin{equation} \partial_{jk}^2g_{il} = \partial_{jk}^2h_{il} + \partial_{jkl}^3y^i \label{g3} \end{equation} \begin{equation} \partial_{il}^2g_{jk} = \partial_{il}^2h_{jk} + \partial_{ikl}^3y^j \label{g4} \end{equation} Therefore, \(\eqref{g1} + \eqref{g2} - \eqref{g3} - \eqref{g4}\) implies that
\[\partial^2_{jl}g_{ik} + \partial^2_{ik}g_{jl} - \partial^2_{jk}g_{il} - \partial^2_{il}g_{jk} = \partial^2_{jl}h_{ik} + \partial^2_{ik}h_{jl} - \partial^2_{jk}h_{il} - \partial^2_{il}h_{jk}\]It follows that, if we define
\[R^g_{ijkl} = -\frac{1}{2}(\partial^2_{jl}g_{ik}(0) + \partial^2_{ik}g_{jl}(0) - \partial^2_{jk}g_{il}(0) - \partial^2_{il}g_{jk}(0)),\]then if two metrics $g$ and $h$ are isometric up to second order near $0$, then, there exist local coordinates for each metric such that \eqref{zeroth-order-metric}, \eqref{first-order-metric}, and
\[R^g_{ijkl} = R^h_{ijkl}.\]The fact that this is invariant under local diffeomorphisms given by \eqref{third-order-map} implies that it transforms as a $4$-th order tensor under arbitrary local diffeomorphisms. In other words, it is a coordinate-independent invariant of the metric. It is, in fact, the Riemann curvature tensor at $0$.