Equivalent of cosine law to find moment of inertia Similar to how the perpendicular axis theorem is analogous to the Pythagoras' theorem I wanted to find an expression analogous to the cosine law to find the moment of inertia. In other words given two axis $L_1$ and $L_2$ (Slope of the angle between them $= m$) and the moment of inertia of a body with respect to these axis is $I_1$ and $I_2$ respectively. We have to find the moment of inertia with respect to an axis perpendicular to to these axis in terms of the given quantities. I got this expression
$$ \frac 1 {m^2} \left( (I_1+I_2)(1+m^2) + \sqrt{I_1I_2(1+m^2)} \,\right).  $$
Can someone please check this because I am getting wrong answers using this expression.
 A: 
You have the line $L_1$ with the inertia tensor $T_{L1}$
$$T_{L1}=\left[ \begin {array}{ccc} { I_1}&0&0\\ 0&0&0
\\0&0&0\end {array} \right] 
$$
and the line $L_2$  with the inertia tensor $T_{L2}$
$$T_{L2}=\left[ \begin {array}{ccc} { I_2}&0&0\\ 0&0&0
\\0&0&0\end {array} \right] 
$$
to obtain the inertia tensor in $x~,y~,z$ perpendicular local system ,you have to transform the inertia tensor $T_{L2}$ with the transformation matrix R (which is a rotation about the z axis with the angle $\alpha$).
thus:
$$T_{xyz}=T_{L1}+R\,T_{L2}\,R^T$$
with
$$R=\left[ \begin {array}{ccc} \cos \left( \alpha \right) &-\sin \left( 
\alpha \right) &0\\ \sin \left( \alpha \right) &\cos
 \left( \alpha \right) &0\\ 0&0&1\end {array}
 \right] 
$$
$$T_{xyz}=\left[ \begin {array}{ccc} I_{{1}}+ \left( \cos \left( \alpha
 \right)  \right) ^{2}I_{{2}}&\cos \left( \alpha \right) I_{{2}}\sin
 \left( \alpha \right) &0\\\cos \left( \alpha
 \right) I_{{2}}\sin \left( \alpha \right) & \left( \sin \left( \alpha
 \right)  \right) ^{2}I_{{2}}&0\\ 0&0&0\end {array}
 \right] 
$$
