Kretschmann scalar
In the theory of Lorentzian manifolds, particularly in the context of applications to general relativity, the Kretschmann scalar is a quadratic scalar invariant. It was introduced by Erich Kretschmann. Definition
The Kretschmann invariant is

where  is the Riemann curvature tensor (in this equation the Einstein summation convention was used, and it will be used throughout the article). Because it is a sum of squares of tensor components, this is a quadratic invariant. For the use of a computer algebra system a more detailed writing is meaningful:

Examples
For a Schwarzschild black hole of mass , the Kretschmann scalar is

where  is the gravitational constant. For a general FRW spacetime with metric 

the Kretschmann scalar is

Relation to other invariants
Another possible invariant (which has been employed for example in writing the gravitational term of the Lagrangian for some higher-order gravity theories) is

where  is the Weyl tensor, the conformal curvature tensor which is also the completely traceless part of the Riemann tensor. In  dimensions this is related to the Kretschmann invariant by

where  is the Ricci curvature tensor and  is the Ricci scalar curvature (obtained by taking successive traces of the Riemann tensor). The Ricci tensor vanishes in vacuum spacetimes (such as the Schwarzschild solution mentioned above), and hence there the Riemann tensor and the Weyl tensor coincide, as do their invariants. Gauge theory invariants
The Kretschmann scalar and the Chern-Pontryagin scalar

where  is the left dual of the Riemann tensor, are mathematically analogous (to some extent, physically analogous) to the familiar invariants of the electromagnetic field tensor

Generalising from the  gauge theory of electromagnetism to general non-abelian gauge theory, the first of these invariants is 
,
an expression proportional to the Yang–Mills Lagrangian. Here  is the curvature of a covariant derivative, and  is a trace form. The Kretschmann scalar arises from taking the connection to be on the frame bundle. See also
Carminati-McLenaghan invariants, for a set of invariants
Classification of electromagnetic fields, for more about the invariants of the electromagnetic field tensor
Curvature invariant, for curvature invariants in Riemannian and pseudo-Riemannian geometry in general
Curvature invariant (general relativity)
Ricci decomposition, for more about the Riemann and Weyl tensor

References

Further reading

Riemannian geometry
Lorentzian manifolds
Tensors in general relativity