Determine the matrix of a rotation about a given vector. I've been asked to find a matrix for the transformation $T: \Bbb R^3\to \Bbb R^3$. The transformation $T$ is a rotation about a vector $(1,1,1)$ with an angle of $-\frac{3\pi}{2}$ according to the right hand rule. My only idea is that the transformation in some way could be described as a composition of the elementary rotations in $\Bbb R^3$.
Any tips are greatly appreciated!
 A: Take a vector $v$ with norm $1$ which is orthogonal to $(1,1,1)$; for instance, $v=\left(\frac1{\sqrt2},-\frac1{\sqrt2},0\right)$ (the answer will not depend upon the choice of $v$). Let$$u=\frac{(1,1,1)}{\|(1,1,1,)\|}=\left(\frac1{\sqrt3},\frac1{\sqrt3},\frac1{\sqrt3}\right)$$and let$$w=u\times v=\left(\frac1{\sqrt6},\frac1{\sqrt6},-\frac2{\sqrt6}\right).$$On the other hand, a rotation with angle $-\frac{3\pi}2$ is the same thing as a rotation with angle $\frac\pi2$. So, $T(u)=u$,$$T(v)=\cos\left(\frac\pi2\right)v+\sin\left(\frac\pi2\right)w=w,$$and$$T(w)=-\sin\left(\frac\pi2\right)v+\cos\left(\frac\pi2\right)w=-v.$$If$$P=\begin{bmatrix}\frac1{\sqrt3}&\frac1{\sqrt2}&\frac1{\sqrt6}\\\frac1{\sqrt3}&-\frac1{\sqrt2}&\frac1{\sqrt6}\\\frac1{\sqrt3}&0&-\frac2{\sqrt6}\end{bmatrix}$$(the columns of $P$ are the vectors $u$, $v$, and $w$, by this order), and if $M$ is the matrix that you're after, then$$P^{-1}MP=\begin{bmatrix}1&0&0\\0&0&-1\\0&1&0\end{bmatrix},$$since $P^{-1}MP$ is the matrix of $T$ with respect to the basis $\{u,v,w\}$and this matrix is precisely$$\begin{bmatrix}1&0&0\\0&0&-1\\0&1&0\end{bmatrix}.$$Therefore\begin{align}M&=P\begin{bmatrix}1&0&0\\0&0&-1\\0&1&0\end{bmatrix}P^{-1}\\&=\begin{bmatrix}\frac13& \frac13-\frac1{\sqrt{3}}&\frac13+\frac1{\sqrt{3}}\\ \frac13+\frac1{\sqrt{3}}& \frac13& \frac13-\frac1{\sqrt{3}}\\ \frac13-\frac1{\sqrt{3}}& \frac13+\frac1{\sqrt{3}}& \frac13\end{bmatrix}.\end{align}
