# Rotation Matrix From Axis and Angle

Please anyone help me to explain how to find the standard matrix for a rotation of $\pi/2$ radians about the axis determined by $v = (1,1,1)$ using this formula: $$\begin{bmatrix} a^2(1-\cos \theta)+\cos \theta & ab(1-\cos\theta)-c\sin\theta & ac(1-\cos\theta)+b\sin\theta \\ ab(1-\cos\theta)+c\sin\theta & b^2(1-\cos\theta)+\cos\theta & bc(1-\cos\theta)-a\sin\theta \\ ac(1-\cos\theta)-b\sin\theta & bc(1-\cos\theta)+a\sin\theta & c^2(1-\cos\theta)+\cos\theta \\ \end{bmatrix}$$ Note: This formula requires that the vector defining the axis of rotation have length $1$

• What is giving you trouble? Scaling the vector to be unit length? Evaluating trig functions at $\pi/2$? Using a formula? – rschwieb Apr 15 '17 at 13:47
• because the length of vector should be 1 but in this case the length of vector isn't 1 – Steve Apr 15 '17 at 15:56
• then just normalize it. Normalizing it does not change the axis of rotation... – rschwieb Apr 15 '17 at 19:35
• Normalizing the vector gives you $u=[ 1/\sqrt{3}, 1/\sqrt{3}, 1/\sqrt{3}]$ – Widawensen Apr 19 '17 at 11:30

As you mention above, you need to normalize the vector first. $$v=(1,1,1) \implies v_{norm} = \frac{v}{\|v\|} = \frac{(1,1,1)}{\sqrt{1^2 + 1^2 + 1^2}} = \left(\frac{1}{\sqrt{3}},\frac{1}{\sqrt{3}},\frac{1}{\sqrt{3}}\right)$$
Then, take $\theta=\pi/2$ and $(a,b,c) = (1/\sqrt{3},1/\sqrt{3},1/\sqrt{3})$.