How to calculate matrix rotation

1.9k Views Asked by At

Given the following rotation matrix

$$\left[ \begin{matrix} -1/3 & 2/3 & -2/3 \\ 2/3 & -1/3 & -2/3 \\ -2/3 & -2/3 & -1/3 \\ \end{matrix} \right]$$

what is the corresponding axis-angle representation assuming the angle is restricted to [0, $\pi$]?

How can I solve this question without MatLab and using MatLab?

2

There are 2 best solutions below

4
On BEST ANSWER

Trick: if an orthogonal matrix represent a rotation around some axis with amplitude $\theta$, such a matrix is similar to $$\begin{pmatrix}\cos \theta & -\sin\theta & 0 \\ \sin\theta & \cos\theta & 0 \\ 0 & 0 & 1 \end{pmatrix}$$ but the trace of a matrix is left unchanged by matrix conjugation, hence in your case $$1+2\cos\theta = -\frac{1}{3}-\frac{1}{3}-\frac{1}{3} = -1 $$ gives $\theta=\pm\pi$. A second trick is to notice that your matrix is both orthogonal and symmetric, so its eigenvalues belong to $\{-1,1\}$. The trace is $-1$, hence the spectrum is $\{-1,-1,1\}$. The rotation axis is given by the eigenvector associated with the eigenvalue $\lambda=1$, hence it is given by $(-1,-1,1)$.

0
On

Here's an alternative, without making use of similarity, eigenvalues, or eigenvectors.

If we pick a point $\mathbf x$ on the axis, its image must be the same point on the axis. So we can find the axis by solving $A\mathbf x=\mathbf x$, where $A$ is the given matrix. Solving it we'll find $(-1,-1,1)$ or some multiple thereof.

Once we have the axis, we can pick a vector $\mathbf y$ perpendicular to it, e.g. $(1,-1,0)$, and calculate its image. The angle between $\mathbf y$ and $A\mathbf y$ is the rotation angle. More specifically, their dot product is $\mathbf y\cdot A\mathbf y = \|\mathbf y\|^2 \cos \theta$, from which we can solve $\theta$. If we do, we'll find $\theta=\pi$.