line segment intersection
Do these two line segments intersect ?
I'm confused because if you extend the below line then they will intersect otherwise not but we can't extend them as they are line segments.
Is line segment intersection is different from intersection of lines ?
$\endgroup$ 22 Answers
$\begingroup$Since you received Willemien's answer, let us consider the problem from an algebraic point of view.
Let us note $(x_1,y_1)$ and $(x_2,y_2)$ the coordinates of the two points limiting the first segment and $(x_3,y_3)$ and $(x_4,y_4)$ the coordinates of the two points limiting the second segment. So, the equations of the first and second lines are respectively $$y=\frac{ {y_1}-{y_2}}{{x_1}-{x_2}}x+\frac{{x_1} {y_2}-{x_2} {y_1}}{{x_1}-{x_2}}$$ $$y=\frac{ {y_3}-{y_4}}{{x_3}-{x_4}}x+\frac{{x_3} {y_4}-{x_4} {y_3}}{{x_3}-{x_4}}$$ Assuming that they are not parallel, these two lines intersect at a point $x_*$ such that $$x_*=\frac{{x_1} ({x_3} ({y_2}-{y_4})+{x_4} ({y_3}-{y_2}))+{x_2} ({x_3} ({y_4}-{y_1})+{x_4} ({y_1}-{y_3}))}{({x_1}-{x_2}) ({y_3}-{y_4})+({x_4}-{x_3}) ({y_1}-{y_2})}$$ and this value must be such that $x_1 \leq x_* \leq x_2$ and $x_3 \leq x_* \leq x_4$ in order the segments intercept.
$\endgroup$ 2 $\begingroup$Is line segment intersection is different from intersection of lines ?
in one way they are the same, in another way they are different.
1- They are the same that an intersection is a point, and if that intersection point exist then the "things" intersect, if that point doesn't exist then they don't intersect. (that should be clear isn't it)
2- They differ that segments don't have to intersect if the extensions do intersect (because the intersection point is outside the two segments, for lines not to intersect they have to be parallel (or asymtopic) , segment can be non intersecting just because they don't .
Maybe best is only to remember 1,
2 is just a bit of background theory.
Hopes this helps
$\endgroup$