Search Authority

How to Rotate a Point 90 Degrees: Simple Steps & Formulas

Rotating a point 90 degrees is a foundational operation in geometry, computer graphics, and game development. Whether you are working in two dimensions or extending to three dim...

Mara Ellison
How to Rotate a Point 90 Degrees: Simple Steps & Formulas

Rotating a point 90 degrees is a foundational operation in geometry, computer graphics, and game development. Whether you are working in two dimensions or extending to three dimensions, understanding the coordinate rules helps you control orientation and direction precisely.

This guide explains the standard 90 degree rotation around the origin and shows how to apply it in practical contexts with clear formulas and examples.

Angle Axis Formula (x, y) Result (x, y)
90° counterclockwise Z (out of plane) (x, y) → (-y, x) (2, 3) → (-3, 2)
90° clockwise Z (out of plane) (x, y) → (y, -x) (2, 3) → (3, -2)
90° counterclockwise X in 3D (around X) (x, y, z) → (x, -z, y) (1, 2, 3) → (1, -3, 2)
90° clockwise X in 3D (around X) (x, y, z) → (x, z, -y) (1, 2, 3) → (1, 3, -2)
90° counterclockwise Y in 3D (around Y) (x, y, z) → (z, y, -x) (1, 2, 3) → (3, 2, -1)

2D Rotation Rules Around The Origin

In a standard 2D coordinate plane, rotating a point 90 degrees around the origin follows concise coordinate mapping rules. These rules assume counterclockwise rotation is positive unless stated otherwise.

Counterclockwise 90 Degree Mapping

For a counterclockwise turn of 90 degrees, the new coordinates are derived by negating the original y value for x, and using the original x value for y. This mapping is easy to remember and quick to apply in code or on paper.

Clockwise 90 Degree Mapping

For a clockwise rotation of 90 degrees, you swap the coordinates and adjust signs so that x becomes the original y with negated x for the new y. This rule mirrors the counterclockwise version but in the opposite direction.

Applying The Formulas With Examples

Concrete examples help you see how the abstract formulas translate into actual coordinate changes. By walking through sample points, you can verify your understanding before using the rules in complex systems.

Example 1: Counterclockwise Rotation

Rotating the point (4, 7) counterclockwise by 90 degrees around the origin results in (-7, 4). The negative of the original y becomes the new x, and the original x becomes the new y.

Example 2: Clockwise Rotation

Rotating the same point (4, 7) clockwise by 90 degrees yields (7, -4). Here the original y becomes the new x, and the original x is negated to become the new y.

Rotation In Three Dimensions

Three dimensional rotations require specifying an axis, because turning around different axes changes different pairs of coordinates while leaving one coordinate unchanged.

Rotation Around The X Axis

When rotating 90 degrees around the X axis, the x coordinate remains constant while y and z swap with a sign adjustment. A 90 degree counterclockwise rotation around X maps (x, y, z) to (x, -z, y).

Rotation Around The Y Axis

Rotation around the Y axis affects the x and z coordinates. A 90 degree counterclockwise turn around Y maps (x, y, z) to (z, y, -x), preserving the y value throughout the turn.

Rotation Around The Z Axis

The Z axis rotation corresponds to the 2D case, since Z points out of the plane. A 90 degree counterclockwise rotation around Z maps (x, y, z) to (-y, x, z), keeping the height unchanged.

Practical Tips For Using 90 Degree Rotations

  • Always confirm whether positive rotation is defined as counterclockwise in your context, especially in graphics APIs.
  • Use the appropriate 2D or 3D rule depending on whether your data has a z coordinate.
  • Test with simple points like (1, 0) and (0, 1) to verify that your implementation matches the expected geometry.
  • When rotating around an arbitrary center, translate the system so that the center becomes the origin, apply rotation, then translate back.

FAQ

Reader questions

How do I rotate a point 90 degrees counterclockwise around the origin in 2D?

Use the formula (x, y) → (-y, x). Swap the coordinates and negate the new x value, which is the original y.

What is the formula for a 90 degree clockwise rotation in 2D?

Apply (x, y) → (y, -x). Swap the coordinates and negate the new y value, which is the original x.

How do I rotate a point 90 degrees around the X axis in 3D?

Keep the x coordinate the same and map (x, y, z) to (x, -z, y) for a counterclockwise turn around X.

What happens to coordinates when rotating 90 degrees around the Y axis in 3D?

For a counterclockwise rotation around Y, use (x, y, z) → (z, y, -x), preserving the y coordinate.

Related Reading

More pages in this topic cluster.

Who Designed the Nike Logo? The Story Behind the Swoosh

The Nike swoosh is one of the most recognizable symbols in the world, but few people know the story behind its creation. This piece explores who designed the Nike logo, why it h...

Read next
What is the World's Hottest Pepper? 🌶️🔥

When people ask about the world's hottest pepper, they usually mean the variety that currently holds the Guinness World Record and pushes the boundaries of capsaicin heat. Peppe...

Read next
Jon Huertas in This Is Us:角色, 出演时期与剧情影响详解

Jon Huertas 在《这就是我们》中饰演成年 Kevin Pearson,这一角色从2016年首播持续至2022年最终季,构成了剧集核心家庭叙事的重要组成部�...

Read next