The rotation matrix between two coordinate systems is defined as:

It consists of an inner product between the two sets of bases, describing the same vector’s coordinate relationship before and after the rotation. Since the base vector’s length is , it is actually the cosine of the angle between the base vectors, so it’s also called the directional cosine matrix.

Properties

Some properties of the rotation matrix:

  • It is an orthogonal matrix – its inverse is its transpose
  • Its determinant is – this is artificially defined as it’s actually but is an improper rotation

As such, any orthogonal matrix with a determinant of is a rotation matrix, so you can define a set of dimensional rotational matrices as follows:

refers to a special orthogonal group. This set consists of a rotation matrix of n dimensional space; in particular, refers to the rotation of the three-dimensional space. In this way, we can talk directly about the rotation transformation between the two coordinate systems without having to start from the bases.

Since the rotation matrix is orthogonal, its inverse (i.e. transpose) describes an opposite rotation, such that:

where represents an opposite rotation.