As above diagrams shows I have two vector U and V. I want to determine weather V vector is in A side or the B side it means form the left side of the right side to the U vector.
I need some help to sort out this. thanks in advance!
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityso... do you mean you want to know weather the point $\left(x_{2},y_{2}\right)$ is on the left or on the right of the line passing $\left(x_{1},y_{1}\right)$ and $\left(x_{3},y_{3}\right)$? In this case:
define a normal pointing always to the same side of your line passing the two points $\left(x_{1},y_{1}\right)$ and $\left(x_{3},y_{3}\right)$, that would mean any vector perpendicular on $\left(r_{x},r_{y}\right):=\left(x_{3},y_{3}\right)-\left(x_{1},y_{1}\right)$.
For instance $\left(s_{x},s_{y}\right):=\left(r_{y},-r_{x}\right)$ does it. this vector should point to the left if i'm not wrong :-) you better check this, i might mix up left and right.
then check the sign of the scalar product $\left(s_{x},s_{y}\right)\cdot\left(x_{2}-x_{1},y_{2}-y_{1}\right)$. if it's bigger than $0$ $\left(x_{2},y_{2}\right)$ is on the left, otherwise it's on the right.
to explain a bit why: