Intersection of Two Lines Calculator
Enter the equations of two lines to find their intersection point. Choose slope-intercept form (y = mx + b) or standard form (Ax + By + C = 0). The calculator returns the exact (x, y) coordinates, walks through the algebra step by step, and correctly identifies parallel and coincident lines.
Formula
Worked example
Lines y = x + 3 and y = 2x + 1: set x + 3 = 2x + 1, so x = 2, then y = 2 + 3 = 5. Intersection at (2, 5). The angle is arctan(|1 - 2| / |1 + 1*2|) = arctan(1/3) ≈ 18.43 degrees.
What is the intersection of two lines?
Two distinct lines in a plane either cross at exactly one point, run parallel and never cross, or lie on top of each other (coincident). The intersection point is the unique (x, y) pair that satisfies both line equations simultaneously. Geometrically, it is the point where the two lines meet on the coordinate plane. Finding it algebraically means solving a system of two linear equations with two unknowns.
How to find the intersection point
The standard approach is substitution or elimination. In slope-intercept form (y = m1x + b1 and y = m2x + b2), set the right-hand sides equal: m1x + b1 = m2x + b2, then solve for x = (b2 - b1) / (m1 - m2). Substitute x back into either equation to get y. In standard form (A1x + B1y + C1 = 0 and A2x + B2y + C2 = 0), use Cramer's rule with the determinant D = A1*B2 - A2*B1: x = (B1*C2 - B2*C1) / D and y = (C1*A2 - C2*A1) / D. If D = 0 the lines are parallel or coincident.
Parallel, coincident, and perpendicular lines
When two lines have the same slope (m1 = m2 in slope-intercept form, or D = 0 in the determinant test), they are parallel and share no intersection point unless they also share the same intercept, in which case they are coincident (the same line) with infinitely many intersections. Two lines are perpendicular when their slopes multiply to -1 (m1 * m2 = -1), and the angle between them is exactly 90 degrees. The angle between any two intersecting lines is calculated with tan(theta) = |m1 - m2| / |1 + m1 * m2|, giving the acute angle at the crossing point.
Converting between equation forms
Slope-intercept form y = mx + b and standard form Ax + By + C = 0 are equivalent: to convert y = mx + b to standard form, rearrange to mx - y + b = 0 (so A = m, B = -1, C = b). To convert Ax + By + C = 0 back, isolate y: y = (-A/B)x + (-C/B), giving slope -A/B and intercept -C/B (when B is nonzero). Vertical lines have B = 0 and cannot be expressed in slope-intercept form, so standard form is more general.
Line relationship summary
| Determinant (D) | Relationship | Intersections |
|---|---|---|
| D = 0, rows proportional | Coincident | Infinitely many |
| D = 0, rows not proportional | Parallel | None |
| D not equal to 0 | Intersecting | Exactly one point |
How to identify the relationship between two lines from the determinant.
Frequently asked questions
What happens if the two lines are parallel?
Parallel lines have the same slope but different y-intercepts, so they never meet. In this case the determinant D = A1*B2 - A2*B1 equals zero and there is no solution. The calculator will display "Parallel lines (no intersection)" and the angle between them is 0 degrees.
What does it mean for lines to be coincident?
Coincident lines are actually the same line written in two different ways. Every point on one is also on the other, giving infinitely many solutions. This happens when the coefficient ratios are proportional: A1/A2 = B1/B2 = C1/C2. The determinant is also zero for coincident lines, but unlike parallel lines, all three ratios match.
How do I verify the intersection point is correct?
Substitute the (x, y) result back into both original equations. If both equations are satisfied (left side equals right side), the answer is correct. Small floating-point rounding differences (for example, 5.0000001 instead of 5) are normal for non-integer results.
Can this calculator handle vertical or horizontal lines?
Yes, using standard form (Ax + By + C = 0). A vertical line x = k is written as 1x + 0y - k = 0. A horizontal line y = k is written as 0x + 1y - k = 0. Slope-intercept form cannot express vertical lines because their slope is undefined, so switch to standard form for those cases.
What is the angle between two intersecting lines?
The acute angle theta between two lines with slopes m1 and m2 is given by tan(theta) = |m1 - m2| / |1 + m1*m2|. When the product m1*m2 = -1 the denominator is zero and the lines are perpendicular (90 degrees). The calculator shows this angle alongside the intersection coordinates.