Summarize this article:
109 LearnersLast updated on November 25, 2025

A rotation matrix is a special type of matrix used to rotate vectors in Euclidean space. It preserves the size and the shape of the object by preserving distances and angles, but changes its orientation in space. In this article, we’ll explore the rotation matrices in detail, including their properties, types, and applications.
A rotation matrix is a special type of matrix used to rotate vectors in Euclidean space. It preserves the size and the shape of the object by preserving distances and angles, but changes its orientation in space.
In this article, we’ll explore the rotation matrices in detail, including their properties, types, and applications.
A rotation matrix is a square matrix used to perform a rotation transformation in Euclidean space. It rotates vectors around the origin without changing their length or the angles between them.
Mathematically, a rotation matrix is an orthogonal matrix with a determinant of 1.
The rotation matrix has several important properties that make them ideal for rotating objects or vectors in 2D and 3D space without changing their dimensions. Here are a few basic attributes:
Rotating objects is a common task in math, science, and computer graphics. There are several standard methods for representing rotations, each suited to different levels of complexity and application requirements. Below are the most common ways to represent rotation in 2D and 3D.
A 2D rotation matrix is used to rotate a point or shape in a two-dimensional plane. A 2×2 rotation matrix takes the following form:
\(\begin{bmatrix} \cos\theta & -\sin\theta \\\end{bmatrix} \)
\( R(\theta) = \begin{bmatrix} \sin\theta & \cos\theta \end{bmatrix} \)
We can rotate a 2D vector (x, y) by multiplying it with a 2×2 rotation matrix, as shown below:
\( \begin{bmatrix} x' \\[6pt] y' \end{bmatrix} = \begin{bmatrix} \cos\theta & -\sin\theta \\[6pt] \sin\theta & \cos\theta \end{bmatrix} \begin{bmatrix} x \\[6pt] y \end{bmatrix} \)
x' = xcos(θ) - ysin(θ).
y' = xsin(θ) + ycos(θ).
Here, θ is the angle of rotation in the clockwise direction.
A 2D rotation matrix is a special type of square matrix used to rotate the points or vectors in a two-dimensional plane around the origin by a given angle θ.
The standard form of a 2D rotation matrix is:
\( R(\theta) = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix} \)
In 3D geometry, a rotation matrix is used to rotate a vector around one of the axes (x, y, or z). For example, rotating a vector around the z-axis by an angle is done using the following rotation matrix:
\( R = \begin{bmatrix} \cos\theta & -\sin\theta & 0 \\[6pt] \sin\theta & \cos\theta & 0 \\[6pt] 0 & 0 & 1 \end{bmatrix} \)
Similarly, rotations about the x-axis and y-axis have their corresponding matrices.
3D rotation works on the same principle as 2D rotation, but since it involves three dimensions, we use a 3 × 3 rotation matrix instead of a 2 × 2. Each 3D rotation occurs around one of the principal axes, that is, x, y, or z, and each axis has its specific rotation matrix.
When rotating about an axis, it acts as a 2D rotation in the plane perpendicular to that axis. For example, when you rotate a point (x, y, z) around the x-axis, the x value stays the same because the point is turning around that axis. Only the y and z values change, like spinning in a flat circle in the y–z plane. This kind of rotation can be done using a special grid of numbers called a rotation matrix. For the x-axis, the matrix looks like this:
\( R = \begin{bmatrix} 1 & 0 & 0 \\[6pt] 0 & \cos\theta & -\sin\theta \\[6pt] 0 & \sin\theta & \cos\theta \end{bmatrix} \)
In a rotation matrix, we use 90rotation, which is a type of rotation. It helps to rotate the object by 90 degrees in clockwise and anticlockwise directions, in 2D and 3D.
Rotation Matrix 90 Degrees 2D
\( R(\theta) = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix} \)
\( R_{(90^\circ)} = \begin{bmatrix} 0 & -1 \\ 1 & 1 \end{bmatrix} \)
Rotation Matrix 90 Degrees 3D
\( R = \begin{bmatrix} 1 & 0 & 0 \\[6pt] 0 & \cos\theta & -\sin\theta \\[6pt] 0 & \sin\theta & \cos\theta \end{bmatrix} \)
If a vector is rotated counterclockwise, the angle θ is considered positive. If it’s rotated clockwise, the angle is taken as negative, −θ. The positive or negative sign of the angle simply indicates the direction of rotation.
Rotation Matrix Clockwise in 2D
\( R(\theta) = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix} \)
The clockwise rotation matrix in 2D is as follows:
\( R(-\theta) = \begin{bmatrix} \cos\theta(-0) & -\sin\theta (-0)\\ \sin\theta (-0) & \cos\theta (-0) \end{bmatrix} \)
The clockwise rotation matrix in 3D is as follows:
\( R = \begin{bmatrix} 1 & 0 & 0 \\[6pt] 0 & \cos\theta & \sin\theta \\[6pt] 0 & -\sin\theta & \cos\theta \end{bmatrix} \)
We can turn or rotate objects in space with the help of rotation matrices. They are widely used in technologies like 3D animation, robotics, video games, and aircraft navigation systems. Learning how rotation matrices work helps us understand how math is used in the technology we use every day. Here are some real-life applications we see or use in our daily lives:
Rotate the point P = (2,1) by 90° counterclockwise about the origin.
(−1,2)
Use the 2D rotation matrix
For rotation by angle θ=90°
\( R = \begin{bmatrix} \cos(90^\circ) & -\sin(90^\circ) \\[6pt] \sin(90^\circ) & \cos(90^\circ) \end{bmatrix} \)
\( R(90^\circ) = \begin{bmatrix} 0 & -1 \\[6pt] 1 & 0 \end{bmatrix} \)
Write the point as a column vector
\( P = \begin{bmatrix} 2 \\[6pt] 1 \end{bmatrix} \)
Multiply
\( R.P= \begin{bmatrix} 0 & -1 \\[6pt] 1 & 1 \end{bmatrix} \begin{bmatrix} 2 \\[6pt] 1 \end{bmatrix} \)
The rotated point is (−1,2).
Rotate P = (1,0) by 45° clockwise (that’s –45°).
(√2/2, -2/2)
Rotation matrix for -45°
\( R = \begin{bmatrix} \cos(-45^\circ) & -\sin(45^\circ) \\[6pt] \sin(45^\circ) & \cos(45^\circ) \end{bmatrix} \)
Rotate 3D point (1, 2, 3) by 90° around the x-axis
(1, −3, 2)
Rotation Matrix for x-axis (90°):
\( R(90^\circ) = \begin{bmatrix} 1 & 0 & 0 \\[6pt] 0 & 0 & -1 \\[6pt] 0 & 1 & 0 \end{bmatrix} \)
The product of R × P is
\( R P = \begin{bmatrix} 1 \cdot 1 + 0 \cdot 2 + 0 \cdot 3 \\ 0 \cdot 1 + 0 \cdot 2 + (-1) \cdot 3 \\ 0 \cdot 1 + 1 \cdot 2 + 0 \cdot 3 \end{bmatrix} = \begin{bmatrix} 1 \\[6pt] -3 \\[6pt] 2 \end{bmatrix} \)
Rotate the point (1, 0) by 45° counterclockwise.
(sqrt(2)/2, sqrt(2)/2)
Use the 2D Rotation Matrix for 45°
= 45°, cos45° = sin45° = 22
\( R(45^\circ) =\begin{bmatrix} \dfrac{\sqrt{2}}{2} & -\dfrac{\sqrt{2}}{2} \\[8pt] \dfrac{\sqrt{2}}{2} & \dfrac{\sqrt{2}}{2} \end{bmatrix} \)
Write the point as a column vector
\( P = \begin{bmatrix} 1 \\[6pt] 0 \end{bmatrix} \)
Multiply the matrix and the vector
\( \begin{bmatrix} \dfrac{\sqrt{2}}{2} & -\dfrac{\sqrt{2}}{2} \\[8pt] \dfrac{\sqrt{2}}{2} & \dfrac{\sqrt{2}}{2} \end{bmatrix} \begin{bmatrix} 0 \\[6pt] 1 \end{bmatrix} \)
R P \(= \begin{bmatrix} -\dfrac{\sqrt{2}}{2} \\[8pt] \dfrac{\sqrt{2}}{2} \end{bmatrix} \)
Rotate the point (0, 1) by 180°
(0, –1)
Rotation Matrix for 180°
\( R = \begin{bmatrix} \cos(180^\circ) & -\sin(180^\circ) \\[6pt] \sin(180^\circ) & \cos(180^\circ) \end{bmatrix} \)
\( \begin{bmatrix} -1 & 0 \end{bmatrix} \)
\( R= \begin{bmatrix} 0 & 1 \end{bmatrix} \)
Write the point as a column vector
\( P = \begin{bmatrix} 0 \\[6pt] 1 \end{bmatrix} \)
Multiply
\( R \cdot P = \begin{bmatrix} -1 & 0 \\[6pt] 0 & -1 \end{bmatrix} \begin{bmatrix} 0 \\[6pt] 1 \end{bmatrix} = \begin{bmatrix} 0 \\[6pt] -1 \end{bmatrix} \)
Jaskaran Singh Saluja is a math wizard with nearly three years of experience as a math teacher. His expertise is in algebra, so he can make algebra classes interesting by turning tricky equations into simple puzzles.
: He loves to play the quiz with kids through algebra to make kids love it.






