Rotation matrix
In linear algebra, a rotation matrix is a matrix that is used to perform a rotation in Euclidean space. For example the matrix
rotates points in the xy-Cartesian plane counter-clockwise through an angle θ about the origin of the Cartesian coordinate system. To perform the rotation using a rotation matrix R, the position of each point must be represented by a column vector v, containing the coordinates of the point. A rotated vector is obtained by using the matrix multiplication Rv.
Rotation matrices also provide a means of numerically representing an arbitrary rotation of the axes about the origin, without appealing to angular specification. These coordinate rotations are a natural way to express the orientation of a camera, or the attitude of a spacecraft, relative to a reference axes-set. Once an observational platform's local X-Y-Z axes are expressed numerically as three direction vectors in world coordinates, they together comprise the columns of the rotation matrix R (world → platform) that transforms directions (expressed in world coordinates) into equivalent directions expressed in platform-local coordinates.