[Math] 90 degree counter-clockwise rotation around a point

linear algebra

How do you do a 90 degree counter-clockwise rotation around a point? I know around the origin it's $(-y,x)$, but what would it be around a point?

$$(-y – a,x – b)$$
Where $(a,b)$ is the rotation point.

Best Answer

Subtract the point, rotate around origin, add the point back:

$$(-(y-b)+a, (x-a) + b)$$