[Math] How to rotate a vector by 90 degree

coordinate systemsgeometryrotationsvector-spaces

Suppose I am given a vector in 2-D as $AB = {(x_1,y_1) ,(x_2,y_2)}$. Now , what will be the co-ordinates if I rotate the vector about the point $(x_1,y_1)$ both clockwise and counter-clockwise ?here it is given as rotation matrix , but that is about the origin. But I need to rotate about point A. I am having problem translating the points. Can someone help ?

Best Answer

  1. Shift the vector so that is starts from the origins (by subtracting $(x_1, y_1)$)
  2. Rotate the vector you told you know the transformation you need to apply
  3. Shift the origin back to $(x_1, y_1)$ by adding $x_1$ to new $x$ and adding $y_1$ to new $y$s.