How to rotate one vector about another?
Brief
Given 2 non-parallel vectors: a and b, is there any way by which I may rotate a about b such that b acts as the axis about which a is rotating?
Question
Given: vector a and b
To find: vector c where c is produced by rotating a about b by an angle θ clockwise given by right hand thumb rule.
Edit: There is a problem with the image! it was supposed to be rotated clockwise by right hand thumb rule unlike how it is shown in the image (but there shouldn't be much of a difference in the solution).
Right hand thumb rule: "Wrap the fingers of your right hand around vector b such that your thumb points in the direction of vector b. Then, the direction of curvature of the rest of your fingers will indicate the direction a will be rotated about b"
Solution 1:
Orthogonal component method:
$\vec a$ rotates about $\vec b$ in a clockwise direction by $\theta$ rad according to the right hand rule where your thumb represents $\vec b$, and the curling of your fingers represents the direction of the rotation. This method involves finding $\vec a_{\perp b}$, the component of $\vec a$ orthogonal to $\vec b$ and rotating it by $\theta$ along the plane with normal $\vec b$ .
$\vec a$ can be decomposed into two components:$$\vec a = \vec a_{\parallel \vec b} + \vec a_{\perp \vec b}$$
$\vec a_{\parallel \vec b}$ is the component of $\vec a$ in the direction of $\vec b$ $$\vec a_{\parallel \vec b} = \Big(\dfrac{\vec a\cdot \vec b}{\vec b\cdot \vec b} \Big)\vec b$$ $\vec a_{\perp b}$ is the component of $\vec a$ in the direction orthogonal to $\vec b$ $$ $$
\begin{align*} \vec a_{\perp \vec b} =& \vec a - \vec a_{\parallel \vec b} \\ \\\vec a_{\perp \vec b}=& \vec a - \Big(\dfrac{\vec a\cdot \vec b}{\vec b\cdot \vec b} \Big) \vec b \end{align*}
Our next step is to determine $\vec w = \vec b \times \vec a_{\perp \vec b}$
This vector orthogonal to both $\vec a_{\perp \vec b}$ and $\vec b$ .
Then we need to find a linear combination of $\vec a_{\perp \vec b}$ and $\vec w$ representing a rotation of $\vec a_{\perp \vec b}$
$$\vec a_{\perp \vec b, \theta} = ||\vec a_{\perp \vec b}||(x_1 \vec a_{\perp \vec b} + x_2 \vec w)$$
Where: $$ x_1 = \dfrac{cos(\theta)}{||\vec a_{\perp \vec b}||} $$
and:
$$x_2 = \dfrac{sin(\theta)}{||\vec w||}$$
Finally we can make our vector representing the rotation of $\vec a$ around $\vec b$ by $\theta$ rad:
$$\vec a_{b,\theta} = \vec a_{\perp \vec b, \theta} + \vec a_{\parallel \vec b}$$
*NOTE:
1) As a preliminary belief check, make $(\theta = \pi/2$ ) or ( $\theta = 0$) and look at what the $sin(\theta)$ and $cos(\theta)$ in the equation for $\vec a_{\perp \vec b, \theta}$ do.*
2) If you need further demonstration that the last equation is the vector we are looking for just ask
3) The method described above is an adaptation of the "Rodrigues" rotation
Bibliography: "Linear Algebra with Applications" by Steven J. Leon https://en.wikipedia.org/wiki/Rodrigues%27_rotation_formula
Solution 2:
Roughly speaking you want to do this :
Start with $v_1 = b/|b|$ and extend it to an orthonormal basis $\{v_1, v_2, v_3\}$ of $\mathbb{R}^3$
Write these vectors as columns of a matrix $P$ (notice that $P$ is invertible)
Consider the matrix $B = PAP^{-1}$ where $$ A = \begin{pmatrix} 1 & 0 & 0 \\ 0 & \cos(\theta) & -\sin(\theta) \\ 0 & \sin(\theta) & \cos(\theta) \end{pmatrix} $$
The vector you are looking for is $$ c = B(a) $$