Rotation Matrix in 2D & 3D – Derivation, Properties & Solved Examples

Last Updated on Jun 06, 2025
Download As PDF
IMPORTANT LINKS

A rotation matrix is a transformation matrix that is used to perform a rotation in Euclidean space. Geometry provides us with 4 types of transformations, namely, rotation, reflection, translation, and resizing. Furthermore, a transformation matrix uses the process of matrix multiplication to transform one vector into another. A matrix is a collection of numbers represented in the form of rows and columns. There are numerous types of matrices like row matrix, column matrix, rectangular matrix, diagonal matrix, zero matrix or null matrix, identity matrix, upper and lower triangular matrix, etc.

What is a Rotation Matrix?

A rotation matrix can be defined as a transformation matrix that operates on a vector and produces a rotated vector such that the coordinate axes always remain fixed. A rotation matrix is a transformation matrix that is used to perform a rotation in Euclidean space.


Maths Notes Free PDFs
Topic PDF Link
General and Middle Term in Binomial Free Notes PDF Download PDF
Circle Study Notes Download PDF
Tangents and Normal to Conics Download PDF
Increasing and Decreasing Function in Maths Download PDF
Wheatstone Bridge Notes Download PDF
Alternating Current Notes Download PDF
Friction in Physics Download PDF
Drift Velocity Notes Download PDF
Chemical Equilibrium Notes Download PDF
Quantum Number in Chemistry Notes Download PDF

Forexample,thematrix rotates the points in the xy-cartesian plane counterclockwise through an angle about the origin of the Cartesian coordinate system.

A rotation matrix is always a square matrix with real entries. This implies that the rotation matrix will always have an equal number of rows and columns. Moreover, rotation matrices are orthogonal matrices with a determinant equal to1.

Consider a square matrix R. ThenR is said to be rotation matrix if and only if:

  • , and
  • .

Rotation Matrix Example

Consider a square matrix of order ,

Now, we have

Hence, .

Now, .

Thus, is a rotation matrix and we see that rotates the cartesian coordinates in an anticlockwise direction through with respect to the -axis in a system.

Test Series
130.3k Students
NCERT XI-XII Physics Foundation Pack Mock Test
323 TOTAL TESTS | 5 Free Tests
  • 3 Live Test
  • 163 Class XI Chapter Tests
  • 157 Class XII Chapter Tests

Get Started

Rotation Matrix in 2D

In two dimensions every rotation matrix has the following form:

This rotates the column vector by means of the following matrix multiplication:

So the coordinates of the point after the rotation are:

,

.

The direction of vector rotation is counterclockwise if is positive (e.g. ), and clockwise if is negative (e.g. ).

Common rotation matrix in 2D is given below:

  • ( counterclockwise rotation).
  • ( in either direction – a half-turn).
  • ( counterclockwise rotation, the same as a clockwise rotation).

Rotation Matrix in 2D Derivation

Consider a coordinate system (-axis and -axis) in two-dimensional space. Draw the vector that we are going to rotate. Here the vector has a magnitude of and makes an angle with the -axis.

Using the above information, we have

Using the above information, we have

Now, rotate the vector over an angle , we get the vector . This vector has also and components, which we call and . The vector makes an angle with the -axis.

Similarly, we have
x′ = r′ cos(α + β)
y′ = r′ sin(α + β)

Now, find an expression for x′ and y′ in terms of x and y.

Using the trigonometry identities, we have

cos(α + β) = cos(α)cos(β) − sin(α)sin(β)
sin(α + β) = cos(α)sin(β) + sin(α)cos(β)

Also by rotating the vector we did not change its magnitude, so r = r′.

Now using the above information, we have
x′ = r cos(α)cos(β) − r sin(α)sin(β)
y′ = r cos(α)sin(β) + r sin(α)cos(β)

Simplify the above expressions using x = r cos(α), y = r sin(α), we get
x′ = x cos(β) − y sin(β)
y′ = x sin(β) + y cos(β)

We can see that the x′ and y′ (components of rotated vector) can be written as a function of the initial vector x and y, and then these vectors which incorporate the angle β over which we rotated our initial vector.

Now, this transformation can now be written in matrix form, we have

.

Here, the matrix is c

Rotation Matrix in 3D

In three dimensions, the three basic rotation matrices rotate the vector about the x, y and z axis are given below:

In three dimensions, the three basic rotation matrices rotate the vector about the , and axis are given below:

, this rotation matrix is called a roll. It is defined as the counterclockwise rotation of about the -axis.

, this rotation matrix is called a pitch. It is defined as the counterclockwise rotation of about the -axis.

, his rotation matrix is called a yaw. It is defined as the counterclockwise rotation of about the -axis.

Each of these basic vector rotations typically appears counter-clockwise when the axis about which they occur points toward the observer, and the coordinate system is right-handed. , for instance, would rotate toward the -axis a vector aligned with the -axis. This is similar to the rotation produced by the above mentioned 2D rotation matrix.

A general rotation matrix in 3D can be obtained from these three using matrix multiplication. For example,

  • The product , represents a rotation matrix in 3D whose yaw, pitch and roll are , , and .
  • The product , represents a rotation matrix in 3D whose Euler angles are , , and (using the convention for Euler angles).

Note: If we want to find the new coordinates of a vector after rotation about a particular axis we follow the formula given below:

.

Rotation Matrix in 3D Derivation

3D rotation is very similar to 2D rotation except that of course we need an extra dimension. But since we’re rotating around a fixed axis, it behaves exactly like the 2D case with one of the dimensions ignored.

To derive the , , and rotation matrices, we will follow the steps similar to the derivation of the 2D rotation matrix. A 3D rotation is defined by an angle and the rotation axis.

Consider we move a point given by the coordinates about the -axis to a new position given by . The component of the point remains the same. Hence, this rotation is analogous to a 2D rotation in the plane. From this our rotation matrix is given by

Similarly, the same concept is applied to the rotation of the object about the and axes in order to obtain the respective rotation matrices.

Rotation Matrix 90 Degrees

In 2D every rotation matrix has the following form:

In 2D every rotation matrix has the following form:

.

Then the rotation matrix with an angle is given as:

.

Similarly, we can find the rotation matrices in 3D with an angle as given below:

.

.

.

Clockwise Rotation Matrix

If we rotate a vector in the counterclockwise direction then its angle, , is positive. However, if the vector is rotated in the clockwise direction then the angle will be negative, . We use the negative and positive signs as a means of indicating the direction of rotation.

The counterclockwise rotation matrix in 2D is given as:

.

Thus, the clockwise rotation matrix in 2D is as follows:

.

Similarly, we can find the clockwise rotation matrices in 3D as given below:

.

.

.

Representation of Rotations in Mathematics

In mathematics, rotation means turning a shape or object around a fixed point or axis. There are a few ways to show or represent these rotations depending on the situation:

  1. Rotation Matrices:
    This is the most common method. A rotation matrix is a special kind of grid (or table) of numbers that can turn a point or shape around a specific axis. It’s easy to use in calculations, especially in 2D or 3D geometry.
  2. Quaternions:
    Quaternions are a more advanced method used mostly in 3D. They include four numbers and are very useful in computer graphics and robotics. One big advantage of quaternions is that they help avoid a problem called gimbal lock (which can limit movement when using other methods).
  3. Euler Angles:
    Euler angles use three separate angles to describe a rotation—each one showing a turn around the X, Y, or Z axis. They’re simple to understand but can sometimes cause issues like gimbal lock, especially in 3D animations or simulations.

Properties of Rotation Matrix

Some of the important properties of rotation matrix that are applicable to both 2D and 3D rotation matrix are listed below:

  • A rotation matrix is always an orthogonal matrix. Thus, the transpose of the matrix will be equal to the inverse of the matrix.
  • A rotation matrix will always be a square matrix.
  • The determinant of rotation matrices will always be equal to 1.
  • Multiplication of rotation matrices will give a rotation matrix.
  • If we take the cross product of two rows of a rotation matrix it will be equal to the third.
  • The dot product of a row with a column of a rotation matrix will be equal to 1.

Applications of Rotation Matrix

There are a few applications of rotation matrix which are listed below:

  • Rotation matrices are used for computations in aerospace, image processing, and other technical computing applications.
  • Rotation matrices describe the rotation of an object or a vector in a fixed coordinate system. These matrices are widely used to perform computations in physics, geometry, and engineering.

Important Notes on Rotation Matrix
  • What It Does:
    A rotation matrix is used to turn (or rotate) a vector, while keeping the original position of the coordinate axes unchanged.
     

2.2D Rotation (Counterclockwise):
The formula for rotating in 2D (like on a flat surface) in a counterclockwise direction is:

[ cos(θ) -sin(θ) ]

[ sin(θ) cos(θ) ]

  •  Here, θ is the angle of rotation.
     
  • 3D Rotation Axes:
    In 3D (three-dimensional) space:
     
      • Rotation around the z-axis is called yaw
         
      • Rotation around the y-axis is called pitch
         
      • Rotation around the x-axis is called roll
         
  • Clockwise Rotation:
    If you want to rotate clockwise, simply use –θ (a negative angle) in the rotation formula.

     
  • Special Properties:
     
    • The transpose of a rotation matrix is the same as its inverse.
    • The determinant of any rotation matrix is always 1.

Solved Problems on the Rotation Matrix

Example 1: If C is rotated in the counterclockwise direction by about the -axis, what are the coordinate values?

Solution:We,knowthat,

Given:,

Substitute the given condition in the above equation, we get

Thus the coordinate values are .

Example 2: Rotate the point (2, 2) by 180° counterclockwise

The rotation matrix for 180° is:

[ -1 0 ]

[ 0 -1 ]

Now multiply it with (2, 2):

[ -1 0 ] [2] = [ -2 ]

[ 0 -1 ] [2] [ -2 ]

Final Answer: (-2, -2)

Example 3: Rotate the point (3, 4) by 270° clockwise

270° clockwise is the same as 90° counterclockwise.

Use the matrix:

[ 0 -1 ]

[ 1 0 ]

Now multiply it with (3, 4):

[ 0 -1 ] [3] = [ -4 ]

[ 1 0 ] [4] [ 3 ]

 Final Answer: (-4, 3)

If you are checking Rotation Matrix article, also check the related maths articles:

Involutory Matrix

Orthogonal Matrix

Inverse of Matrix

Matrix Operations

Triangular Matrix

Cofactor Matrix

We hope that the above article is helpful for your understanding and exam preparations. Stay tuned to the Testbook App for more updates on related topics from Mathematics, and various such subjects. Also, reach out to the test series available to examine your knowledge regarding several exams. For better practice, solve the below provided previous year papers and mock tests for each of the given entrance exam:

Important Links
NEET Exam
NEET Previous Year Question Papers NEET Mock Test NEET Syllabus
CUET Exam
CUET Previous Year Question Papers CUET Mock Test CUET Syllabus
JEE Main Exam
JEE Main Previous Year Question Papers JEE Main Mock Test JEE Main Syllabus
JEE Advanced Exam
JEE Advanced Previous Year Question Papers JEE Advanced Mock Test JEE Advanced Syllabus
More Articles for Maths

FAQs For Rotation Matrix

Yes, a rotation matrix is invertible. The transpose of a rotation matrix will be equal to its inverse. This is because all rotation matrices are orthogonal matrices.

If you want to rotate a vector given by by 90 degrees in the counterclockwise direction using the rotation matrix then the new coordinates are given as .

A square matrix is called rotation matrix if and only if , and .

A rotation matrix can be defined as a transformation matrix that operates on a vector and produces a rotated vector such that the coordinate axes always remain fixed. Or in other words, a rotation matrix is a transformation matrix that is used to perform a rotation in Euclidean space.

The properties of rotation matrix are listed below: A rotation matrix is always an orthogonal matrix. A rotation matrix will always be a square matrix. The determinant of rotation matrices will always be equal to 1. Multiplication of rotation matrices will give a rotation matrix.

Yes! In 3D, rotation matrices rotate points around the x-axis, y-axis, or z-axis. Each axis has its own rotation matrix.

Yes, rotation matrices are always square (same number of rows and columns). A 2D rotation matrix is 2×2, and a 3D one is 3×3.

Report An Error