keisoku

Intersection of Two Lines Calculator

Solve a1x+b1y=c1 and a2x+b2y=c2 with Cramer's rule to find the intersection point. Detects parallel and coincident lines, and shows each slope, the angle between the lines, and a coordinate graph.

Input

Enter the coefficients of two lines a1x+b1y=c1 and a2x+b2y=c2 to compute their intersection point.

Line 1: a1x + b1y = c1

Line 2: a2x + b2y = c2

Result

xy(2, 2)

Intersection point

(2, 2)

Slope of line 1

1

Slope of line 2

-1

Angle between lines

90 deg


The intersection is found with Cramer''s rule. A zero determinant means the lines are parallel or coincident.

How it works

  • The intersection point is found with Cramer's rule. When the determinant det = a1·b2 − a2·b1 is nonzero, x = (c1·b2 − c2·b1) / det and y = (a1·c2 − a2·c1) / det give a unique intersection.
  • When the determinant det is zero, the two lines are parallel or coincident. If the coefficients and constant terms are proportional the lines coincide (infinitely many shared points); otherwise they are parallel with no shared point.
  • The slope of a line a x + b y = c is −a / b when b is nonzero. When b is zero the line is vertical and its slope is undefined.
  • The angle between the two lines is computed from the angle of their normal vectors (a, b) and normalized to the acute side, from 0 to 90 degrees.

Reviews

Tell us what you think of this calculator.

Write a review

  1. Home
  2. Intersection of Two Lines Calculator