[Math] How to translate a point by $90$ degree counter clockwise direction

geometrylinear algebra

I would like to find a point which is rotated $90$ degree counter clockwise direction about the origin. For example, the point $(2,0)$ is taken to $(0,2)$.

Given $(x,y)$, how do i find the new point which is rotated $90$ degree counter clockwise direction.

My approach:
From the given $(x,y)$, we can calculate its distance from origin. i.e $r=\sqrt{(x^2+y^2)}$. From polar co-ordinates, we can find the angle i.e $\sin \theta = \frac{y}{r} \text{ or } \cos \theta = \frac{x}{r}$.

Once we know $(r,\theta)$, now the translated point as $(r\cos(\theta+90),r\sin(\theta+90))$

Is there any other shorted method to find the translation?

Best Answer

For a $\frac{\pi}{2}$ anticlockwise rotation of $(x,y)$ about the origin, you can just take $(-y,x)$. This is about as short as you can get.

To see why, note that $\cos(\theta+\frac{\pi}{2}) = -\sin \theta$, and $\sin(\theta+\frac{\pi}{2}) = \cos \theta$. Hence the point $(r \cos \theta, r \sin \theta)$ will become $(r \cos (\theta+\frac{\pi}{2}), r \sin (\theta+\frac{\pi}{2}))$ = $(-r \sin \theta, r \cos \theta)$. Comparing coordinates gives the formula above.