Rotation of a vector is performed by applying
the rotation matrix R on the vector V. V^{'} = R × V

If the rows and columns of a rotation matrix R are orthogonal to
each other and of unit length then the following relations are true:
R^{T} = R^{− 1} R^{T} R = RR^{T} = I detR = 1

Two dimentional rotation 
Rotation by θ counterclockwise 

+θ counterclockwise −θ clockwise 
Rotation by θ clockwise 

sin(−θ) = −sinθ cos(−θ) = cosθ 
Rotation by 90° counterclockwise 

Rotation by 180° counterclockwise 

Rotation by 270° counterclockwise 

Three dimentional rotation (θ − x axis, ϕ − y axis, φ − z axis) 



Rotation about x axis 




Rotation about> y axis 




Rotation about z axis 





Combined rotation in the direction of all axes can be
done by multiplying the three rotation matrices in the
x,y and z direction

Counterclockwise: 
R_{xyz} = R_{x}(θ)∙R_{y}(ϕ)∙R_{z}(φ) 
Mixed direction: 
R_{xyz} = R_{x}(−θ)∙R_{y}(−ϕ)∙R_{z}(φ) 
Rotation in the direction of two axes can be done by:
R_{xy} = R_{x} R_{y} 
or 
R_{xz} = R_{x} R_{z} 
or 
R_{yz} = R_{y} R_{z} 

clockwise rotation matrix of the axes (vector is moved counterclockwise)
Note: the order of the rotation is important as rotation R_{x} (θ) R_{y} (ϕ) R_{z} (φ) is not equal to rotation R_{z} (φ) R_{y} (ϕ) R_{x} (θ).

Counterclockwise rotation matrix of the axes (vector is moved clockwise)

Example: Rotate the vector V = 2i + j
by 30° counterclockwise. 


(Rotated vector) V ^{'} = R × V (R  Rotation matrix)
V^{'} = [2 cos(30°) − sin(30°)]i + [2 sin(30°) + cos(30°)]j
V^{'} = 1.23i + 1.87j

Example: Rotate the vector V = i + j + k
by an angle of 30° counterclockwise about the x axis,
45° clockwise about the y axis and 60° clockwise about
z axis.

Step 1: rotation θ = 30° about x axis counterclockwise:
Step 2: rotation ϕ = 45° about y axis clockwise:
Step 3: rotation φ = 60° about z axis clockwise:
