# Is an inertia tensor in local-space always diagonal?

I'm looking at the implementation of a physics engine and I observe that the inertia tensor of a rigid body, in local-space coordinates, is stored as a 3 dimensional vector, rather than a 3x3 matrix, and the description says "A vector with the three values of the diagonal 3x3 matrix".

A diagonal matrix is one with all zero off-diagonal entries.

What I don't understand is why the inertia tensor in local coordinates would be diagonal? Why couldn't it have non-zero off-diagonal entries?

• github.com/DanielChappuis/reactphysics3d/issues/191 Feb 8, 2021 at 8:40
• Is there some method to get the principle axes of inertia? Basically these are the three eigenvectors you get when diagonalizing the inertia tensor (with SVD or some decomposition).
– Emil
Feb 9, 2021 at 7:05
• @Emil: No, I was wondering that too. It looks like the library approximates a body with a potentially non-diagonal inertia tensor by generating a diagonal inertia tensor (say based on its AABB). It doesn't rotate the body to its principle axes of inertia or anything like that. Feb 10, 2021 at 4:08
• The author of the library gave a good explanation, see the github link above. Feb 10, 2021 at 4:47