# Lines which intersect the postive half axis of x

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

According to this formula we can determine if the angle between two points(A[x1,y1] and B[x2,y2]) of the line (angle A0B where 0 is the center point of the coordinate system) is lower than 180 degree:

if $(y1<0)$ then if $x2*y1-x1*y2>0$ then the $angle < 180$

if $(y1 > 0)$ then if $x2*y1-x1*y2<0$ then the $angle < 180$

My question is how did we get this formula?

-

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$.