Let's consider an arbitrary scalar field. If I act twice on the scalar field with a gradient operator, I will obtain second-order tensor. If I will take a trace of this tensor, I will obtain another scalar field. Is the resulting scalar field invariant under coordinate transformation? For example, if I will do the same operation in spherical coordinates, do I obtain the same result?
Yes! The trace of a tensor is one of its invarients, so the trace will remain constant no matter which coordinate representation you use.
Here's a proof from the mathematics stack exchange that the characteristic polynomial of a matrix is independent from your choice of basis.
Hope this helps.