<s>[INST] Matrix rotation in space Determine the matrix of the linear transformation $F$ in the space defined by $v$ being projected onto the plane through the origin with the normal $(1,2,5)$ and then rotating $180^{\circ}$ around the vector 
$e = (1,1,1)$.
Not showing all the steps, but the projected matrix should be
\begin{align*}
\frac{1}{30}\begin{pmatrix}29&-2&-5\\-2&26&-10\\-5&-10&5\end{pmatrix}
\end{align*}
How would I go about rotating this $180^{\circ}$?
 [/INST] One quick answer is as follows:
The matrix of a projection onto the plane with normal $v$ is given by $I - \frac{vv^T}{v^Tv}$.  The matrix of a $180^\circ$ degree rotation in the plane with normal vector $v$ is given by $2 \frac{vv^T}{v^Tv} - I$. So, the matrix $P$ of the projection, $R$ of the rotation, and $F$ of the total transformation are given by
$$
P = \frac 1{30}\pmatrix{29 & -2 & -5\\ -2 & 26 & -10\\ -5 & -10 & 5}, \quad
R = \frac 1{3} \pmatrix{-1 & 2 & 2\\ 2 & -1 & 2\\ 2 & 2 & -1},\\
F = RP = \frac 1{90}\pmatrix{-43 & 34 & -5\\ 50 & -50 & 10\\ 59 & 58 & -35}.
$$

A quick derivation of the matrix formulas: 
The projection onto the plane with normal $e_1 = (1,0,0)$ is given by
$$
P_0 = \pmatrix{0&0&0\\0&1&0\\0&0&1} = \pmatrix{0&0\\0&I_2} = 
I_3 - \pmatrix{1&0\\0&0_{2 \times 2}}.
$$
where $I_2$ denotes the $2 \times 2$ idenitity matrix.  Let $u_1 = v/\|v\|$, and extend to an orthonormal basis $u_1,u_2,u_3$.  Let $U$ denote the matrix with columns $u_1,u_2,u_3$. Via the change of basis formula, we find that the matrix of the transformation is given by
$$
P = VP_0V^{-1} = VP_0V^T.
$$
We then compute
$$
VP_0V^T = 
V\left( I_3 - \pmatrix{1&0\\0&0_{2 \times 2}}\right)V^T
= VV^T - V\pmatrix{1&0\\0&0_{2 \times 2}}V^T \\
= I - u_1u_1^T = I - \frac{vv^T}{v^Tv}.
$$
We can calculate the rotation formula similarly if we note that the rotation in the plane normal to $e_1$ has matrix
$$
\pmatrix{1&0&0\\0&-1&0\\0&0&-1} = 2\pmatrix{1&0\\0&0_{2 \times 2}} - I_3.
$$
</s>