Determine the matrix A that rotates $R^3$ vectors the angle $\theta $ around the line $\begin{cases}x=t\\y=-t\\z=0\end{cases}$
My solution:
$\hat{v}=\frac{1}{\sqrt{2}}\begin{pmatrix}1\\-1\\0\end{pmatrix}$
A vector $\vec{u}$ is projected on the line by $\vec{u_p}=(\vec{u}\cdot\hat{v})\hat{v}$
The vector from the projection to $\vec{u}$ is $\vec{u}-\vec{u_p}=\vec{u}-(\vec{u}\cdot\hat{v})\hat{v}=\vec{w}$
$\vec{w}$ is perpendicular to the line and can now be seen as the x-axis of a circle with its origin at the point of vector $\hat{v}$.
$\vec{w_n}=\hat{v}\times\vec{w}$ can be seen as the circles y-axis.
Therefore $\vec{w'}$, which is $\vec{w}$ rotated $\theta$ degrees on the circle, can be expressed: $\vec{w'}=\cos{\theta}\vec{w}+\sin{\theta}\vec{w_n}$
And finally $\vec{u'}=\vec{u_p}+\vec{w'}$
Through replacing $\vec{u}$ with $\hat{e_x},\hat{e_y},\hat{e_z}$ I calculated the matrix to be:
$$A=\begin{pmatrix} \frac{1}{2}+\frac{1}{2}\cos{\theta}&-\frac{1}{2}+\frac{1}{2}\cos{\theta}&-\frac{1}{\sqrt{2}}\sin{\theta} \\-\frac{1}{2}+\frac{1}{2}\cos{\theta}&\frac{1}{2}+\frac{1}{2}\cos{\theta}&-\frac{1}{\sqrt{2}}\sin{\theta} \\\frac{1}{\sqrt2}\sin{\theta}&\frac{1}{\sqrt{2}}\sin{\theta}&\cos{\theta} \end{pmatrix}$$
Is there a simpler method to do this?