Solution (source code)

= Solution

Let $R$ be an orthogonal change of axes. Since $A$ is a second-order <tensor>, $A'_{ij}=R_{ik}R_{j\ell}A_{k\ell}$. The scalar-contraction assumption gives
$$
C'_{ij}R_{ik}R_{j\ell}A_{k\ell}=C_{k\ell}A_{k\ell}
$$
for every tensor $A$. In one fixed frame its components can be any array: in particular, choose one component at a time to be one, all others zero. Equality of the coefficients then forces
$$
C'_{ij}R_{ik}R_{j\ell}=C_{k\ell},\qquad R^TC'R=C.
$$
Multiplying by $R$ and $R^T$ yields
$$
\boxed{C'=RCR^T,\qquad C'_{ij}=R_{ik}R_{j\ell}C_{k\ell}.}
$$
This is exactly the <tensor component transformation law>. It is the full-contraction version of the <quotient theorem for Cartesian tensors>. The words “for every” are essential: testing a single $A$, such as the zero tensor or the identity, would not determine all components.