Solution (source code)

= Solution

A <Cartesian second-rank tensor> has components in every orthonormal Cartesian frame that transform according to
$$
A'_{ij}=Q_{ip}Q_{jq}A_{pq},\qquad A'=QAQ^T,
$$
when vector components transform as $x'=Qx$ for an <orthogonal matrix> $Q$. Repeated indices are summed. If $A=B$ in one frame, their transformed difference is $Q(A-B)Q^T=0$, so their equality holds in every such frame, at the same physical point.

Now impose the scalar contraction hypothesis on $C$. For every tensor $A$, invariance in the two frames says
$$
C'_{ij}Q_{ip}Q_{jq}A_{pq}=C_{pq}A_{pq}.
$$
At a fixed point, choose the components of $A$ to be each matrix unit in turn; each is an admissible tensor once its components in other frames are transformed. Thus every coefficient of $A_{pq}$ agrees, yielding $Q^TC'Q=C$, or
$$
\boxed{C'=QCQ^T.}
$$
Therefore \b[$C$ is necessarily a Cartesian second-rank tensor]. This is the <scalar contraction test for a Cartesian tensor>. Testing all tensors, rather than only symmetric tensors, is essential to the proof.