Robotics

Rotation matrix

Definition

A rotation matrix represents an orientation or rotation while preserving lengths and angles. In three dimensions it is a 3-by-3 orthonormal matrix with determinant positive one.

Also known as: Rotation matrices

Updated

The columns describe a frame

One interpretation places the three unit axes of a body frame into the columns of a matrix, expressed in a reference frame. Multiplying this matrix by a vector expressed in body coordinates expresses that vector in the reference coordinates.

Modern Robotics derives the constraints: each column has unit length, distinct columns are perpendicular, and the determinant is positive one. Together these define the group called SO(3).

Composition and inversion

Multiplying two rotation matrices composes their rotations. The inverse is the transpose, which makes reversing a frame relationship straightforward. The order of composition matters because three-dimensional rotations generally do not commute.

A homogeneous transformation adds translation to this orientation representation, as the transformation-matrix lesson explains. Rotation alone cannot describe where a robot's hand is located.

Nine values represent three freedoms

Although the matrix stores nine numbers, its constraints leave three degrees of freedom. MIT's discussion of orientation representations explains why matrices avoid the coordinate singularities of a minimal angle representation. An arbitrary nine-number array is not a valid rotation.

Quaternions and Euler angles encode the same orientation with different storage and mathematical properties. Choose the representation and frame convention explicitly when passing orientation data between systems.

Sources