In Euclidean geometry, the intersection of a line and a line can be the empty set, a single point, or a line (if they coincide). Distinguishing these cases and finding the intersection have uses, for example, in computer graphics, motion planning, and collision detection. In a Euclidean space, if two lines are not coplanar, they have no point of intersection and are called skew lines. If they are coplanar, however, there are three possibilities: if they coincide (are the same line), they have all of their infinitely many points in common; if they are distinct but have the same direction, they are said to be parallel and have no points in common; otherwise, they have a single point of intersection, denoted as singleton set, for instance { A } {\displaystyle \{A\}} . Non-Euclidean geometry describes spaces in which one line may not be parallel to any other lines, such as a sphere, and spaces where multiple lines through a single point may all be parallel to another line. In spherical and elliptic geometries, every pair of lines intersects, while in hyperbolic geometry there exist infinitely many distinct lines through a given point that do not intersect a given line. Projective geometry provides a unifying framework in which these different behaviors can be described by extending the notion of intersection to include ideal points, so that any two distinct lines intersect in exactly one point.
Formulas
A necessary condition for two lines to intersect is that they are in the same plane—that is, are not skew lines. Satisfaction of this condition is equivalent to the tetrahedron with vertices at two of the points on one line and two of the points on the other line being degenerate in the sense of having zero volume. For the algebraic form of this condition, see Skew lines § Testing for skewness.
Given two points on each line First we consider the intersection of two lines L1 and L2 in two-dimensional space, with line L1 being defined by two distinct points (x1, y1) and (x2, y2), and line L2 being defined by two distinct points (x3, y3) and (x4, y4). The intersection P of line L1 and L2 can be defined using determinants.
… excerpt ends here. Continue reading the full article.





