Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have a set of weighted points in 3D space (in fact, a molecule) and I'm trying to align the principal axes of this set with the $x$, and $y$ and $z$ axes. To do so, I've first translated my points so their barycenter coincides with the origin. Then, I've calculated the moment of inertia tensor $I$ and its eigenvalues ($\lambda_i$) and eigenvectors ($V_i$).

Then, I need to build the rotation matrix associated with the rotation bringing my vectors $V_i$ onto $(x,y,z)$. I assumed that would be the inverse of the matrix formed by the vectors $V_i$ in columns, but it is not. So, how would you write this matrix from what I have already calculated?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

We have $I V_i = \lambda_i V_i$, where $\lambda_i$ is real. Let $M$ be the matrix whose columns are the normalized eigenvectors of $I$. Then $M$ is orthogonal, $M^T M = M M^T = \mathbb{I}$. Thus, $M^T I M = D = \mathrm{diag}(\lambda_1,\lambda_2,\lambda_3)$ and $M^T M_i = e_i$. Notice that the last equation implies, for example, that $M^T M_1 = e_1 = (1\ 0\ 0)^T$. That is, the transpose of $M$ brings the principal axes to the Cartesian axes.

The simplest way to remember how the various objects transform is to look at the kinetic energy, for example, $$\begin{eqnarray*} \frac{1}{2}\omega^T I \omega &=& \frac{1}{2}\underbrace{\omega^T M}_{\xi^T} \underbrace{M^T I M}_D \underbrace{M^T \omega}_\xi \\ &=& \frac{1}{2} \sum_{i=1}^3 \lambda_i\xi_i^2, \end{eqnarray*}$$ where $\omega$ is the angular velocity in the original frame and $\xi$ is the angular velocity with respect to the principal axes.

If you are using Mathematica, note that the rows of the matrix it spits out are the unnormalized eigenvectors. In another computing environment the convention may be something else, so be careful. Without more information it is impossible to tell where this goes wrong for you.

share|improve this answer
    
I don't understand… Are you saying M is the rotation matrix bringing the principal axes to the cartesian axes? Because it doesn't work… and I've tried more than once! PS: My eigenvectors are already normalized. PPS: I don't know what you define as $\omega$ or $\xi$ or $D$ –  F'x May 14 '12 at 20:59
    
@F'x: I added some clarification. If this doesn't help I'll need to see your code or computations to go further. –  user26872 May 14 '12 at 22:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.