# Angular momentum operator transformation under rotation

The generators of rotations $$J_i$$ under rotation transform as $$J_i'=R_{ij}J_j\,.$$

Now $$J^2=J_1J_1+J_2J_2+J_3J_3$$ trasform as

\begin{aligned} J'^2&=RJ^2R^{-1}=RJ_1R^{-1}RJ_1R^{-1}+RJ_2R^{-1}RJ_2R^{-1}+RJ_3R^{-1}RJ_3R^{-1}\\&=R_{1j}R_{1k}J_kJ_j+R_{2j}R_{2k}J_kJ_j+R_{3j}R_{3k}J_kJ_j\,. \end{aligned}

Now $$J^2$$ is a scalar so it should not transform like this.

What am I doing wrong here?

$$R$$, being a rotation, is orthogonal $$R_{1k}R_{1j} + R_{2k}R_{2j}+R_{3k}R_{3j} = \sum_{i=1}^3 R_{ik}R_{ij} = (R^T R)_{kj} = \delta_{ij}\,.$$ Then $$J_k J_j \delta_{kl} = J^2\,.$$