Solution (source code)

= Solution

Preserving Cartesian lengths and <Euclidean inner products> requires an <orthogonal matrix>:
$$
\boxed{M^TM=MM^T=I,\qquad M_{ik}M_{jk}=\delta_{ij}.}
$$
Its determinant is $\pm1$. Relative to an originally right-handed frame, $\det M=+1$ gives a right-handed frame and $\det M=-1$ a left-handed frame. More generally, this sign determines whether the two frames have the same or opposite orientation.

The <tensor component transformation law> is
$$
\boxed{T'_{ij}=M_{ik}M_{j\ell}T_{k\ell},\qquad T'=MTM^T.}
$$
For a <tensor field>, the components are compared at the same physical point, whose coordinates satisfy $x=M^Tx'$.