# line segment intersection strange results

I'm using this formula. I am getting very strange results with (1,3) to (29,17) and (6,19) to (7,8). I got an X* value of 7. When I plugged this into my intercept calculator it said they intercept at (7.173913, 6.086957). How is this possible with line segments?

The same thing happened with (1,3) to (29,17) , (6,19) to (9,15). X* is 8.793103. My intercept calculator said they intercept at (13.363636, 9.181818).

line segment intersection

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

The two lines in your first case are $y=\frac12x+\frac52=(x+5)/2$ and $y=-11x+85$. Their intersection has $x^*=165/23$, which agrees with your intercept calculator. I don’t know what method you used for finding the intersection, but there’s something wrong with it. The fact that $x^*$ is greater than $7$ just means that the segments don’t intersect.