Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a vector A and a point P. My problem is how to find out if point is on the left or right side of vector looking from the point of origin of a vector in direction of it.

share|cite|improve this question
Do you know of any ways to measure the angle between the vector $A$ and the vector going from the origin to $P$? – Jesse Madnick Dec 6 '10 at 9:06
@Jesse yes but only absolute value of it. – Migol Dec 6 '10 at 9:10
Do you know the formula $a \cdot b = |a||b|\cos \theta$ (where $\theta$ is the angle between the vectors)? In case the answer is yes, how can you use this formula to answer your question? – Fredrik Meyer Dec 6 '10 at 9:21
@Fredrik Yes, but in my case this formula is not helpful. Note that $cos( \theta ) = cos(0 - \theta )$. – Migol Dec 6 '10 at 9:34
One way is to perform a rotation $\phi$ so that $\phi(A)$ lies on the x-axis and then inspect the sign of the y-coordinate of $\phi(P)$ – J. J. Dec 6 '10 at 9:59
up vote 3 down vote accepted

This answer on MO should do it for you.

share|cite|improve this answer

Let $B$ be the vector from the end point of $A$ to $P$, then observe the sign of the coefficient of $A \wedge B$ in a chosen basis. The exact sign is up to $O(2)/SO(2)$, but you only need to distinguish between the two cases, so it's ok :)

UPD: Now that I think about it, letting $B$ be the vector from the starting point of $A$ to $P$ is even neater.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.