Example 1.
In this example we calculate the trace-free Ricci tensor for a metric.
Calculate the trace-free Ricci tensor for the metric directly.
We check that is trace-free by computing the inverse metric and using the ContractIndices command.
The same calculation can be done with the TensorInnerProduct command.
Example 2.
The third calling sequence can be applied to any rank 2 symmetric tensor to construct a trace-free, rank 2 symmetric tensor.
The tensor is already trace-free, so its trace-free part is itself.
The trace-free part of the metric itself is always 0.
The trace-free part of is