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

We have to find out which lines intersect the positive half axis of $x$.

According to this formula we can determine if the angle between two points $(A[x_1, y_1]$ and $B[x_2, y_2]$ ) of the line ($\angle AOB$ where $O$ is the center point of the coordinate system) is less than $180^\circ$:

if $(y_1<0)$ then if $x_2y_1-x_1y_2>0$ then the $\text{angle} < 180^\circ$

if $(y_1 > 0)$ then if $x_2y_1-x_1y_2<0$ then the $\text{angle} < 180^\circ$

My question is how did we get this formula?

share|cite|improve this question
up vote 0 down vote accepted

The term $x_2\cdot y_1 - x_1\cdot y_2$ in your question corresponds to the determinant $\begin{vmatrix}x_2 & x_1 \\ y_2 & y_1\end{vmatrix}$ which can be interpreted as twice the oriented area of the triangle $BOA$. The triangle $AOB$ has the opposite orientation.

If that determinant is positive, then $BOA$ is oriented counter-clockwise, and $AOB$ is oriented clockwise. This implies that when you look from $A$ towards $O$, then $B$ is somewhere to your right. So if $A$ is somewhere below the $x$ axis, then viewed from $A$ the point $B$ is visible somewhere to the right of $O$, so the connecting line $AB$ has to intersect the $x$ axis in its positive half. The same argument holds if $A$ is avove te $x$ axis but $B$ off to the left of $O$.

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.