Rotation (mathematics)
Two dimensions

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 {\displaystyle {\begin{bmatrix}x\\y\end{bmatrix}}} and {\displaystyle {\begin{bmatrix}x'\\y'\end{bmatrix}}} have the same magnitude and are separated by an angle θ as expected.

Points on the R 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 e, 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.
detectable_content:postscript