# How do I perform matrix rotation in 3-space?

I have been asked the following question in a tutorial:

Let A be a 3x3 matrix which is invertible. Show that you can always perform a rotation of 3-space to make the last row of A be [0 0 A33]

I haven't the faintest idea how to do this and have been deeply confused during lectures. I have tried speaking to my lecturer in person when I've previously had problems, but I never understand him. (He's new and has difficulty pitching at first-year level.)

Could anyone here show me how to do this and explain, as simply and clearly as possible, how they derived the answer? (I need to be able to apply this in a test this Thursday.) You guys are my last resource.

-
I guess it means that there is a rotation matrix $S$ (i.e. an orthogonal matrix with determinant $+1$) such that $SAS^{-1}$ has the property that its last row is of the form $\begin{pmatrix} 0 & 0 & A_{33}\end{pmatrix}$. – Rasmus Apr 17 '11 at 14:54
You can premultiply any 3-by-3 matrix $\mathbf A$ with a matrix of the form $$\mathbf Q=\bigl(\begin{smallmatrix}1&0&0\\0&c&s\\0&-s&c\end{smallmatrix}\bigr)$$ where $c^2+s^2=1$; the idea is to choose $c$ and $s$ appropriately so that a particular entry in the last row of $\mathbf Q\mathbf A$ is zero. Remember also that the product of two rotation matrices is also a rotation matrix. – J. M. Apr 17 '11 at 15:53
Is A33 the same as in the original matrix or is it stating that it just needs to be non zero? – Tpofofn Apr 17 '11 at 17:48

You need to show that A has at least one eigenvector. That is, that the equation $det(A-\lambda I)=0$ has at least one real solution (note that this is a third-degree polynomial in $\lambda$). Showing this, you have to calculate one eigenvector $v$ corresponding to this $\lambda$ (solving $A\cdot v=\lambda v$). Since $det(A-\lambda I)=0$, the equation has nontrivial solutions. Once you have this vector, just make a rotation that takes one of the canonical vectors to $\frac{v}{\mid v \mid}$.

You will obtain a matrix that has the last column $[ 0 0 \lambda ]$. To obtain the desired result, you have to apply the method above to $A^t$ (note that $A$ and $A^t$ have the same eigenvalues.)

-

This is called diagonalizing a matrix. First solve for the eigenvalues $\{\lambda_1, \lambda_2,\lambda_3\}$ of $A$. Then perform a change of basis to the basis of eigenvectors $\{\vec{v_1}, \vec{v_2}, \vec{v_3}\}$.

Let $P$ be the $3x3$ matrix $[\vec{v_1}\; \vec{v_2}\; \vec{v_3}]$. Then $$A=P^{-1}DP$$ where D is the diagonal matrix with diagonal $\{\lambda_1, \lambda_2,\lambda_3\}$.

This will only amount to a rigid rotation in $\mathbb{R}^3$ if the columns of A were already orthogonal to one another, but note that the process above is a rotation in the sense that it is multiplication by two orthogonal matrices of determinant 1, which can be seen if we normalize the eigenvectors of $A$ to create $P$.

Also worth noting that not all matrices have 3 real eigenvalues. Real symmetric $n$x$n$ matrices have an orthonormal basis of eigenvectors. For more google "spectral theorem".

-

All rotations in three space correspond to quaternions. The rotation about an axis through the origin corresponds to the quaternion with i,j,k coordinates equal to the coordinates with the remaining real coordinate specifying angle magnitude and then the coordinate must be multiplied by a scalar factor so the length of the coordinate is one. Then for any such axis and any angle We can find a quaternion corresponding to the rotation. Now in your problem the rotation about the axis perpendicular to the z coordinate and the third row of the matrix will do the trick. That axis is just the product of the normalized quaternions whose coordinates which are derived from the z coordinate (simply k) and the quaternion corresponding to the third row of the matrix with the scalar term discarded. Now looking at this I see I don't need the matrix to be invertible so I have the stronger result: Let A be a 3x3 matrix. Show that you can always perform a rotation of 3-space to make the last row of A be [0 0 A33].

-