First example: just pay attention to the red curved arrow
https://en.wikipedia.org/wiki/Moment_of_inertia#/media/File:Moment_of_inertia_rod_center.svg
Second example:
pay attention on the curved arrow above theta
First example: just pay attention to the red curved arrow
https://en.wikipedia.org/wiki/Moment_of_inertia#/media/File:Moment_of_inertia_rod_center.svg
Second example: