axis and angle of rotation

edit: I have solved the problem of the sign ambiguity. see 28 Sept 2008.

I was going to call this “rotations 2”, but I decided to put the key computations in the name.

from rotation matrix to axis and angle of rotation

Having gotten the rotation (attitude) matrix for mars coordinates here, can we find its axis of rotation? (not of mars, of the attitude matrix!)

Sure, that’s just the eigenvector with eigenvalue 1!

Every 3D rotation has an eigenvalue of 1: there is a line in space which is left fixed under the rotation. Any vector on that line is an eigenvector. It has eigenvalue 1 because the line is not being stretched or compressed: nothing has been done to it. The other two eigenvalues are complex, and so are their eigenvectors, because there are no other subspaces which are left fixed by the rotation.

When I ask Mathematica® to find the eigenvalues and eigenvectors of the mars rotation matrix, the eigenvector with eigenvalue 1 is:

\left(\begin{array}{lll} -0.0361149 & -0.0667194 & 0.997118\end{array}\right)

That’s very nearly the z-axis, as it should be.

There’s just one little problem. The negative of that eigenvector – the negative z-axis – is every bit as good an answer. Any multiple of it is every bit as good an answer. We know the rotation axis, but we don’t know the direction of it. What we really know is the line in space which is left fixed by the rotation.
Read the rest of this entry »