Solution (source code)

= Solution

\b[True.] In all four tests, an array is understood to have components specified in each rotated <orthonormal basis>; being a scalar means that the contraction is invariant under those changes. Write the <Frobenius inner product> as $A:B=\sum_{ij}A_{ij}B_{ij}$. Every test <Cartesian second-rank tensor> obeys $B'=RBR^T$. The assumption says
$$
A':(RBR^T)=A:B\quad\text{for every }B,
\quad\text{hence}\quad (R^TA'R-A):B=0\quad\text{for every }B.
$$
Choosing the elementary matrices as $B$, or choosing $B=R^TA'R-A$, gives $R^TA'R=A$. Therefore
$$
\boxed{A'=RAR^T,}
$$
which is the required <Cartesian second-rank tensor> transformation law. This is the <scalar contraction test for a Cartesian tensor>.