Intersection of Two Lines (Four Points) Calculator

Enter four points to define two lines precisely. Get exact intersection coordinates, slopes, and determinant-based checks. See parallel, collinear, or overlapping classifications with segment inclusion. Download results as CSV or polished PDF instantly. Toggle decimal iterations and show zero-digit bring-down steps. Accurate geometry tools for learners and professionals everywhere.

Inputs

Line 1
Line 2

Example Data

# (x1,y1)(x2,y2)(x3,y3)(x4,y4) Scenario
1 (0,0)(6,6)(0,6)(6,0) Proper segment intersection
2 (0,0)(4,0)(0,2)(4,2) Parallel distinct lines
3 (0,0)(6,0)(2,0)(8,0) Collinear overlapping segments
4 (0,0)(1,1)(3,0)(4,1) Lines intersect outside both segments
5 (2,-2)(2,4)(-1,1)(4,1) Vertical with horizontal

Results

Classification:
Intersection X
Intersection Y

Line 1: A1, B1, C1
Line 2: A2, B2, C2
Slope m1, intercept b1
Slope m2, intercept b2

Formula Used

Represent each line in general form: A x + B y = C with A = y₂ − y₁, B = x₁ − x₂, C = A x₁ + B y₁. For the second line, A′ = y₄ − y₃, B′ = x₃ − x₄, C′ = A′ x₃ + B′ y₃.

The determinant Δ = A B′ − A′ B. If |Δ| ≈ 0, the lines are parallel or collinear. Otherwise, the intersection point is

x = (B′ C − B C′)/Δ,   y = (A C′ − A′ C)/Δ.

Segment inclusion: compute parameters t and u along each segment. For segment 1, use t = ((x − x₁)/(x₂ − x₁)) if |x₂ − x₁| ≥ |y₂ − y₁|, else t = ((y − y₁)/(y₂ − y₁)). Similarly compute u for segment 2. If 0 ≤ t ≤ 1 and 0 ≤ u ≤ 1, the intersection lies on both segments.

How to Use

  1. Enter coordinates for P₁(x₁,y₁), P₂(x₂,y₂) to define the first line.
  2. Enter coordinates for P₃(x₃,y₃), P₄(x₄,y₄) to define the second line.
  3. Select Compute to see classification, intersection coordinates, and algebraic details.
  4. Use the Download CSV or Download PDF buttons to export results.
  5. Try Example Data rows to quickly explore different scenarios.

FAQs

If the determinant Δ is zero and points are not collinear, the lines are parallel with no intersection point. Segment classification is reported accordingly.

For collinear inputs, overlapping segment ranges are detected. The tool reports the overlap interval; infinite intersections exist along that shared portion.

Yes. The determinant formulation avoids slope division by zero, supporting vertical, horizontal, and skew configurations robustly.

A small epsilon (1e−9) is used to decide when Δ is effectively zero and when points are on a line, reducing floating‑point noise issues.

Use Download CSV to export inputs and outputs. Use Download PDF to save the Results card as a formatted PDF document.

The Results panel shows A, B, C coefficients, determinant, slopes, and intercepts. Use these to reproduce calculations by hand or in another system.

Related Calculators

Row Reduction RREF CalculatorDiagonalization Checker CalculatorLU Decomposition Steps CalculatorQR Decomposition Steps Calculatormatrix calculator with variablesGauss-Jordan inverse calculatorPolynomial linear independence calculatorLinear independence of matrix calculatorComplex matrix inverse calculatorQR decomposition least squares

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.