Coordinate Rotation Calculator

Rotate a point around the origin using the 2D rotation matrix. See original and rotated coordinates with step-by-step solution.

Enter Point & Rotation Angle

Rotation Matrix R(θ)
0
-1
1
0

Result

Original Point
(3, 4)
Rotated Point
(-4, 3)
Rotated Coordinates
(-4, 3)
rotated 90° CCW
x' (new x)--
y' (new y)--
Original Distance from Origin--
Rotated Distance from Origin--
Original Angle from +x axis--
New Angle from +x axis--
x' = x*cosθ - y*sinθ, y' = x*sinθ + y*cosθ

Step-by-Step Solution

What Is Coordinate Rotation?

Coordinate rotation transforms a point's position by rotating it around the origin by a specified angle. The new coordinates are calculated using the 2D rotation matrix, which preserves the point's distance from the origin while changing its angular position.

The standard rotation formulas (counterclockwise by angle θ) are:

  • x' = x · cos(θ) - y · sin(θ)
  • y' = x · sin(θ) + y · cos(θ)

The Rotation Matrix

The 2D rotation matrix for an angle θ counterclockwise is:

R(θ) = [ [cosθ, -sinθ], [sinθ, cosθ] ]

When you multiply this matrix by a coordinate vector [x, y], you get the rotated point [x', y']. This is a linear transformation that preserves distances and angles.

Common Rotation Angles

90° Rotation

Rotates a quarter turn. cos(90°) = 0, sin(90°) = 1.

(x, y) → (-y, x)

180° Rotation

Half turn. cos(180°) = -1, sin(180°) = 0.

(x, y) → (-x, -y)

270° Rotation

Three-quarter turn. cos(270°) = 0, sin(270°) = -1.

(x, y) → (y, -x)

45° Rotation

Eighth turn. cos(45°) = sin(45°) = sqrt(2)/2.

(x,y) → ((x-y)/sqrt(2), (x+y)/sqrt(2))

Clockwise vs. Counterclockwise

The standard convention in mathematics uses counterclockwise (CCW) as the positive rotation direction. A clockwise rotation by angle θ is equivalent to a counterclockwise rotation by -θ, which changes the signs of the sine terms in the rotation matrix.

Key Properties of Rotation

  • Distance preservation: The distance from the origin remains the same after rotation.
  • Angle addition: Rotating by α then by β is the same as rotating by α + β.
  • Inverse: The inverse of a rotation by θ is a rotation by -θ.
  • Determinant: The rotation matrix always has determinant 1 (area is preserved).

Applications

  • Computer Graphics: Rotating sprites, 3D models, and UI elements.
  • Robotics: Joint angle calculations and coordinate frame transformations.
  • Physics: Transforming between reference frames, analyzing circular motion.
  • Navigation: Converting between compass bearings and map coordinates.
  • Image Processing: Rotating images by arbitrary angles.