3D rotation about an arbitrary axis (3d Math Primer) I am reading a 3d math primer book and I don't understand the following paragraph. Please Help me. I have been stuck on this for 2 days.

Notice that $\mathbf w$ and ${\mathbf v}_\bot$ form a 2D coordinate space, with ${\mathbf v}_\bot$ as the “x-axis” and w as the “y-axis.” (Note that the two vectors don’t necessarily have unit length.) ${\mathbf v}'_\bot$ is the result of rotating ${\mathbf v}'$ in this plane by the angle $\theta$. Note that this is almost identical to rotating an angle into standard position. Section 1.4.4 showed that the endpoints of a unit ray rotated by an angle $\theta$ are $\cos\theta$ and $\sin\theta$. The only difference here is that our ray is not a unit ray, and we are using ${\mathbf v}_\bot$ and $\mathbf w$ as our basis vectors. Thus, ${\mathbf v}'_\bot$ can be computed as
$${\mathbf v}'_\bot = \cos(\theta) {\mathbf v}_\bot + \sin(\theta){\mathbf w}$$
Can someone please help how he got ${\mathbf v}'_\bot$. AFIK the coordinates of ${\mathbf v}'_\bot$ will be 
$$\begin{pmatrix}|{\mathbf v}'_\bot| \cdot \cos\theta\\|{\mathbf v}'_\bot| \cdot \sin\theta\end{pmatrix}$$
A step by step explanation will be highly appreciated. Thank you.
 A: *

*First of all we note that ${\mathbf w}=\hat{\mathbf n}\times {\mathbf v}_{\bot}$. This is important because
$$
\|{\mathbf w}\|=\|\hat {\mathbf n}\|\cdot \|{\mathbf v}_{\bot}\| \cdot \sin\frac{\pi}2 = \|{\mathbf v}_{\bot}\|.
$$

*Notice that the unit vectors $\frac{{\mathbf v}_{\bot}}{\|{\mathbf v}_{\bot}\|}$ and $\frac{{\mathbf w}}{\|{\mathbf w}\|}$ form an orthonormal basis. According to the results from 
the Section 1.4.4, ${\mathbf v}_{\bot}'$ in this basis has the coordinates $(\|{\mathbf v}_{\bot}\|\cos\theta,\|{\mathbf v}_{\bot}\|\sin\theta)$, thus, it can be expressed as
$$
{\mathbf v}_{\bot}'=\|{\mathbf v}_{\bot}\|\cos\theta \cdot\frac{{\mathbf v}_{\bot}}{\|{\mathbf v}_{\bot}\|}+\|{\mathbf v}_{\bot}\|\sin\theta\cdot \frac{{\mathbf w}}{\|{\mathbf w}\|}
={\mathbf v}_{\bot}\cos\theta+{\mathbf w}\sin\theta.
$$

A: The formula only works if 
$\lVert \mathbf w\rVert = \lVert \mathbf v_\perp\rVert,$
so I hope that is part of the setup for this exercise.
Yes, you can put $\mathbf v'_\perp$ into the coordinate form
$$
\begin{pmatrix}\lVert\mathbf v'_\perp\rVert \cos\theta \\
               \lVert\mathbf v'_\perp\rVert \sin\theta\end{pmatrix}, \tag1
$$
but only if you are plotting in in a plane whose first coordinate is in the direction of $\mathbf v_\perp$ and whose second coordinate is in the direction of $\mathbf w.$
Moreover, the coordinates have to be measured according to the same scale as your original coordinates, otherwise multiplying them by
$\lVert\mathbf v'_\perp\rVert$ will give the wrong length.
That is, the first coordinate in $(1)$ tells you how many units to go in the direction of $\mathbf v_\perp,$ that is, it gives you a component of 
$\lVert\mathbf v'_\perp\rVert$ that is 
$\lVert\mathbf v'_\perp\rVert \cos\theta$ units in the direction of
$\mathbf v_\perp.$
To get such a vector, we multiply a unit vector in the direction of
$\mathbf v_\perp$ by the length of the desired vector:
$$
(\lVert\mathbf v'_\perp\rVert \cos\theta)
\left( \frac{1}{\lVert\mathbf v_\perp\rVert}\mathbf v_\perp\right). \tag2
$$
Now observe that we had better have
$\lVert\mathbf v'_\perp\rVert = \lVert\mathbf v_\perp\rVert,$
otherwise we do not have a rotation.
So $(2)$ simplifies to
$$
(\cos\theta) \mathbf v_\perp.
$$
Now do the other coordinate: it is $\lVert\mathbf v'_\perp\rVert \sin\theta$ units in the direction of $\mathbf w,$
$$
(\lVert\mathbf v'_\perp\rVert \sin\theta)
\left( \frac{1}{\lVert\mathbf w\rVert}\mathbf w\right), \tag3
$$
and we already know 
$\lVert \mathbf w\rVert = \lVert \mathbf v_\perp\rVert
 = \lVert \mathbf v'_\perp\rVert,$ so $(3)$ simplifies to
$$
(\sin\theta) \mathbf w.
$$
Those are the two components of $\mathbf v'_\perp$ according to the coordinates you came up with.
To get the vector, we add its components:
$$
\mathbf v'_\perp = (\cos\theta) \mathbf v_\perp + (\sin\theta) \mathbf w.
$$
A: Any vector that you want to rotate can be decomposed in a parallel component, $\vec v_{\parallel}=(\vec n\cdot\vec v)\,\vec n$, which doesn't change, and a perpendicular component $\vec v_{\perp}=\vec v-\vec v_\parallel$. 
The perpendicular component will rotate in a plane perpendicular to the axis, that can be defined by $\vec v_{\perp}$ and a vector perpendicular to both $\vec v_{\perp}$ and $\vec n$, let $\vec w=\vec v_\perp\times\vec n=\vec v\times\vec n$. We get a vector of the same length as $\vec v_\perp$ using
$$\vec v_+=\frac{\|\vec v_\perp\|}{\|\vec w\|}\vec w.$$
Now to rotate the perpendicular component, you form the linear combination
$$\vec v_\perp\cos\theta+\vec v_+\sin\theta$$ as in 2D* , and the full rotated vector is
$$\vec v_\parallel+\vec v_\perp\cos\theta+\vec v_+\sin\theta.$$ 


*You can check that $\vec v_\parallel\cdot(\vec v_\perp\cos\theta+\vec v_+\sin\theta)=0$ and $(\vec v_\perp\cos\theta+\vec v_+\sin\theta)^2=\vec v_\perp^2$, so that the new vector lies in the perpendicular plane and has a length independent of $\theta$.
