Rotation Calculator
Our free coordinate geometry calculator solves rotation problems. Get worked examples, visual aids, and downloadable results.
Formula
x' = cos(a)(x-cx) - sin(a)(y-cy) + cx | y' = sin(a)(x-cx) + cos(a)(y-cy) + cy
To rotate point (x, y) around center (cx, cy) by angle a: translate to origin, apply rotation matrix multiplication, then translate back. Positive angles rotate counterclockwise.
Worked Examples
Example 1: 90-Degree Rotation Around Origin
Problem: Rotate the point (3, 4) by 90 degrees counterclockwise around the origin.
Solution: Center: (0, 0), Angle: 90 degrees\nUsing standard rotation:\nnew_x = cos(90)*(3) - sin(90)*(4) = 0*3 - 1*4 = -4\nnew_y = sin(90)*(3) + cos(90)*(4) = 1*3 + 0*4 = 3\nOriginal distance from origin: sqrt(9 + 16) = 5\nNew distance from origin: sqrt(16 + 9) = 5 (preserved)
Result: Rotated Point: (-4, 3) | Distance preserved: 5
Example 2: 45-Degree Rotation Around a Custom Center
Problem: Rotate point (5, 2) by 45 degrees around center (1, 1).
Solution: Translate: (5-1, 2-1) = (4, 1)\ncos(45) = 0.7071, sin(45) = 0.7071\nnew_x = 0.7071*4 - 0.7071*1 = 2.1213\nnew_y = 0.7071*4 + 0.7071*1 = 3.5355\nTranslate back: (2.1213 + 1, 3.5355 + 1) = (3.1213, 4.5355)\nRadius = sqrt(16 + 1) = 4.1231
Result: Rotated Point: (3.1213, 4.5355) | Radius: 4.1231
Frequently Asked Questions
What is the rotation matrix and how is it used?
The 2D rotation matrix is a 2x2 matrix R = [[cos(theta), -sin(theta)], [sin(theta), cos(theta)]] that transforms coordinates when multiplied by a column vector [x, y]. This matrix has special properties: its determinant is always 1, its transpose equals its inverse, and it preserves vector lengths and angles between vectors. In linear algebra, rotation matrices belong to the special orthogonal group SO(2). Multiplying two rotation matrices gives another rotation matrix whose angle is the sum of the individual angles. In 3D, rotation matrices are 3x3 and can represent rotations around any of the three coordinate axes or an arbitrary axis through the origin.
What is the difference between clockwise and counterclockwise rotation?
In standard mathematical convention, counterclockwise (CCW) rotation is considered positive and clockwise (CW) rotation is negative. A 90-degree CCW rotation is the same as a -90-degree (or equivalently 270-degree) CW rotation. The direction matters when applying the rotation formulas: using a positive angle gives CCW rotation, while a negative angle gives CW rotation. In some applications like computer screens (where the y-axis points downward), the visual direction may appear reversed. Navigation and compass bearings typically measure angles clockwise from north, which is opposite to the mathematical convention. Always clarify the convention being used to avoid errors.
How do I get the most accurate result?
Enter values as precisely as possible using the correct units for each field. Check that you have selected the right unit (e.g. kilograms vs pounds, meters vs feet) before calculating. Rounding inputs early can reduce output precision.
Can I use the results for professional or academic purposes?
You may use the results for reference and educational purposes. For professional reports, academic papers, or critical decisions, we recommend verifying outputs against peer-reviewed sources or consulting a qualified expert in the relevant field.
How accurate are the results from Rotation Calculator?
All calculations use established mathematical formulas and are performed with high-precision arithmetic. Results are accurate to the precision shown. For critical decisions in finance, medicine, or engineering, always verify results with a qualified professional.
Is my data stored or sent to a server?
No. All calculations run entirely in your browser using JavaScript. No data you enter is ever transmitted to any server or stored anywhere. Your inputs remain completely private.