Find intersection point of two lines – choose input by two points each, or by general equation Ax + By + C = 0. Detects parallel, coincident, and perpendicular cases.
In Euclidean geometry, two distinct lines in a plane either intersect at exactly one point, are parallel (no intersection), or coincide (infinitely many points). The intersection point satisfies both line equations simultaneously. This calculator finds the point using analytic methods, supporting any slope (including vertical/horizontal).
Line 1: P₁ + t·(P₂ − P₁), Line 2: P₃ + s·(P₄ − P₃)
Intersection solves: P₁ + t·v = P₃ + s·w
The determinant Δ = v_x·w_y − v_y·w_x decides the configuration: if |Δ| < ε → lines parallel/coincident; otherwise unique intersection exists with parameters t, s computed via Cramer's rule. This parametric method eliminates division-by-zero issues, making it ideal for vertical lines.
Historical context: The analytic representation of lines was pioneered by René Descartes (La Géométrie, 1637) and Pierre de Fermat, bridging algebra and geometry. The determinant-based intersection formula is a direct consequence of Cramer's rule, published by Gabriel Cramer in 1750.
Given four points A(x₁,y₁), B(x₂,y₂) for L₁ and C(x₃,y₃), D(x₄,y₄) for L₂. Direction vectors: v = (x₂−x₁, y₂−y₁), w = (x₄−x₃, y₄−y₃). Solve A + t v = C + s w. Using cross products, t = cross(C−A, w) / cross(v, w) and s = cross(C−A, v) / cross(v, w). Intersection coordinates are then computed. The angle θ between lines satisfies cosθ = |v·w|/(|v||w|). Our algorithm handles degenerate inputs gracefully, providing detailed warnings for parallelism and coincident lines.
This calculator supports two classic ways to define a line: two points or the general linear equation Ax + By + C = 0. Internally, both are converted to the same parametric form, ensuring consistent intersection computation. The general form is especially robust for vertical lines (B=0) and eliminates slope singularities.
For L₁: A₁x + B₁y + C₁ = 0, L₂: A₂x + B₂y + C₂ = 0
Intersection solves via determinant Δ = A₁B₂ − A₂B₁.
If Δ ≠ 0: unique intersection (x = (B₁C₂ − B₂C₁)/Δ, y = (C₁A₂ − C₂A₁)/Δ).
If Δ = 0 and (A₁C₂ = A₂C₁) → coincident; else parallel.
The two-point mode converts points to the general form: A = y₁−y₂, B = x₂−x₁, C = x₁y₂ − x₂y₁, then uses the same determinant logic. This unification guarantees that all results – angle, parallelism, intersection – are consistent across input methods.
Traffic engineers model two roads as straight lines: Road A passes through points (0,0) and (6,2); Road B passes through (1,5) and (5,1). Our calculator finds intersection at (3.0, 1.0) with an acute angle of 53.13°. This coordinate helps design traffic signals and sight triangles. The segment intersection test confirms both road segments cross within their bounds, ensuring realistic junction design.
Extended Example – GIS Overlay: Two property boundaries: L₁: (100,200)-(300,100), L₂: (150,150)-(250,250). Intersection point (200,150) identifies a corner for land registry. Our segment test confirms valid crossing, critical for legal descriptions.
| Case | Example Coordinates | Intersection | Geometric Interpretation |
|---|---|---|---|
| Unique Intersection | L₁: (0,0)-(4,2), L₂: (0,2)-(4,0) | (2,1) | Lines cross at a single point |
| Parallel Lines | L₁: (0,0)-(2,2), L₂: (0,1)-(2,3) | No intersection | Equal slopes, distinct intercepts |
| Perpendicular | L₁: (0,0)-(2,0), L₂: (1,-1)-(1,3) | (1,0) | Slopes negative reciprocal (m1·m2 = -1) |
| Coincident | L₁: (0,0)-(2,2), L₂: (1,1)-(3,3) | Infinite points | Same line |