Line–line intersection

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 .

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.