Article · Wikipedia archive · Last revised Jun 7, 2026

2D rotation

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 such as degrees or radians. It corresponds to the 2D special orthogonal group or SO(2).

Last revised
Jun 7, 2026
Read time
≈ 7 min
Length
1,659 w
Citations
3
Source

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 θ:

[ x y ] = [ cos θ sin θ sin θ cos θ ] [ x y ] {\displaystyle {\begin{bmatrix}x'\\y'\end{bmatrix}}={\begin{bmatrix}\cos \theta &-\sin \theta \\\sin \theta &\cos \theta \end{bmatrix}}{\begin{bmatrix}x\\y\end{bmatrix}}} .

The coordinates of the point after rotation are x′, y′, and the formulae for x′ and y′ are

x = x cos θ y sin θ y = x sin θ + y cos θ . {\displaystyle {\begin{aligned}x'&=x\cos \theta -y\sin \theta \\y'&=x\sin \theta +y\cos \theta .\end{aligned}}}

The vectors [ x y ] {\displaystyle {\begin{bmatrix}x\\y\end{bmatrix}}} and [ x y ] {\displaystyle {\begin{bmatrix}x'\\y'\end{bmatrix}}} 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

z = x + i y {\displaystyle z=x+iy}

This can be rotated through an angle θ by multiplying it by e, then expanding the product using Euler's formula as follows:

e i θ z = ( cos θ + i sin θ ) ( x + i y ) = x cos θ + i y cos θ + i x sin θ y sin θ = ( x cos θ y sin θ ) + i ( x sin θ + y cos θ ) = x + i y , {\displaystyle {\begin{aligned}e^{i\theta }z&=(\cos \theta +i\sin \theta )(x+iy)\\&=x\cos \theta +iy\cos \theta +ix\sin \theta -y\sin \theta \\&=(x\cos \theta -y\sin \theta )+i(x\sin \theta +y\cos \theta )\\&=x'+iy',\end{aligned}}}

and equating real and imaginary parts gives the same result as a two-dimensional matrix:

x = x cos θ y sin θ y = x sin θ + y cos θ . {\displaystyle {\begin{aligned}x'&=x\cos \theta -y\sin \theta \\y'&=x\sin \theta +y\cos \theta .\end{aligned}}}

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

A counterclockwise rotation of a vector through angle θ. The vector is initially aligned with the x-axis. source ↗

In two dimensions, the standard rotation matrix has the following form: R ( θ ) = [ cos θ sin θ sin θ cos θ ] . {\displaystyle R(\theta )={\begin{bmatrix}\cos \theta &-\sin \theta \\\sin \theta &\cos \theta \\\end{bmatrix}}.}

This rotates column vectors by means of the following matrix multiplication, [ x y ] = [ cos θ sin θ sin θ cos θ ] [ x y ] . {\displaystyle {\begin{bmatrix}x'\\y'\\\end{bmatrix}}={\begin{bmatrix}\cos \theta &-\sin \theta \\\sin \theta &\cos \theta \\\end{bmatrix}}{\begin{bmatrix}x\\y\\\end{bmatrix}}.}

Thus, the new coordinates (x′, y′) of a point (x, y) after rotation are x = x cos θ y sin θ y = x sin θ + y cos θ . {\displaystyle {\begin{aligned}x'&=x\cos \theta -y\sin \theta \,\\y'&=x\sin \theta +y\cos \theta \,\end{aligned}}.}

Examples

For example, when the vector (initially aligned with the x-axis of the Cartesian coordinate system) x ^ = [ 1 0 ] {\displaystyle \mathbf {\hat {x}} ={\begin{bmatrix}1\\0\\\end{bmatrix}}} is rotated by an angle θ, its new coordinates are [ cos θ sin θ ] , {\displaystyle {\begin{bmatrix}\cos \theta \\\sin \theta \\\end{bmatrix}},}

and when the vector (initially aligned with the y-axis of the coordinate system) y ^ = [ 0 1 ] {\displaystyle \mathbf {\hat {y}} ={\begin{bmatrix}0\\1\\\end{bmatrix}}} is rotated by an angle θ, its new coordinates are [ sin θ cos θ ] . {\displaystyle {\begin{bmatrix}-\sin \theta \\\cos \theta \\\end{bmatrix}}.}

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 R ( θ ) {\displaystyle R(\theta )} . Thus the clockwise rotation matrix is found as (by replacing θ with and using the trigonometric symmetry of sin ( θ ) = sin ( θ ) {\textstyle \sin(-\theta )=-\sin(\theta )} and cos ( θ ) = cos ( θ ) {\textstyle \cos(-\theta )=\cos(\theta )} ) R ( θ ) = [ cos θ sin θ sin θ cos θ ] . {\displaystyle R(-\theta )={\begin{bmatrix}\cos \theta &\sin \theta \\-\sin \theta &\cos \theta \\\end{bmatrix}}.}

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

A rotation through angle θ with non-standard axes. source ↗

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 [ 1 0 0 1 ] , [ 0 1 1 0 ] , [ 1 0 0 1 ] , [ 0 1 1 0 ] {\displaystyle {\begin{bmatrix}1&0\\[3pt]0&1\\\end{bmatrix}},\quad {\begin{bmatrix}0&-1\\[3pt]1&0\\\end{bmatrix}},\quad {\begin{bmatrix}-1&0\\[3pt]0&-1\\\end{bmatrix}},\quad {\begin{bmatrix}0&1\\[3pt]-1&0\\\end{bmatrix}}} 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 [ x y y x ] {\displaystyle {\begin{bmatrix}x&-y\\y&x\end{bmatrix}}} form a ring, since their set is closed under addition and multiplication. Since [ 0 1 1 0 ] 2   =   [ 1 0 0 1 ]   = I {\displaystyle {\begin{bmatrix}0&-1\\1&0\end{bmatrix}}^{2}\ =\ {\begin{bmatrix}-1&0\\0&-1\end{bmatrix}}\ =-I} (where I {\textstyle I} is the identity matrix), the map [ x y y x ] = x [ 1 0 0 1 ] + y [ 0 1 1 0 ] x + i y {\displaystyle {\begin{bmatrix}x&-y\\y&x\end{bmatrix}}=x{\begin{bmatrix}1&0\\0&1\end{bmatrix}}+y{\begin{bmatrix}0&-1\\1&0\end{bmatrix}}\mapsto x+iy} (where [ 0 1 1 0 ] {\displaystyle {\begin{bmatrix}0&-1\\1&0\end{bmatrix}}} corresponds to i {\displaystyle i} ) is a ring isomorphism from this ring to the field of the complex numbers C {\displaystyle \mathbb {C} } (incidentally, this shows that this ring is a field). Under this isomorphism, the rotation matrices [ cos t sin t sin t cos t ] = cos t [ 1 0 0 1 ] + sin t [ 0 1 1 0 ] {\displaystyle {\begin{bmatrix}\cos t&-\sin t\\\sin t&\cos t\\\end{bmatrix}}=\cos t{\begin{bmatrix}1&0\\0&1\end{bmatrix}}+\sin t{\begin{bmatrix}0&-1\\1&0\end{bmatrix}}} correspond to the circle of the unit complex numbers, the complex numbers of modulus 1, since cos t 2 + sin t 2 = 1 {\displaystyle \cos t^{2}+\sin t^{2}=1} . As a result, the following equality holds, e i t = cos t + i sin t = cos t [ 1 0 0 1 ] + sin t [ 0 1 1 0 ] = ( cos t sin t sin t cos t ) {\displaystyle e^{it}=\cos t+i\sin t=\cos t{\begin{bmatrix}1&0\\0&1\end{bmatrix}}+\sin t{\begin{bmatrix}0&-1\\1&0\end{bmatrix}}={\begin{pmatrix}\cos t&-\sin t\\\sin t&\cos t\end{pmatrix}}} where the first equality is Euler's formula, the matrix I = [ 1 0 0 1 ] {\displaystyle I={\begin{bmatrix}1&0\\0&1\end{bmatrix}}} corresponds to 1, and the matrix [ 0 1 1 0 ] {\displaystyle {\begin{bmatrix}0&-1\\1&0\end{bmatrix}}} corresponds to the imaginary unit i {\textstyle i} .

If one identifies R 2 {\displaystyle \mathbb {R} ^{2}} with C {\displaystyle \mathbb {C} } through the linear isomorphism ( a , b ) a + i b {\displaystyle (a,b)\mapsto a+ib} , where ( a , b ) R 2 {\displaystyle (a,b)\in \mathbb {R} ^{2}} and a + i b C {\displaystyle a+ib\in \mathbb {C} } , the action of a matrix [ x y y x ] {\displaystyle {\begin{bmatrix}x&-y\\y&x\end{bmatrix}}} on a vector ( a , b ) {\displaystyle (a,b)} corresponds to multiplication on the complex number a + i b {\displaystyle a+ib} 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

  1. Lounesto 2001, p. 30.
  2. Swokowski, Earl (1979). Calculus with Analytic Geometry (Second ed.). Boston: Prindle, Weber, and Schmidt. ISBN 0-87150-268-2.
  3. "Scalable Vector Graphics – the initial coordinate system". W3C. 2003.