Three dimensions Rotation
In ordinary three dimensional space, a coordinate rotation can be described by means of Euler angles. It can also be described by means of quaternions (see below), an approach which is similar to the use of vector calculus.
Another way is to multiply by a matrix M, which will rotate space by an angle θ around a unit vector v=(x,y,z), or, alternatively, provides the formulas for converting coordinates if the coordinate axes rotate in opposite direction: