Riemann - Maple Help

Physics[Riemann] - The Riemann tensor and the computation of the Riemann invariants

 Calling Sequence Riemann[alpha, beta, mu, nu] Riemann[keyword] Riemann[alpha, beta, mu, nu, keyword] convert(expression, Riemann)

Parameters

 alpha, beta, mu, nu - the indices, as names representing integer numbers between 0 and the spacetime dimension, they can also be the numbers themselves keyword - any of definition, matrix, array, nonzero, scalars and invariants

Description

 • The Riemann[alpha, beta, mu, nu], displayed as $\mathrm{R__α,β,μ,ν}$, is a computational representation for the Riemann tensor, defined with a contravariant first index in terms of the Christoffel symbols and derivatives as

${R}_{\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }}^{\mathrm{\alpha }}={\partial }_{\mathrm{\mu }}\left({\mathrm{\Gamma }}_{\mathrm{\beta },\mathrm{\nu }}^{\mathrm{\alpha }}\right)-{\partial }_{\mathrm{\nu }}\left({\mathrm{\Gamma }}_{\mathrm{\beta },\mathrm{\mu }}^{\mathrm{\alpha }}\right)+{\mathrm{\Gamma }}_{\mathrm{\kappa },\mathrm{\mu }}^{\mathrm{\alpha }}\mathrm{\Gamma }{}_{\mathrm{\beta },\mathrm{\nu }}^{\mathrm{\kappa }}-{\mathrm{\Gamma }}_{\mathrm{\kappa },\mathrm{\nu }}^{\mathrm{\alpha }}{\mathrm{\Gamma }}_{\mathrm{\beta },\mathrm{\mu }}^{\mathrm{\kappa }}$

 and ${R}_{\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }}={g}_{\mathrm{\alpha },\mathrm{\rho }}{R}_{\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }}^{\mathrm{\rho }}$. From this definition, and because of the symmetries of the Christoffel symbols with respect to interchanging the positions of their second and third indices the Riemann tensor is antisymmetric with respect to interchanging the position of its 1st and 2nd indices, or 3rd and 4th indices, and symmetric with respect to interchanging the positions of the 1st and 2nd pair of indices.
 • It is sometimesconvenient to rewrite tensorial expressions in terms of the Riemann tensor. For this purpose you can use convert(expression, Riemann).
 • When the indices of Riemann assume integer values they are expected to be between 0 and the spacetime dimension, prefixed by ~ when they are contravariant, and the corresponding value of Riemann is returned. The values 0 and 4, or for the case any dimension set for the spacetime, represent the same object. When the indices have symbolic values Riemann returns unevaluated after normalizing its indices taking into account their symmetry properties.
 • Computations performed with the Physics package commands take into account Einstein's sum rule for repeated indices - see . and Simplify. The distinction between covariant and contravariant indices in the input of tensors is done by prefixing contravariant ones with ~, say as in ~mu; in the output, contravariant indices are displayed as superscripts. For contracted indices, you can enter them one covariant and one contravariant. Note however that - provided that the spacetime metric is galilean (Euclidean or Minkowski), or the object is a tensor also in curvilinear coordinates - this distinction in the input is not relevant, and so contracted indices can be entered as both covariant or both contravariant, in which case they will be automatically rewritten as one covariant and one contravariant. Tensors can have spacetime and space indices at the same time. To change the type of letter used to represent spacetime or space indices see Setup.
 • During a Maple session, the value of any component of $\mathrm{R__α,β,μ,ν}$ is automatically determined by the value of the spacetime metric at the moment. When Physics is loaded, the spacetime is set to Minkowski type, and so all the elements of Riemann are automatically zero. To set the spacetime metric to something different use Setup. Also, at least one system of coordinates must be set in order to compute the derivatives entering the definition of the Christoffel symbols, used to construct the Riemann tensor. For that purpose see Coordinates or Setup.
 • Besides being indexed with four indices, Riemann accepts the following keywords:
 – definition: returns the definition of the Riemann tensor in terms of the Christoffel symbols and their derivatives.
 – array: (synonym: Array, Matrix, matrix, or no indices whatsoever, as in Riemann[]) returns an Array that when indexed with numerical values from 1 to the dimension of spacetime it returns the value of each of the components of Riemann. If this keyword is passed preceded by the tensor indices, that can be covariant or contravariant, the values in the resulting array are computed taking into account the character of the given indices. If only two of these indices are names, the rest have numerical values (if contravariant then preceded by ~), the returned object is the corresponding 2 x 2 Matrix.
 – nonzero: returns a set of equations, with the left-hand side as a sequence of two positive numbers identifying the element of $\mathrm{R__μ,ν}$ and the corresponding value on the right-hand side. Note that this set is actually the output of the ArrayElems command when passing to it the Array obtained with the keyword array.
 – scalars: returns the two complex scalars ${S}_{1}$ and ${S}_{2}$

${S}_{1}=\frac{1}{48}\left({R}_{\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }}{R}^{\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }}-i{R}_{\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }}{\left(\stackrel{*}{R}\right)}^{\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }}\right)$

${S}_{2}=\frac{1}{96}\left({R}_{\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }}{R}^{\mathrm{\alpha },\mathrm{\beta },\mathrm{\rho },\mathrm{\sigma }}{R}_{\mathrm{\rho },\mathrm{\sigma }}^{\mathrm{\mu },\mathrm{\nu }}+i{R}_{\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }}{R}^{\mathrm{\alpha },\mathrm{\beta },\mathrm{\rho },\mathrm{\sigma }}{\left(\stackrel{*}{R}\right)}_{\mathrm{\rho },\mathrm{\sigma }}^{\mathrm{\mu },\mathrm{\nu }}\right)$

 where $\mathrm{\left(R*\right)α,β,μ,ν}$ is the dual of the Riemann tensor

${\left(\stackrel{*}{R}\right)}_{\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }}=\frac{1}{2}{\mathrm{Ε}}_{\mathrm{\mu },\mathrm{\nu },\mathrm{\rho },\mathrm{\sigma }}{R}_{\mathrm{\alpha },\mathrm{\beta }}^{\mathrm{\rho },\mathrm{\sigma }}$

 and $\mathrm{Ε__μ,ν,ρ,σ}$ is the LeviCivita tensor in curvilinear coordinates (see Setup, option levicivita = nongalilean)

${\mathrm{Ε}}_{\mathrm{\mu },\mathrm{\nu },\mathrm{\rho },\mathrm{\sigma }}=\sqrt{-g}{\mathrm{ϵ}}_{\mathrm{\mu },\mathrm{\nu },\mathrm{\rho },\mathrm{\sigma }}$

 and $\mathrm{ϵ__μ,ν,ρ,σ}$ is the galilean LeviCivita and $g$ is the determinant of the spacetime metric. These scalars ${S}_{1}$ and ${S}_{2}$ enable one to calculate the invariants that permit classifying the canonical forms of the Riemann curvature tensor starting from the values of $\mathrm{R__α,β,μ,ν}$ in any reference system.
 – invariants: returns a sequence with the 16 invariants presented by Carminati and McLenaghan (see reference at the bottom), frequently labeled ${r}_{0}$ for the Ricci scalar and ${r}_{1},{r}_{2},{r}_{3},{w}_{1},{w}_{2},{m}_{1},{m}_{2},{m}_{3},{m}_{4},{m}_{5}$. The 6 invariants, the ${r}_{j},{m}_{3}$ and ${m}_{4}$ are real, the other 5 are complex. These invariants are all defined in terms of the Weyl tensor ${C}_{\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }}$, its dual ${\mathrm{*C}}_{\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }}$ defined as in the formula above for the dual of the Riemann tensor, and the trace-free Ricci tensor ${S}_{\mathrm{\mu },\mathrm{\nu }}={R}_{\mathrm{\mu },\mathrm{\nu }}-{R}_{\mathrm{\alpha }}^{\mathrm{\alpha }}{g}_{\mathrm{\mu },\mathrm{\nu }}$. The sequence of invariants is returned as a sequence of equations with the labels ${r}_{i},{w}_{k},{m}_{l}$ using local variables in the left-hand sides and the corresponding scalar invariant expressions in the right-hand sides.
 • Some automatic checking and normalization are carried out each time you enter Riemann[...]. The checking is concerned with possible syntax errors. The automatic normalization takes into account the symmetry properties of the indices of ${R}_{\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }}$ as described in the first paragraph.
 • The %Riemann command is the inert form of Riemann, so it represents the same mathematical operation but without performing it. To perform the operation, use value.

Examples

 > $\mathrm{with}\left(\mathrm{Physics}\right):$
 > $\mathrm{Setup}\left(\mathrm{mathematicalnotation}=\mathrm{true}\right)$
 $\left[{\mathrm{mathematicalnotation}}{=}{\mathrm{true}}\right]$ (1)

Set up a coordinate system to work with - the first one to be set is automatically taken as the differentiation variables for d_, the covariant derivative D_ and the dAlembertian

 > $\mathrm{Setup}\left(\mathrm{coordinatesystems}=\mathrm{cartesian}\right)$
 ${}\mathrm{Systems of spacetime coordinates are:}{}\left\{X=\left(x{,}y{,}z{,}t\right)\right\}$
 $\left[{\mathrm{coordinatesystems}}{=}\left\{{X}\right\}\right]$ (2)

When Physics is initialized, the default spacetime metric is of Minkowski type. You can see the metric querying Setup, as in Setup(metric);, or directly entering the metric as g_[], with no indices

 > $\mathrm{g_}\left[\right]$
 ${{g}}_{{\mathrm{\mu }}{,}{\mathrm{\nu }}}{=}\left[\begin{array}{cccc}{-1}& {0}& {0}& {0}\\ {0}& {-1}& {0}& {0}\\ {0}& {0}& {-1}& {0}\\ {0}& {0}& {0}& {1}\end{array}\right]$ (3)

Check the nonzero components of Christoffel, used to construct the Riemann tensor entering the definition of Riemann: because the default spacetime is of Minkowski type, there are none

 > $\mathrm{Christoffel}\left[\mathrm{nonzero}\right]$
 ${{\mathrm{\Gamma }}}_{{\mathrm{\alpha }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}{=}{\varnothing }$ (4)

Hence

 > $\mathrm{Christoffel}\left[\mathrm{\mu },\mathrm{\alpha },\mathrm{\beta }\right]$
 ${0}$ (5)
 > $\mathrm{Riemann}\left[\mathrm{\mu },\mathrm{\nu },\mathrm{\alpha },\mathrm{\beta }\right]$
 ${0}$ (6)

and the same is valid for all the general relativity tensors defined in terms of Christoffel and derivatives of the metric g_. To set the scenario as a curved spacetime set the metric using Setup, for instance indicating the square of the spacetime interval. In this example, we also choose to work in spherical coordinates, so consider for instance the metric defined by

 > $\mathrm{ds2}≔{r}^{2}{\mathrm{dtheta}}^{2}+{r}^{2}{\mathrm{sin}\left(\mathrm{\theta }\right)}^{2}{\mathrm{dphi}}^{2}-2\mathrm{dt}\mathrm{dr}-2{k\left(r,t\right)}^{2}{\mathrm{dt}}^{2}$
 ${\mathrm{ds2}}{≔}{{r}}^{{2}}{}{{\mathrm{dθ}}}^{{2}}{+}{{r}}^{{2}}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}{{\mathrm{dφ}}}^{{2}}{-}{2}{}{\mathrm{dt}}{}{\mathrm{dr}}{-}{2}{}{{k}{}\left({r}{,}{t}\right)}^{{2}}{}{{\mathrm{dt}}}^{{2}}$ (7)
 > $\mathrm{Setup}\left(\mathrm{coordinates}=\mathrm{spherical},\mathrm{metric}=\mathrm{ds2}\right)$
 ${}\mathrm{Systems of spacetime coordinates are:}{}\left\{X=\left(r{,}\mathrm{\theta }{,}\mathrm{\phi }{,}t\right)\right\}$
 ${}\mathrm{_______________________________________________________}$
 $\mathrm{Coordinates:}\left[r{,}\mathrm{\theta }{,}\mathrm{\phi }{,}t\right]\mathrm{. Signature:}\left(\mathrm{- - - +}\right)$
 ${}\mathrm{_______________________________________________________}$
 ${{g}}_{{\mathrm{\mu }}{,}{\mathrm{\nu }}}{=}\left[\begin{array}{cccc}{0}& {0}& {0}& {-1}\\ {0}& {{r}}^{{2}}& {0}& {0}\\ {0}& {0}& {{r}}^{{2}}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}& {0}\\ {-1}& {0}& {0}& {-}{2}{}{{k}{}\left({r}{,}{t}\right)}^{{2}}\end{array}\right]$
 ${}\mathrm{_______________________________________________________}$
 $\mathrm{Setting}\mathrm{lowercaselatin_is}\mathrm{letters to represent}\mathrm{space}\mathrm{indices}$
 $\mathrm{_______________________________________________________}$
 $\left[{\mathrm{coordinatesystems}}{=}\left\{{X}\right\}{,}{\mathrm{metric}}{=}\left\{\left({1}{,}{4}\right){=}{-1}{,}\left({2}{,}{2}\right){=}{{r}}^{{2}}{,}\left({3}{,}{3}\right){=}{{r}}^{{2}}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{,}\left({4}{,}{4}\right){=}{-}{2}{}{{k}{}\left({r}{,}{t}\right)}^{{2}}\right\}{,}{\mathrm{spaceindices}}{=}{\mathrm{lowercaselatin_is}}\right]$ (8)

Now when the indices are not numerical, Riemann returns itself after normalizing its indices taking advantage of their symmetry properties, so that different forms of the same tensor enter computations in the same manner, for example, if you interchange the positions  as in

 > $\mathrm{Riemann}\left[\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }\right]$
 ${{R}}_{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}$ (9)
 > $\mathrm{Riemann}\left[\mathrm{\mu },\mathrm{\nu },\mathrm{\beta },\mathrm{\alpha }\right]$
 ${-}{{R}}_{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}$ (10)
 > $+$
 ${0}$ (11)

To express Riemann in terms of the Christoffel symbols and its derivatives convert to Christoffel

 > $=\mathrm{convert}\left(,\mathrm{Christoffel}\right)$
 ${{R}}_{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}{=}{{g}}_{{\mathrm{\alpha }}{,}{\mathrm{\lambda }}}{}\left({{\partial }}_{{\mathrm{\mu }}}{}\left({{\mathrm{\Gamma }}}_{\phantom{{}}\phantom{{\mathrm{\lambda }}}{\mathrm{\beta }}{,}{\mathrm{\nu }}}^{\phantom{{}}{\mathrm{\lambda }}\phantom{{\mathrm{\beta }}{,}{\mathrm{\nu }}}}\right){-}{{\partial }}_{{\mathrm{\nu }}}{}\left({{\mathrm{\Gamma }}}_{\phantom{{}}\phantom{{\mathrm{\lambda }}}{\mathrm{\beta }}{,}{\mathrm{\mu }}}^{\phantom{{}}{\mathrm{\lambda }}\phantom{{\mathrm{\beta }}{,}{\mathrm{\mu }}}}\right){+}{{\mathrm{\Gamma }}}_{\phantom{{}}\phantom{{\mathrm{\lambda }}}{\mathrm{\mu }}{,}{\mathrm{\upsilon }}}^{\phantom{{}}{\mathrm{\lambda }}\phantom{{\mathrm{\mu }}{,}{\mathrm{\upsilon }}}}{}{{\mathrm{\Gamma }}}_{\phantom{{}}\phantom{{\mathrm{\upsilon }}}{\mathrm{\beta }}{,}{\mathrm{\nu }}}^{\phantom{{}}{\mathrm{\upsilon }}\phantom{{\mathrm{\beta }}{,}{\mathrm{\nu }}}}{-}{{\mathrm{\Gamma }}}_{\phantom{{}}\phantom{{\mathrm{\lambda }}}{\mathrm{\nu }}{,}{\mathrm{\upsilon }}}^{\phantom{{}}{\mathrm{\lambda }}\phantom{{\mathrm{\nu }}{,}{\mathrm{\upsilon }}}}{}{{\mathrm{\Gamma }}}_{\phantom{{}}\phantom{{\mathrm{\upsilon }}}{\mathrm{\beta }}{,}{\mathrm{\mu }}}^{\phantom{{}}{\mathrm{\upsilon }}\phantom{{\mathrm{\beta }}{,}{\mathrm{\mu }}}}\right)$ (12)

Check the value of $\mathrm{R__α,β,μ,ν}$, say for $\mathrm{\alpha }=1$, $\mathrm{\beta }$ = 2, $\mathrm{\mu }$ = 2, $\mathrm{\nu }$ = 4

 > $\mathrm{Riemann}\left[1,2,2,4\right]$
 ${-}{2}{}{k}{}\left({r}{,}{t}\right){}{r}{}\left(\frac{{\partial }}{{\partial }{r}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{k}{}\left({r}{,}{t}\right)\right)$ (13)

Check now the value of ${R}_{\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }}^{\mathrm{\alpha }}$ , with the 1st index contravariant, for the same values of the indices (note you enter the value of the contravariant index prefixed by ~)

 > $\mathrm{Riemann}\left[\mathrm{~1},2,2,4\right]$
 ${2}{}{k}{}\left({r}{,}{t}\right){}{r}{}\stackrel{{\mathbf{.}}}{{k}}{}\left({r}{,}{t}\right)$ (14)

To compute with a representation for Riemann without actually performing the operation, use the inert form %Riemann. To afterwards perform the operation use value

 > $\mathrm{%Riemann}\left[\mathrm{~1},2,2,4\right]$
 ${{R}}_{\phantom{{}}\phantom{{1}}{2}{,}{2}{,}{4}}^{\phantom{{}}{1}\phantom{{2}{,}{2}{,}{4}}}$ (15)
 > $\mathrm{value}\left(\right)$
 ${2}{}{k}{}\left({r}{,}{t}\right){}{r}{}\stackrel{{\mathbf{.}}}{{k}}{}\left({r}{,}{t}\right)$ (16)

To have a more compact display in the following examples, suppress the display of the dependency of $k\left(r,t\right)$ and have the display of derivatives in jet notation, indexed (see Typesetting)

 > $\mathrm{Typesetting}:-\mathrm{Suppress}\left(k\left(r,t\right)\right):$
 > $\mathrm{Typesetting}:-\mathrm{Settings}\left(\mathrm{userep}=\mathrm{true}\right):$

The nonzero values of $\mathrm{R__α,β,μ,ν}$ and of ${R}_{\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }}^{\mathrm{\alpha }}$ (note you enter the character of the contravariant indices prefixed by ~)

 > $\mathrm{Riemann}\left[\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu },\mathrm{nonzero}\right]$
 ${{R}}_{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}{=}\left\{\left({1}{,}{2}{,}{2}{,}{4}\right){=}{-}{2}{}{k}{}{r}{}\left({{k}}_{{r}}\right){,}\left({1}{,}{2}{,}{4}{,}{2}\right){=}{2}{}{k}{}{r}{}\left({{k}}_{{r}}\right){,}\left({1}{,}{3}{,}{3}{,}{4}\right){=}{-}{2}{}{k}{}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}\left({{k}}_{{r}}\right){,}\left({1}{,}{3}{,}{4}{,}{3}\right){=}{2}{}{k}{}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}\left({{k}}_{{r}}\right){,}\left({1}{,}{4}{,}{1}{,}{4}\right){=}{2}{}{\left({{k}}_{{r}}\right)}^{{2}}{+}{2}{}{k}{}\left({{k}}_{{r}{,}{r}}\right){,}\left({1}{,}{4}{,}{4}{,}{1}\right){=}{-}{2}{}{\left({{k}}_{{r}}\right)}^{{2}}{-}{2}{}{k}{}\left({{k}}_{{r}{,}{r}}\right){,}\left({2}{,}{1}{,}{2}{,}{4}\right){=}{2}{}{k}{}{r}{}\left({{k}}_{{r}}\right){,}\left({2}{,}{1}{,}{4}{,}{2}\right){=}{-}{2}{}{k}{}{r}{}\left({{k}}_{{r}}\right){,}\left({2}{,}{3}{,}{2}{,}{3}\right){=}{-}\left({-}{1}{+}{2}{}{{k}}^{{2}}\right){}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}{{r}}^{{2}}{,}\left({2}{,}{3}{,}{3}{,}{2}\right){=}\left({-}{1}{+}{2}{}{{k}}^{{2}}\right){}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}{{r}}^{{2}}{,}\left({2}{,}{4}{,}{1}{,}{2}\right){=}{-}{2}{}{k}{}{r}{}\left({{k}}_{{r}}\right){,}\left({2}{,}{4}{,}{2}{,}{1}\right){=}{2}{}{k}{}{r}{}\left({{k}}_{{r}}\right){,}\left({2}{,}{4}{,}{2}{,}{4}\right){=}{2}{}{k}{}\left({2}{}{{k}}^{{2}}{}\left({{k}}_{{r}}\right){+}\stackrel{{\mathbf{.}}}{{k}}\right){}{r}{,}\left({2}{,}{4}{,}{4}{,}{2}\right){=}{-}{2}{}{k}{}\left({2}{}{{k}}^{{2}}{}\left({{k}}_{{r}}\right){+}\stackrel{{\mathbf{.}}}{{k}}\right){}{r}{,}\left({3}{,}{1}{,}{3}{,}{4}\right){=}{2}{}{k}{}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}\left({{k}}_{{r}}\right){,}\left({3}{,}{1}{,}{4}{,}{3}\right){=}{-}{2}{}{k}{}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}\left({{k}}_{{r}}\right){,}\left({3}{,}{2}{,}{2}{,}{3}\right){=}\left({-}{1}{+}{2}{}{{k}}^{{2}}\right){}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}{{r}}^{{2}}{,}\left({3}{,}{2}{,}{3}{,}{2}\right){=}{-}\left({-}{1}{+}{2}{}{{k}}^{{2}}\right){}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}{{r}}^{{2}}{,}\left({3}{,}{4}{,}{1}{,}{3}\right){=}{-}{2}{}{k}{}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}\left({{k}}_{{r}}\right){,}\left({3}{,}{4}{,}{3}{,}{1}\right){=}{2}{}{k}{}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}\left({{k}}_{{r}}\right){,}\left({3}{,}{4}{,}{3}{,}{4}\right){=}{2}{}{k}{}\left({2}{}{{k}}^{{2}}{}\left({{k}}_{{r}}\right){+}\stackrel{{\mathbf{.}}}{{k}}\right){}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{,}\left({3}{,}{4}{,}{4}{,}{3}\right){=}{-}{2}{}{k}{}\left({2}{}{{k}}^{{2}}{}\left({{k}}_{{r}}\right){+}\stackrel{{\mathbf{.}}}{{k}}\right){}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{,}\left({4}{,}{1}{,}{1}{,}{4}\right){=}{-}{2}{}{\left({{k}}_{{r}}\right)}^{{2}}{-}{2}{}{k}{}\left({{k}}_{{r}{,}{r}}\right){,}\left({4}{,}{1}{,}{4}{,}{1}\right){=}{2}{}{\left({{k}}_{{r}}\right)}^{{2}}{+}{2}{}{k}{}\left({{k}}_{{r}{,}{r}}\right){,}\left({4}{,}{2}{,}{1}{,}{2}\right){=}{2}{}{k}{}{r}{}\left({{k}}_{{r}}\right){,}\left({4}{,}{2}{,}{2}{,}{1}\right){=}{-}{2}{}{k}{}{r}{}\left({{k}}_{{r}}\right){,}\left({4}{,}{2}{,}{2}{,}{4}\right){=}{-}{2}{}{k}{}\left({2}{}{{k}}^{{2}}{}\left({{k}}_{{r}}\right){+}\stackrel{{\mathbf{.}}}{{k}}\right){}{r}{,}\left({4}{,}{2}{,}{4}{,}{2}\right){=}{2}{}{k}{}\left({2}{}{{k}}^{{2}}{}\left({{k}}_{{r}}\right){+}\stackrel{{\mathbf{.}}}{{k}}\right){}{r}{,}\left({4}{,}{3}{,}{1}{,}{3}\right){=}{2}{}{k}{}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}\left({{k}}_{{r}}\right){,}\left({4}{,}{3}{,}{3}{,}{1}\right){=}{-}{2}{}{k}{}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}\left({{k}}_{{r}}\right){,}\left({4}{,}{3}{,}{3}{,}{4}\right){=}{-}{2}{}{k}{}\left({2}{}{{k}}^{{2}}{}\left({{k}}_{{r}}\right){+}\stackrel{{\mathbf{.}}}{{k}}\right){}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{,}\left({4}{,}{3}{,}{4}{,}{3}\right){=}{2}{}{k}{}\left({2}{}{{k}}^{{2}}{}\left({{k}}_{{r}}\right){+}\stackrel{{\mathbf{.}}}{{k}}\right){}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}\right\}$ (17)
 > $\mathrm{Riemann}\left[\mathrm{~alpha},\mathrm{\beta },\mathrm{\mu },\mathrm{\nu },\mathrm{nonzero}\right]$
 ${{R}}_{\phantom{{}}\phantom{{\mathrm{\alpha }}}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}^{\phantom{{}}{\mathrm{\alpha }}\phantom{{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}}{=}\left\{\left({1}{,}{1}{,}{1}{,}{4}\right){=}{2}{}{\left({{k}}_{{r}}\right)}^{{2}}{+}{2}{}{k}{}\left({{k}}_{{r}{,}{r}}\right){,}\left({1}{,}{1}{,}{4}{,}{1}\right){=}{-}{2}{}{\left({{k}}_{{r}}\right)}^{{2}}{-}{2}{}{k}{}\left({{k}}_{{r}{,}{r}}\right){,}\left({1}{,}{2}{,}{1}{,}{2}\right){=}{-}{2}{}{k}{}{r}{}\left({{k}}_{{r}}\right){,}\left({1}{,}{2}{,}{2}{,}{1}\right){=}{2}{}{k}{}{r}{}\left({{k}}_{{r}}\right){,}\left({1}{,}{2}{,}{2}{,}{4}\right){=}{2}{}{k}{}{r}{}\stackrel{{\mathbf{.}}}{{k}}{,}\left({1}{,}{2}{,}{4}{,}{2}\right){=}{-}{2}{}{k}{}{r}{}\stackrel{{\mathbf{.}}}{{k}}{,}\left({1}{,}{3}{,}{1}{,}{3}\right){=}{-}{2}{}{k}{}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}\left({{k}}_{{r}}\right){,}\left({1}{,}{3}{,}{3}{,}{1}\right){=}{2}{}{k}{}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}\left({{k}}_{{r}}\right){,}\left({1}{,}{3}{,}{3}{,}{4}\right){=}{2}{}{k}{}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}\stackrel{{\mathbf{.}}}{{k}}{,}\left({1}{,}{3}{,}{4}{,}{3}\right){=}{-}{2}{}{k}{}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}\stackrel{{\mathbf{.}}}{{k}}{,}\left({1}{,}{4}{,}{1}{,}{4}\right){=}{4}{}{{k}}^{{2}}{}\left({\left({{k}}_{{r}}\right)}^{{2}}{+}{k}{}\left({{k}}_{{r}{,}{r}}\right)\right){,}\left({1}{,}{4}{,}{4}{,}{1}\right){=}{-}{4}{}{{k}}^{{2}}{}\left({\left({{k}}_{{r}}\right)}^{{2}}{+}{k}{}\left({{k}}_{{r}{,}{r}}\right)\right){,}\left({2}{,}{1}{,}{2}{,}{4}\right){=}\frac{{2}{}{k}{}\left({{k}}_{{r}}\right)}{{r}}{,}\left({2}{,}{1}{,}{4}{,}{2}\right){=}{-}\frac{{2}{}{k}{}\left({{k}}_{{r}}\right)}{{r}}{,}\left({2}{,}{3}{,}{2}{,}{3}\right){=}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}\left({1}{-}{2}{}{{k}}^{{2}}\right){,}\left({2}{,}{3}{,}{3}{,}{2}\right){=}\left({-}{1}{+}{2}{}{{k}}^{{2}}\right){}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{,}\left({2}{,}{4}{,}{1}{,}{2}\right){=}{-}\frac{{2}{}{k}{}\left({{k}}_{{r}}\right)}{{r}}{,}\left({2}{,}{4}{,}{2}{,}{1}\right){=}\frac{{2}{}{k}{}\left({{k}}_{{r}}\right)}{{r}}{,}\left({2}{,}{4}{,}{2}{,}{4}\right){=}\frac{{2}{}{k}{}\left({2}{}{{k}}^{{2}}{}\left({{k}}_{{r}}\right){+}\stackrel{{\mathbf{.}}}{{k}}\right)}{{r}}{,}\left({2}{,}{4}{,}{4}{,}{2}\right){=}{-}\frac{{2}{}{k}{}\left({2}{}{{k}}^{{2}}{}\left({{k}}_{{r}}\right){+}\stackrel{{\mathbf{.}}}{{k}}\right)}{{r}}{,}\left({3}{,}{1}{,}{3}{,}{4}\right){=}\frac{{2}{}{k}{}\left({{k}}_{{r}}\right)}{{r}}{,}\left({3}{,}{1}{,}{4}{,}{3}\right){=}{-}\frac{{2}{}{k}{}\left({{k}}_{{r}}\right)}{{r}}{,}\left({3}{,}{2}{,}{2}{,}{3}\right){=}{-}{1}{+}{2}{}{{k}}^{{2}}{,}\left({3}{,}{2}{,}{3}{,}{2}\right){=}{1}{-}{2}{}{{k}}^{{2}}{,}\left({3}{,}{4}{,}{1}{,}{3}\right){=}{-}\frac{{2}{}{k}{}\left({{k}}_{{r}}\right)}{{r}}{,}\left({3}{,}{4}{,}{3}{,}{1}\right){=}\frac{{2}{}{k}{}\left({{k}}_{{r}}\right)}{{r}}{,}\left({3}{,}{4}{,}{3}{,}{4}\right){=}\frac{{2}{}{k}{}\left({2}{}{{k}}^{{2}}{}\left({{k}}_{{r}}\right){+}\stackrel{{\mathbf{.}}}{{k}}\right)}{{r}}{,}\left({3}{,}{4}{,}{4}{,}{3}\right){=}{-}\frac{{2}{}{k}{}\left({2}{}{{k}}^{{2}}{}\left({{k}}_{{r}}\right){+}\stackrel{{\mathbf{.}}}{{k}}\right)}{{r}}{,}\left({4}{,}{2}{,}{2}{,}{4}\right){=}{2}{}{k}{}{r}{}\left({{k}}_{{r}}\right){,}\left({4}{,}{2}{,}{4}{,}{2}\right){=}{-}{2}{}{k}{}{r}{}\left({{k}}_{{r}}\right){,}\left({4}{,}{3}{,}{3}{,}{4}\right){=}{2}{}{k}{}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}\left({{k}}_{{r}}\right){,}\left({4}{,}{3}{,}{4}{,}{3}\right){=}{-}{2}{}{k}{}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}\left({{k}}_{{r}}\right){,}\left({4}{,}{4}{,}{1}{,}{4}\right){=}{-}{2}{}{\left({{k}}_{{r}}\right)}^{{2}}{-}{2}{}{k}{}\left({{k}}_{{r}{,}{r}}\right){,}\left({4}{,}{4}{,}{4}{,}{1}\right){=}{2}{}{\left({{k}}_{{r}}\right)}^{{2}}{+}{2}{}{k}{}\left({{k}}_{{r}{,}{r}}\right)\right\}$ (18)

The Riemann scalars ${S}_{1},{S}_{2}$ (see the Description)

 > $\mathrm{Riemann}\left[\mathrm{scalars}\right]$
 ${{S}}_{{1}}{=}\frac{{\left({{k}}_{{r}{,}{r}}\right)}^{{2}}{}{{k}}^{{2}}{}{{r}}^{{4}}{+}{2}{}\left({{k}}_{{r}{,}{r}}\right){}{k}{}{\left({{k}}_{{r}}\right)}^{{2}}{}{{r}}^{{4}}{+}{\left({{k}}_{{r}}\right)}^{{4}}{}{{r}}^{{4}}{+}{4}{}{{k}}^{{2}}{}{\left({{k}}_{{r}}\right)}^{{2}}{}{{r}}^{{2}}{+}{\left({{k}}^{{2}}{-}\frac{{1}}{{2}}\right)}^{{2}}}{{3}{}{{r}}^{{4}}}{,}{{S}}_{{2}}{=}\frac{{2}{}\left({-}{\left({{k}}_{{r}{,}{r}}\right)}^{{3}}{}{{k}}^{{3}}{}{{r}}^{{6}}{-}{3}{}{\left({{k}}_{{r}{,}{r}}\right)}^{{2}}{}{{k}}^{{2}}{}{\left({{k}}_{{r}}\right)}^{{2}}{}{{r}}^{{6}}{-}{3}{}\left({{k}}_{{r}{,}{r}}\right){}{k}{}{\left({{k}}_{{r}}\right)}^{{4}}{}{{r}}^{{6}}{-}{\left({{k}}_{{r}}\right)}^{{6}}{}{{r}}^{{6}}{-}{4}{}{{k}}^{{3}}{}{\left({{k}}_{{r}}\right)}^{{3}}{}{{r}}^{{3}}{-}{\left({{k}}^{{2}}{-}\frac{{1}}{{2}}\right)}^{{3}}\right)}{{3}{}{{r}}^{{6}}}$ (19)

The 16 Riemann invariants presented in the paper by Carminati and McLenaghan (see the Description and the reference at the bottom)

 > $\mathrm{Riemann}\left[\mathrm{invariants}\right]$
 ${{r}}_{{0}}{=}\frac{{-}{4}{}\left({{k}}_{{r}{,}{r}}\right){}{k}{}{{r}}^{{2}}{-}{4}{}{\left({{k}}_{{r}}\right)}^{{2}}{}{{r}}^{{2}}{-}{16}{}{k}{}{r}{}\left({{k}}_{{r}}\right){-}{4}{}{{k}}^{{2}}{+}{2}}{{{r}}^{{2}}}{,}{{r}}_{{1}}{=}\frac{{\left({2}{}\left({{k}}_{{r}{,}{r}}\right){}{k}{}{{r}}^{{2}}{+}{2}{}{\left({{k}}_{{r}}\right)}^{{2}}{}{{r}}^{{2}}{-}{2}{}{{k}}^{{2}}{+}{1}\right)}^{{2}}}{{4}{}{{r}}^{{4}}}{,}{{r}}_{{2}}{=}{0}{,}{{r}}_{{3}}{=}\frac{{\left({2}{}\left({{k}}_{{r}{,}{r}}\right){}{k}{}{{r}}^{{2}}{+}{2}{}{\left({{k}}_{{r}}\right)}^{{2}}{}{{r}}^{{2}}{-}{2}{}{{k}}^{{2}}{+}{1}\right)}^{{4}}}{{64}{}{{r}}^{{8}}}{,}{{w}}_{{1}}{=}\frac{{\left({2}{}\left({{k}}_{{r}{,}{r}}\right){}{k}{}{{r}}^{{2}}{+}{2}{}{\left({{k}}_{{r}}\right)}^{{2}}{}{{r}}^{{2}}{-}{4}{}{k}{}{r}{}\left({{k}}_{{r}}\right){+}{2}{}{{k}}^{{2}}{-}{1}\right)}^{{2}}}{{6}{}{{r}}^{{4}}}{,}{{w}}_{{2}}{=}\frac{{\left({2}{}\left({{k}}_{{r}{,}{r}}\right){}{k}{}{{r}}^{{2}}{+}{2}{}{\left({{k}}_{{r}}\right)}^{{2}}{}{{r}}^{{2}}{-}{4}{}{k}{}{r}{}\left({{k}}_{{r}}\right){+}{2}{}{{k}}^{{2}}{-}{1}\right)}^{{3}}}{{36}{}{{r}}^{{6}}}{,}{{m}}_{{1}}{=}\frac{{2}{}\left({-}\frac{{1}}{{2}}{-}{2}{}{k}{}{r}{}\left({{k}}_{{r}}\right){+}\left({{k}}_{{r}{,}{r}}\right){}{k}{}{{r}}^{{2}}{+}{\left({{k}}_{{r}}\right)}^{{2}}{}{{r}}^{{2}}{+}{{k}}^{{2}}\right){}{\left(\left({{k}}_{{r}{,}{r}}\right){}{k}{}{{r}}^{{2}}{+}{\left({{k}}_{{r}}\right)}^{{2}}{}{{r}}^{{2}}{-}{{k}}^{{2}}{+}\frac{{1}}{{2}}\right)}^{{2}}}{{3}{}{{r}}^{{6}}}{,}{{m}}_{{2}}{=}\frac{{4}{}{\left({-}\frac{{1}}{{2}}{-}{2}{}{k}{}{r}{}\left({{k}}_{{r}}\right){+}\left({{k}}_{{r}{,}{r}}\right){}{k}{}{{r}}^{{2}}{+}{\left({{k}}_{{r}}\right)}^{{2}}{}{{r}}^{{2}}{+}{{k}}^{{2}}\right)}^{{2}}{}{\left(\left({{k}}_{{r}{,}{r}}\right){}{k}{}{{r}}^{{2}}{+}{\left({{k}}_{{r}}\right)}^{{2}}{}{{r}}^{{2}}{-}{{k}}^{{2}}{+}\frac{{1}}{{2}}\right)}^{{2}}}{{9}{}{{r}}^{{8}}}{,}{{m}}_{{3}}{=}\frac{{4}{}{\left({-}\frac{{1}}{{2}}{-}{2}{}{k}{}{r}{}\left({{k}}_{{r}}\right){+}\left({{k}}_{{r}{,}{r}}\right){}{k}{}{{r}}^{{2}}{+}{\left({{k}}_{{r}}\right)}^{{2}}{}{{r}}^{{2}}{+}{{k}}^{{2}}\right)}^{{2}}{}{\left(\left({{k}}_{{r}{,}{r}}\right){}{k}{}{{r}}^{{2}}{+}{\left({{k}}_{{r}}\right)}^{{2}}{}{{r}}^{{2}}{-}{{k}}^{{2}}{+}\frac{{1}}{{2}}\right)}^{{2}}}{{9}{}{{r}}^{{8}}}{,}{{m}}_{{4}}{=}{0}{,}{{m}}_{{5}}{=}\frac{{8}{}{\left({-}\frac{{1}}{{2}}{-}{2}{}{k}{}{r}{}\left({{k}}_{{r}}\right){+}\left({{k}}_{{r}{,}{r}}\right){}{k}{}{{r}}^{{2}}{+}{\left({{k}}_{{r}}\right)}^{{2}}{}{{r}}^{{2}}{+}{{k}}^{{2}}\right)}^{{3}}{}{\left(\left({{k}}_{{r}{,}{r}}\right){}{k}{}{{r}}^{{2}}{+}{\left({{k}}_{{r}}\right)}^{{2}}{}{{r}}^{{2}}{-}{{k}}^{{2}}{+}\frac{{1}}{{2}}\right)}^{{2}}}{{27}{}{{r}}^{{10}}}$ (20)

Compute now the Array form of $\mathrm{R__α,β,μ,ν}$

 > $\mathrm{Riemann}\left[\mathrm{\alpha },\mathrm{\beta },\mathrm{\mu },\mathrm{\nu },\mathrm{array}\right]$

As with all the general relativity tensors of the Physics package, you can obtain the same result for the all covariant case by entering the tensor without indices, as in Riemann[].

This is the array form of ${R}_{\mathrm{\beta },\mathrm{\mu },\mathrm{\nu }}^{\mathrm{\alpha }}$ (note you enter the character of the contravariant indices prefixed by ~)

 > $\mathrm{Riemann}\left[\mathrm{~alpha},\mathrm{\beta },\mathrm{\mu },\mathrm{\nu },\mathrm{array}\right]$

To use this array, because its components were computed already taking into account the (covariant/contravariant) character of its indices, you do not need to indicate furthermore that character. So for ${R}_{1}^{1}$ we have

 >
 > $R\left[1,2,2,4\right]$
 ${2}{}{k}{}{r}{}\stackrel{{\mathbf{.}}}{{k}}$ (21)

Compare with the output obtained entering Riemann[~1, 2, 2, 4] in eq (15)

 > $\mathrm{normal}\left(-\right)$
 ${0}$ (22)

The Ricci tensor is defined in terms of the Riemann tensor as ${R}_{\mathrm{\mu },\mathrm{\nu }}={R}_{\mathrm{\mu },\mathrm{\alpha },\mathrm{\nu }}^{\mathrm{\alpha }}$ You can see how the four Riemann matrices add to form the Ricci matrix; for this purpose give values to the 1st and 3rd indices and pass the extra keyword matrix (or array)

 > $\mathrm{Riemann}\left[\mathrm{~1},\mathrm{\beta },1,\mathrm{\nu },\mathrm{matrix}\right]$
 ${{R}}_{\phantom{{}}\phantom{{1}}{\mathrm{\beta }}{,}{1}{,}{\mathrm{\nu }}}^{\phantom{{}}{1}\phantom{{\mathrm{\beta }}{,}{1}{,}{\mathrm{\nu }}}}{=}\left[\begin{array}{cccc}{0}& {0}& {0}& {2}{}{\left({{k}}_{{r}}\right)}^{{2}}{+}{2}{}{k}{}\left({{k}}_{{r}{,}{r}}\right)\\ {0}& {-}{2}{}{k}{}{r}{}\left({{k}}_{{r}}\right)& {0}& {0}\\ {0}& {0}& {-}{2}{}{k}{}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}\left({{k}}_{{r}}\right)& {0}\\ {0}& {0}& {0}& {4}{}{{k}}^{{2}}{}\left({\left({{k}}_{{r}}\right)}^{{2}}{+}{k}{}\left({{k}}_{{r}{,}{r}}\right)\right)\end{array}\right]$ (23)
 > $\mathrm{Riemann}\left[\mathrm{~1},\mathrm{\beta },1,\mathrm{\nu },\mathrm{matrix}\right]+\mathrm{Riemann}\left[\mathrm{~2},\mathrm{\beta },2,\mathrm{\nu },\mathrm{matrix}\right]+\mathrm{Riemann}\left[\mathrm{~3},\mathrm{\beta },3,\mathrm{\nu },\mathrm{matrix}\right]+\mathrm{Riemann}\left[\mathrm{~4},\mathrm{\beta },4,\mathrm{\nu },\mathrm{matrix}\right]$
 ${{R}}_{\phantom{{}}\phantom{{1}}{\mathrm{\beta }}{,}{1}{,}{\mathrm{\nu }}}^{\phantom{{}}{1}\phantom{{\mathrm{\beta }}{,}{1}{,}{\mathrm{\nu }}}}{+}{{R}}_{\phantom{{}}\phantom{{2}}{\mathrm{\beta }}{,}{2}{,}{\mathrm{\nu }}}^{\phantom{{}}{2}\phantom{{\mathrm{\beta }}{,}{2}{,}{\mathrm{\nu }}}}{+}{{R}}_{\phantom{{}}\phantom{{3}}{\mathrm{\beta }}{,}{3}{,}{\mathrm{\nu }}}^{\phantom{{}}{3}\phantom{{\mathrm{\beta }}{,}{3}{,}{\mathrm{\nu }}}}{+}{{R}}_{\phantom{{}}\phantom{{4}}{\mathrm{\beta }}{,}{4}{,}{\mathrm{\nu }}}^{\phantom{{}}{4}\phantom{{\mathrm{\beta }}{,}{4}{,}{\mathrm{\nu }}}}{=}\left[\begin{array}{cccc}{0}& {0}& {0}& {2}{}{\left({{k}}_{{r}}\right)}^{{2}}{+}{2}{}{k}{}\left({{k}}_{{r}{,}{r}}\right){+}\frac{{4}{}{k}{}\left({{k}}_{{r}}\right)}{{r}}\\ {0}& {-}{4}{}{k}{}{r}{}\left({{k}}_{{r}}\right){-}{2}{}{{k}}^{{2}}{+}{1}& {0}& {0}\\ {0}& {0}& {-}{4}{}{k}{}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}\left({{k}}_{{r}}\right){+}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}\left({1}{-}{2}{}{{k}}^{{2}}\right)& {0}\\ {2}{}{\left({{k}}_{{r}}\right)}^{{2}}{+}{2}{}{k}{}\left({{k}}_{{r}{,}{r}}\right){+}\frac{{4}{}{k}{}\left({{k}}_{{r}}\right)}{{r}}& {0}& {0}& {4}{}{{k}}^{{2}}{}\left({\left({{k}}_{{r}}\right)}^{{2}}{+}{k}{}\left({{k}}_{{r}{,}{r}}\right)\right){+}\frac{{4}{}{k}{}\left({2}{}{{k}}^{{2}}{}\left({{k}}_{{r}}\right){+}\stackrel{{\mathbf{.}}}{{k}}\right)}{{r}}\end{array}\right]$ (24)

Compare with the Ricci matrix

 > $\mathrm{Ricci}\left[\mathrm{\beta },\mathrm{\nu },\mathrm{matrix}\right]$
 ${{R}}_{{\mathrm{\beta }}{,}{\mathrm{\nu }}}{=}\left[\begin{array}{cccc}{0}& {0}& {0}& \frac{{2}{}{k}{}\left({{k}}_{{r}{,}{r}}\right){}{r}{+}{2}{}{\left({{k}}_{{r}}\right)}^{{2}}{}{r}{+}{4}{}{k}{}\left({{k}}_{{r}}\right)}{{r}}\\ {0}& {-}{4}{}{k}{}{r}{}\left({{k}}_{{r}}\right){-}{2}{}{{k}}^{{2}}{+}{1}& {0}& {0}\\ {0}& {0}& \left({-}{4}{}{k}{}{r}{}\left({{k}}_{{r}}\right){-}{2}{}{{k}}^{{2}}{+}{1}\right){}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}& {0}\\ \frac{{2}{}{k}{}\left({{k}}_{{r}{,}{r}}\right){}{r}{+}{2}{}{\left({{k}}_{{r}}\right)}^{{2}}{}{r}{+}{4}{}{k}{}\left({{k}}_{{r}}\right)}{{r}}& {0}& {0}& \frac{{4}{}{k}{}\left({{k}}^{{2}}{}\left({{k}}_{{r}{,}{r}}\right){}{r}{+}{k}{}{\left({{k}}_{{r}}\right)}^{{2}}{}{r}{+}{2}{}{{k}}^{{2}}{}\left({{k}}_{{r}}\right){+}\stackrel{{\mathbf{.}}}{{k}}\right)}{{r}}\end{array}\right]$ (25)

Upon simplification these matrices are the same

 > $\mathrm{simplify}\left(-\right)$
 ${{R}}_{\phantom{{}}\phantom{{1}}{\mathrm{\beta }}{,}{1}{,}{\mathrm{\nu }}}^{\phantom{{}}{1}\phantom{{\mathrm{\beta }}{,}{1}{,}{\mathrm{\nu }}}}{+}{{R}}_{\phantom{{}}\phantom{{2}}{\mathrm{\beta }}{,}{2}{,}{\mathrm{\nu }}}^{\phantom{{}}{2}\phantom{{\mathrm{\beta }}{,}{2}{,}{\mathrm{\nu }}}}{+}{{R}}_{\phantom{{}}\phantom{{3}}{\mathrm{\beta }}{,}{3}{,}{\mathrm{\nu }}}^{\phantom{{}}{3}\phantom{{\mathrm{\beta }}{,}{3}{,}{\mathrm{\nu }}}}{+}{{R}}_{\phantom{{}}\phantom{{4}}{\mathrm{\beta }}{,}{4}{,}{\mathrm{\nu }}}^{\phantom{{}}{4}\phantom{{\mathrm{\beta }}{,}{4}{,}{\mathrm{\nu }}}}{-}{{R}}_{{\mathrm{\beta }}{,}{\mathrm{\nu }}}{=}\left[\begin{array}{cccc}{0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {0}\end{array}\right]$ (26)

References

 Landau, L.D., and Lifshitz, E.M. The Classical Theory of Fields, Course of Theoretical Physics Volume 2, fourth revised English edition. Elsevier, 1975.
 Carminati, J., and McLenaghan, R. G., "Algebraic invariants of the Riemann tensor in a four-dimensional Lorentzian space", J.Math.Phys. 32 (11), November 1991.