# Interactive Point Where Two Lines Intersect

This interactive demonstrates the point where two lines intersect. The interactive has four blue control points that define the shape of two lines. Click and drag any of the control points to see the point of intersection change.

The general solution to finding the point of intersection is shown below for the two lines given by the slope-intercept equations below.

Start by setting the equation of the two lines equal to each other.

Subtract from both sides.

Subtract from both sides.

Factor from the left side.

Divide both sides by

This gives us the -coordinate of the point where the lines intersect.

Substitute this value into one of the equations to find the -coordinate.

The point where the two lines intersect is .

When calculating the point where two lines intersect there are a number of special cases to consider.

In the case of a vertical line, the slope-intercept form of the line will result in an infinite slope, because of the division of zero. In computing, we can trap this error by checking the value of the slope and then manually set the x-position of the point of intersection and solve for the y-position.

In the case of parallel lines, the two lines in the slope-intercept form will have the same slope. If they have different y-intercepts, then a solution does not exist. Otherwise, if they have the same y-intercepts they are the same line and infinitely many solutions exist.