In geometry and physics, a 2D rotation is a rotation in two dimensions, commonly on the Euclidean plane. It leaves unchanged a single point, the centre of rotation, often assumed at the origin of the coordinate system. The amount of rotation is represented by the angle of rotation, expressed in units of measurement such as degrees or radians; a signed angle allows for two different senses of rotation: clockwise or anti-clockwise. It corresponds to the 2D special orthogonal group or SO(2).
Formulation
In two dimensions, to carry out a rotation using a matrix, the point (x, y) to be rotated counterclockwise is written as a column vector, then multiplied by a rotation matrix calculated from the angle θ:
- .
The coordinates of the point after rotation are x′, y′, and the formulae for x′ and y′ are
The vectors and have the same magnitude and are separated by an angle θ as expected.
Points on the R2 plane can be also presented as complex numbers: 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:
Since complex numbers form a commutative ring, vector 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.1
Rotation matrices

In two dimensions, the standard rotation matrix has the following form:
This rotates column vectors by means of the following matrix multiplication,
Thus, the new coordinates (x′, y′) of a point (x, y) after rotation are
Examples
For example, when the vector (initially aligned with the x-axis of the Cartesian coordinate system) is rotated by an angle θ, its new coordinates are
and when the vector (initially aligned with the y-axis of the coordinate system) is rotated by an angle θ, its new coordinates are
Sense
The sense or "direction" of vector rotation (not to be confused with the vector direction) is counterclockwise if θ is positive (e.g. 90°), and clockwise if θ is negative (e.g. −90°) for . Thus the clockwise rotation matrix is found as (by replacing θ with -θ and using the trigonometric symmetry of and )
An alternative convention uses rotating axes (instead of rotating a vector),2 and the above matrices also represent a rotation of the axes clockwise through an angle θ.
The two-dimensional case is the only non-trivial case where the rotation matrices group is commutative; it does not matter in which order rotations are multiply performed. For the 3-dimensional case, for example, a different order of multiple rotations gives a different result. (E.g., rotating a cell phone along z-axis then y-axis is not equal to rotations along the y-axis then z-axis.)
Non-standard orientation of the coordinate system

If a standard right-handed Cartesian coordinate system is used, with the x-axis to the right and the y-axis up, the rotation R(θ) is counterclockwise. If a left-handed Cartesian coordinate system is used, with x directed to the right but y directed down, R(θ) is clockwise. Such non-standard orientations are rarely used in mathematics but are common in 2D computer graphics, which often have the origin in the top left corner and the y-axis down the screen or page.3
See below for other alternative conventions which may change the sense of the rotation produced by a rotation matrix.
Common 2D rotations
Matrices are 2D rotation matrices corresponding to counter-clockwise rotations of respective angles of 0°, 90°, 180°, and 270°.
Relationship with complex plane
The matrices of the shape form a ring, since their set is closed under addition and multiplication. Since (where is the identity matrix), the map (where corresponds to ) is a ring isomorphism from this ring to the field of the complex numbers (incidentally, this shows that this ring is a field). Under this isomorphism, the rotation matrices correspond to the circle of the unit complex numbers, the complex numbers of modulus 1, since . As a result, the following equality holds,where the first equality is Euler's formula, the matrix corresponds to 1, and the matrix corresponds to the imaginary unit .
If one identifies with through the linear isomorphism , where and , the action of a matrix on a vector corresponds to multiplication on the complex number by x + iy. In other words, a vector rotation corresponds to multiplication on a complex number (corresponding to the vector being rotated) by a complex number of modulus 1 (corresponding to the rotation matrix).
See also
See also
References
References
- Lounesto 2001, p. 30.
- Swokowski, Earl (1979). Calculus with Analytic Geometry (Second ed.). Boston: Prindle, Weber, and Schmidt. ISBN 0-87150-268-2.
- "Scalable Vector Graphics – the initial coordinate system". W3C. 2003.