Vector rotation to align with a point

102 Views Asked by At

Let's say I have a vector $\overrightarrow{a}$ (as shown by the arrow in the picture) with a certain angle $\theta$ relative to $x$-axis, which denotes a tangent line of a circle $C$ with radius $r$. The goal is to rotate $\overrightarrow{a}$ relative to the midpoint of the circle $C$ so that $\overrightarrow{a}$ directly points to the point $P(x,y)$ (denoted by the red square). By what angle $\phi$ should my arrow now be rotated?

enter image description here