Suppose we are given a rotation matrix, i.e. an orthogonal $3 \times 3$ matrix $\mathbf{A} = (a_{ij})$ with $\det \mathbf{A} = 1$. Then the mapping $\mathbf{x} \mapsto \mathbf{A}\mathbf{x}$ will rotate points of $\mathbb{R}^3$ around some axis through the origin. I have some old notes (which I wrote decades ago) that say that the axis of rotation can be obtained in several ways:
- As an eigenvector of $\mathbf{A}$ corresponding to the eigenvalue $1$.
- As the vector $(a_{32} – a_{23}, \; a_{13} – a_{31}, \; a_{21} – a_{12})$
- As any row of the matrix $\mathbf{A} + \mathbf{A}^T + [1 – \text{trace}(\mathbf{A})]\mathbf{I}$.
- As any row of the matrix $\text{adj}\,(\mathbf{A} – \mathbf{I})$. The rows of this matrix are all scalar multiples of one another, so it doesn't matter which row we use.
- As the cross product of the first two columns of the matrix $\mathbf{A} – \mathbf{I}$. This will actually be the third row of $\text{adj}\,(\mathbf{A} – \mathbf{I})$.
I want to confirm all of these statements. Clearly #1 is obvious, and #2 is well-known, but I'm having trouble with the other three. It's possible that they're not even true. Can someone elucidate, please. In your answer, it's OK to assume that #1 and #2 are already known.
Also, any thoughts on which calculations are most stable, numerically?
Best Answer
I will try to answer the question with a use of Rodrigues formula.
Introduction
I denote $A$ as $R(v,\theta)$ and your formulas as #2, #3, #4, #5. (#1 is the most general case but not considered below)
Rotation matrix can be decomposed into symmetric and skew-symmetric part i.e. $R=\dfrac{R+R^T}{2} +\dfrac{ R-R^T}{2}=(I+(1-\cos(\theta))S^2(v)) \ + \ \sin(\theta)S(v)$
After this introduction let's go to your formulas.
2
From the skew-symmetric part we can directly obtain formula #2, but as we see it is a restriction here: formula is valid only for $sin(\theta)\neq{0}$, for $\theta = \pi$ can't be used, in this case symmetric part of Rodrigues formula has to be used in order to calculate axis.
3
From symmetric part of $R$ we can obtain $tr(R)= 1+2\cos(\theta)$ so the formula #3 has a form $R+R^T+(1-trace(R))I=2I+2I(1-\cos\theta)s^2(v)+(1-1-2cos\theta)I=2I(1-\cos\theta)+2I(1-\cos\theta)S^2(v)=2 (1-\cos\theta)(S^2(v)+I)=2 (1-\cos\theta)vv^T $ what is clearly what needed. We see that the matrix is symmetric so we can take both rows or columns for calculations.
4
because in this case $\text{adj}(R-I)(R-I)=0$ so $\text{adj}(R-I)((1-\cos(\theta))S^2(v))+\sin(\theta)S(v))=0$ what gives orthogonality of rows to the plane of $S(v)$ (assuming rows are non-zero vectors, for some cases two rows might be zero vectors)
5
as columns of $R-I$ are vectors lying in the plane of $S(v)$ so their cross product (if non-zero) must be orthogonal to it.