Rotation matrix
From Wikipedia, the free encyclopedia
A rotation matrix is a matrix which when multiplied by a vector has the effect of changing the direction of the vector but not its magnitude. Rotation matrices do not include inversions, which can change a right-handed coordinate system into a left-handed coordinate system and vice versa. The set of all rotation matrices along with inversions forms the set of orthogonal matrices.
Contents |
[edit] Properties
Let be a general rotation matrix of any dimension:
- The dot product of two vectors remains unchanged when both are operated upon by a rotation matrix:
-
- where is the identity matrix.
- A matrix is a rotation matrix if and only if it is orthogonal and its determinant is unity. The determinant of an orthogonal matrix is ±1; if the determinant is -1, then the matrix also contains a reflection and is not a rotation matrix.
- A rotation matrix is orthogonal if its column vectors form an orthonormal basis of , that is, the scalar product between any two different column vectors is zero (orthogonality) and the scalar product of a column vector with itself is unity (normalization).
- Any rotation matrix can be represented as the exponential of an skew-symmetric matrix A:
- where the exponential is defined in terms of its Taylor series and is defined in terms of matrix multiplication. The A matrix is known as the generator of the rotation. The Lie algebra of rotation matrices is the algebra of its generators, which is just the algebra of skew-symmetric matrices.
[edit] Two dimensions
In two dimensions, a rotation can be defined by a single angle, θ. Conventionally, positive angles represent anti-clockwise rotation. The matrix to rotate a column vector in cartesian coordinates about the origin by an anti-clockwise angle of θ is:
[edit] Three dimensions
In three dimensions, a rotation matrix has one real eigenvalue, equal to unity. The rotation matrix specifies a rotation about the corresponding eigenvector (Euler's rotation theorem). If the angle of rotation is θ then the other two (complex) eigenvalues of the rotation matrix are exp(iθ) and exp(-iθ). It follows that the trace of a 3D rotation matrix is equal to 1 + 2 cos(θ), which can be used to quickly calculate the rotation angle of any 3D rotation matrix.
The generators of 3D rotation matrices are 3D skew symmetric matrices. Since only three real numbers are needed to specify a 3D skew-symmetric matrix, it follows that only three real numbers are needed to specify a 3D rotation matrix.
[edit] Roll, Pitch and Yaw
A simple way to generate a rotation matrix is to compose it as a sequence of three basic rotations. Rotations about the right-handed cartesian x-, y- and z-axes are known as roll, pitch and yaw rotations respectively. Since these rotations are expressed as a rotation about an axis, their generators are easily expressed.
- Rotation around the x-axis is defined as:
- where θx is the roll angle.
- Rotation around the y-axis is defined as:
- where θy is the pitch angle.
- Rotation about the z-axis is defined as:
- where θz is the yaw angle.
In flight dynamics, the roll, pitch and yaw angles are usually given the symbols γ, α, and β, respectively; here, however, the symbols θx, θy, and θz are used to avoid confusion with the Euler angles.
Any 3-dimensional rotation matrix can be characterised by the three angles θx, θy, and θz, and may be expressed as a product of the roll, pitch and yaw matrices.
- is a rotation matrix in
The set of all rotations about a given axis, together with the operation of composition, form a continuous group. The matrices discussed here then provide a representation of the group.
[edit] Angle-Axis representation
In three dimensions, a rotation can be defined by a single angle of rotation, θ, and the direction of a unit vector, , about which to rotate.
This rotation may be simply expressed in terms of its generator:
When operating on a vector r, this is equivalent to the Rodrigues' rotation formula
[edit] Angle-Axis representation via Rotation Tensor
A rotation matrix is not invariant with respect to current reference frame, where the actual rotation is considered. The same physical rotation will have different "rotation matrices" with respect to different sets of basis vectors (orthonormal or not). A rotation tensor is a more general representation of a rotation in space. The representation of rotation by rotation tensors is invariant with respect to change of current reference frame. Each "rotation matrix" representation then is just an "image" of corresponding rotation tensor in a given reference frame. Rotation tensors are constructed using vector dyadics (or "ordered of pairs of vectors"). Dyadics themself can be described as matrices in each given reference frame but are actually much more general objects and are also invariant with respect to rotations of the current reference frame.
A rotation tensor representing a rotation about unit axis for angle θ is given by:
where is a unit tensor of second order, which is a sum of three dyadics , where are three orthogonal unit vectors of any orthonormal reference frame. The given representation does not depend on the actual current orientation of reference frame because the unit tensor itself has the same representation in any orthonormal reference frame (non-orthonormal reference frames will be considered just few lines later).
The Rodrigues' rotation formula simply follows from the above representation as soon as
The parts of the the expression for the rotation tensor are easily recognizable.
The dyad is responsible for a component of the vector , which is parallel to the axis of rotation and is not affected by the multiplication . The length of this component is , where r is the length of the vector and α is the angle between vectors and .
The projector gives us a component of the vector , which is exactly orthogonal to . The length of this component is . This component is then scaled by cosθ depending on the actual rotation angle θ.
And the last part of the expression for the rotation tensor is responsible for a component of the final vector , which is orthogonal to both and as soon as . The length of vector is also equal due to definition of the cross-product of two vectors.
As a result the three parts , and of the rotation tensot construct a local orthogonal reference frame which is most convinient for description of the actual rotation of any given vector .
The above representation can be is generalized onto the case of non-orthonormal reference frame by constructing the unit tensor as (assuming Einstein summation), where are covectors of vectors .
The covectors are build out of as:
where each triplet {i,j,k} is a cyclic permutations of {1,2,3} triplet. In orthonormal reference frames the vectors coincide with their "co"-counterparts .
As a result the given description of rotation in 3D space by the rotation tensor is invariant with respect to any (orthonormal or not) reference frame. Any "rotation matrix" representation is an "image" of the rotation tensor taken in corresponding reference frame.
[edit] Euler Angle representation
In three dimensions, a rotation can be defined by three Euler angles, (α,β,γ). There are a number of possible definitions of the Euler angles. Each may be expressed in terms of a composition of the roll, pitch, and yaw rotations. The rotation matrix expressed in terms of the "z-x-z" Euler angles, in right-handed cartesian coordinates may be expressed as:
carrying out the multiplications yields:
Since this rotation matrix is not expressed as a rotation about a single axis, its generator is not as simply expressed as in the above examples.
[edit] Symmetry Preserving SVD representation
For an axis of rotation q and angle of rotation θ, the rotation matrix
where the columns of span the space orthogonal to q and G is the Givens rotation of θ degrees, i.e.
[edit] See also
- Coordinate rotation
- Rotation representation
- Isometry
- Orthogonal matrix
- Rodrigues' rotation formula
- Rotation
- Rotation group
- Yaw-pitch-roll system