# Find the rotation axis and angle of a matrix

$$A=\frac{1}{9} \begin{pmatrix} -7 & 4 & 4\\ 4 & -1 & 8\\ 4 & 8 & -1 \end{pmatrix}$$

How do I prove that A is a rotation ? How do I find the rotation axis and the rotation angle ?

-
As a start, find the eigenvector with eigenvalue 1. –  i. m. soloveichik Dec 18 '12 at 18:41
Can I prove that this is a rotation, because $det(A)=1$ ? –  Kasper Dec 18 '12 at 19:24
No. Lots of matrices have $\det A = 1$ without being rotations. See the answers below. Basically you need to check $A^T A = I$. –  copper.hat Dec 18 '12 at 19:27

## 5 Answers

You have $A^T A = I$. Hence $A$ is a rotation. Since $\det A = 1$, it is proper.

By inspection, $A \begin{bmatrix} 1 \\ 2 \\ 2\end{bmatrix} = \begin{bmatrix} 1 \\ 2 \\2\end{bmatrix}$, which gives the axis of rotation.

Inspection also shows that $\begin{bmatrix} 2 \\ -1 \\ 0 \end{bmatrix}$ and $\begin{bmatrix} 2 \\ 4 \\ -5 \end{bmatrix}$ are orthogonal eigenvectors corresponding to the (repeated) eigenvalue $-1$. Hence we see that the rotation angle is $\pi$.

Explicitly, if we let $R = \begin{bmatrix} 1 & 2 & 2 \\ 2 & -1 & 4 \\ 2 & 0 & -5 \end{bmatrix}$, then $R^{-1} = \frac{1}{405} \begin{bmatrix} 45 & 90 & 90 \\ 162 & -81 & 0 \\ 18 & 36 & -45\end{bmatrix}$, and $R^{-1} A R = \begin{bmatrix} 1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & -1 \end{bmatrix}$, from which we see that the rotation angle is $\pi$.

-

Wolfram Alpha tells me there is an eigenspace with eigenvalue $-1$ generated by $(-2, 0, 1)$ and $(-2, 1, 0)$ and an eigenspace with eigenvalue $1$ generated by $(1, 2, 2)$. (You could do this by hand). The eigenspaces are orthogonal, so this is a rotation by 180 degrees about the axis $(1, 2, 2)$.

The problem is a little atypical, since if you rotate by any angle that's not an integer multiple of $\pi$ you will have complex eigenvalues.

-
(This answer should have said explicitly: if you just want to prove it's a rotation, then checking that it has orthonormal columns and determinant one is enough.) –  user29743 Dec 18 '12 at 19:05
okay thanks for the clear answer ! –  Kasper Dec 18 '12 at 19:27
I believe the rotation is by a multiple of $\pi$? –  copper.hat Dec 18 '12 at 19:42

A rotation matrix has unit determinant. Such a matrix that has all non-zero entries may be decomposed into three rotation matrices, each representing a rotation about an orthogonal coordinate axis.

-

If a linear transformation $T:\Bbb R^3\to\Bbb R^3$ is a non-trivial rotation, then the set $\{x\in\Bbb R^3:T(x)=x\}$ will be the axis of rotation, since non-trivial rotation about an axis moves every point except the points on the axis.

Here, we're working with the transformation $T(x)=Ax$, so the set $\{x\in\Bbb R^3:T(x)=x\}$ is just the eigenspace of $A$ corresponding to the eigenvalue $1$. If $A$ didn't have $1$ as an eigenvalue, we'd know it wasn't a rotation at all (in this case, it does have $1$ as an eigenvalue). If the eigenspace's dimension were greater than $1$, then either it'd be a reflection matrix (if dimension $2$), or the identity matrix (if dimension $3$). The latter is clearly not the case, so it's either a rotation matrix or a reflection matrix. Noting that a reflection will necessarily fix a planar subspace of $\Bbb R^3$, then to show it's a reflection, we need only show that the eigenspace of $A$ corresponding to the eigenvalue $1$ is one-dimensional.

Side Note: Given any two non-zero vectors $x,y$ in $\Bbb R^3$ with the angle from $x$ to $y$ being $\theta$, we have the following formulas (where $\cdot$ is the dot product and $\times$ is the cross product): $$x\cdot y=\lVert x\rVert\lVert y\rVert\cos\theta\tag{1}$$ $$\lVert x\times y\rVert=\lVert x\rVert\lVert y\rVert\sin\theta\tag{2}$$

To see where $(1)$ and $(2)$ come from, see here and here.

In general, let's suppose we've been given some matrix $A$ corresponding to a rotation in $\Bbb R^3$, and that we want to find its angle of rotation. First, find a basis $\{w\}$ for the axis of rotation (found as above), let $x$ be any non-zero unit vector orthogonal (perpendicular) to $w$, let $y=Ax$. Then both $x$ and $y=Ax$ will be unit vectors. (Do you see why $y$ is a unit vector?), so the formulas $(1)$ and $(2)$ yield the following alternate formulas for our particular $x,y$: $$x\cdot y=\cos\theta\tag{1'}$$ $$\lVert x\times y\rVert=\sin\theta\tag{2'}$$ Here, $\theta$ is the angle of rotation of $A$. (Do you see why?) From there, we can determine $\theta$. (Do you see how?)

Alternatively, start with $w$ (as above), normalize it to $\hat w$, and then determine an orthonormal basis $B=\{\hat w,v_2,v_3\}$ for $\Bbb R^3$ with the Gram-Schmidt process. Then $$(\hat w\: v_2\: v_3)^TA(\hat w\: v_2\: v_3)=\left(\begin{array}{ccc}1 & 0 & 0\\0 & \cos\theta & -\sin\theta\\0 & \sin\theta & \cos\theta\end{array}\right),$$ which gives us another way to find $\theta$.

-

"By inspection, $A \begin{bmatrix} 1 \\ 2 \\ 2\end{bmatrix} = \begin{bmatrix} 1 \\ 2 \\2\end{bmatrix}$, which gives the axis of rotation."

Hi there, can you please show the steps involved in finding this $\begin{bmatrix} 1 \\ 2 \\ 2\end{bmatrix}$ vector. The book i've been reading (Mathematical methods in the physical sciences by Mary L. Boas) on page 129 says you can get the axis of rotation by solving $Ar=r$ instead of using inspection, where $A$ is the rotation matrix and $r$ is a vector mapped to itself under $A$.

If you could please show me the steps of how you arrived at that vector it would be most appreciated. Thank you and regards.

-