In geometry and linear algebra, a rotation is a transformation in a plane or in space that describes the motion of a rigid body around a fixed point. A rotation is different from a translation, which has no fixed points, and from a reflection, which "flips" the bodies it is transforming. A rotation and the above-mentioned transformations are isometries; they leave the distance between any two points unchanged after the transformation.
It is important to know the frame of reference when considering rotations, as all rotations are described relative to a particular frame of reference. In general for any orthogonal transformation on a body in a coordinate system there is an inverse transformation which if applied to the frame of reference results in the body being at the same coordinates. For example in two dimensions rotating a body clockwise about a point keeping the axes fixed is equivalent to rotating the axes counterclockwise about the same point while the body is kept fixed.
Only a single angle is needed to specify a rotation in two dimensions – the angle of rotation. To calculate the rotation two methods can be used, either matrix algebra or complex numbers. In each, the rotation is acting to rotate an object counterclockwise through an angle θ about the origin.
To carry out a rotation using matrices the point (x, y) to be rotated is written as a vector, then multiplied by a matrix calculated from the angle, , like so:
where (x′, y′) are the co-ordinates of the point that after rotation, and the formulae for x′ and y′ can be seen to be
The vectors and have the same magnitude and are separated by an angle as expected.
Points can also be rotated using complex numbers, as the set of all such numbers, the complex plane, is geometrically a two dimensional plane. The point (x, y) in the plane is represented by the complex number
This can be rotated through an angle θ by multiplying it by eiθ, then expanding the product using Euler's formula as follows:
and equating real and imaginary parts gives the same result as a two dimensional matrix:
Like complex numbers rotations in two dimensions are commutative, unlike in higher dimensions. They have only one degree of freedom, as such rotations are entirely determined by the angle of rotation.
Rotations in ordinary three-dimensional space differ from those in two dimensions in a number of important ways. Rotations in three dimensions are generally not commutative, so the order in which rotations are applied is important. They have three degrees of freedom, the same as the number of dimensions.
A three dimensional rotation can be specified in a number of ways. The most usual methods are as follows.
As in two dimensions a matrix can be used to rotate a point (x, y, z) to a point (x′, y′, z′). The matrix used is a 3 × 3 matrix,
This is multiplied by a vector representing the point to give the result
The matrix A is a member of the three-dimensional special orthogonal group, SO(3), that is it is an orthogonal matrix with determinant 1. That it is an orthogonal matrix means that its rows are a set of orthogonal unit vectors (so they are an orthonormal basis) as are its columns, making it simple to spot and check if a matrix is a valid rotation matrix. The determinant of a rotation orthogonal matrix must be 1. The only other possibility for the determinant of an orthogonal matrix is -1, and this result means the transformation is a reflection, improper rotation or inversion in a point, i.e. not a rotation.
Matrices are often used for doing transformations, especially when a large number of points are being transformed, as they are a direct representation of the linear operator. Rotations represented in other ways are often converted to matrices before being used. They can be extended to represent rotations and transformations at the same time using Homogeneous coordinates. Transformations in this space are represented by 4 × 4 matrices, which are not rotation matrices but which have a 3 × 3 rotation matrix in the upper left corner.
The main disadvantage of matrices is that they are more expensive to calculate and do calculations with. Also in calculations where numerical instability is a concern matrices can be more prone to it, so calculations to restore orthonormality, which are expensive to do for matrices, need to be done more often.
Mobile frame rotations
One way of generalising the two dimensional angle of rotation is to specify three rotation angles, carried out in turn about the three principal axes. They individually can be labelled yaw, pitch, and roll, but in mathematics are more often known by their mathematical name, Euler angles. They have the advantage of modelling a number of physical systems such as gimbals, and joysticks, so are easily visualised, and are a very compact way of storing a rotation. But they are difficult to use in calculations as even simple operations like combining rotations are expensive to do, and suffer from a form of gimbal lock where the angles cannot be uniquely calculated for certain rotations.
Euler rotations are a set of three rotations defined as the movement obtained by changing one of the Euler angles while leaving the other two constant. Euler rotations are never expressed in terms of the external frame, or in terms of the co-moving rotated body frame, but in a mixture. They constitute a mixed axes of rotation system, where the first angle moves the line of nodes around the external axis z, the second rotates around the line of nodes and the third one is an intrinsic rotation around an axis fixed in the body that moves.
A second way of generalising the two-dimensional angle of rotation is to specify an angle with the axis about which the rotation takes place. It can be used to model motion constrained by a hinges and Axles, and so is easily visualised, perhaps even more so than Euler angles. There are two ways to represent it;
- as a pair consisting of the angle and a unit vector for the axis, or
- as a vector obtained by multiplying the angle with this unit vector, called the rotation vector.
Usually the angle and axis pair is easier to work with, while the rotation vector is more compact, requiring only three numbers like Euler angles. But like Euler angles it is usually converted to another representation before being used.
Quaternions are in some ways the least intuitive representation of three dimensional rotations. They are not the three dimensional instance of a general approach, like matrices; nor are they easily related to real world models, like Euler angles or axis angles. But they are more compact than matrices and easier to work with than all other methods, so are often preferred in real world applications.
A rotation quaternion consists of four real numbers, constrained so the length of the quaternion considered as a vector is 1. This constraint limits the degree of freedom of the quaternion to three, as required. It can be thought of as a generalisation of the complex numbers, by e.g. the Cayley–Dickson construction, and generates rotations in a similar way by multiplication. But unlike matrices and complex numbers two multiplications are needed:
where q is the rotation quaternion, q−1 is its inverse, and x is the vector treated as a quaternion. The quaternion can be related to the rotation vector form of the axis angle rotation by the exponential map over the quaternions,
Where v is the rotation vector treated as a quaternion.
A general rotation in four dimensions has only one fixed point, the centre of rotation, and no axis of rotation. Instead the rotation has two mutually orthogonal planes of rotation, each of which is fixed in the sense that points in each plane stay within the planes. The rotation has two angles of rotation, one for each plane of rotation, through which points in the planes rotate. If these are ω1 and ω2 then all points not in the planes rotate through an angle between ω1 and ω2.
If ω1 = ω2 the rotation is a double rotation and all points rotate through the same angle so any two orthogonal planes can be taken as the planes of rotation. If one of ω1 and ω2 is zero, one plane is fixed and the rotation is simple. If both ω1 and ω2 are zero the rotation is the identity rotation.
Rotations in four dimensions can be represented by 4th order orthogonal matrices, as a generalisation of the rotation matrix. Quaternions can also be generalised into four dimensions, as even Multivectors of the four dimensional Geometric algebra. A third approach, which only works in four dimensions, is to use a pair of unit quaternions.
Rotations in four dimensions have six degrees of freedom, most easily seen when two unit quaternions are used, as each has three degrees of freedom (they lie on the surface of a 3-sphere) and 2 × 3 = 6.
One application of this is special relativity, as it can be considered to operate in a four dimensional space, spacetime, spanned by three space dimensions and one of time. In special relativity this space is linear and the four dimensional rotations, called Lorentz transformations, have practical physical interpretations.
If a rotation is only in the three space dimensions, i.e. in a plane that is entirely in space, then this rotation is the same as a spatial rotation in three dimensions. But a rotation in a plane spanned by a space dimension and a time dimension is a hyperbolic rotation, a transformation between two different reference frames, which is sometimes called a "Lorentz boost". These transformations, which are not actual rotations, but squeeze mappings, are sometimes described with Minkowski diagrams. The study of relativity is concerned with the Lorentz group generated by the space rotations and hyperbolic rotations.
More generally, coordinate rotations in any dimension are represented by orthogonal matrices. The set of all orthogonal matrices of the n-th dimension which describe proper rotations (determinant = +1), together with the operation of matrix multiplication, forms the special orthogonal group: SO(n).
Orthogonal matrices have real elements. The analogous complex-valued matrices are the unitary matrices. The set of all unitary matrices in a given dimension n forms a unitary group of degree n, U(n); and the subgroup of U(n) representing proper rotations forms a special unitary group of degree n, SU(n). The elements of SU(2) are used in quantum mechanics to rotate spin.
- Lounesto 2001, p.30.
- Lounesto 2001, pp. 85, 89.
- Hestenes 1999, pp. 580 - 588.
- Hestenes, David (1999). New Foundations for Classical Mechanics. Dordrecht: Kluwer Academic Publishers. ISBN 0-7923-5514-8.
- Lounesto, Pertti (2001). Clifford algebras and spinors. Cambridge: Cambridge University Press. ISBN 978-0-521-00551-7.
- Brannon, Rebecca M. (2002). "A review of useful theorems involving proper orthogonal matrices referenced to three-dimensional physical space.". Albuquerque: Sandia National Laboratories.