# Interactive Point Where Two Lines Intersect

This interactive demonstrates the point where two lines intersect. The interactive has four blue control points which 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 position of the point of intersection is to find or identify the equations of the lines.

Then we can solve for the point by setting the two lines equal to each other. This will give us the x position where the two lines intersect. Then that position can be substituted back into one of the equations to get the y position. This is shown in the steps below.

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 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.

The example(s) below demonstrate the full process of taking four points which define two lines and then finding the point of intersection.

To find the point where two lines intersect set the equations equal together and solve for the x-coordinate. Then substitute the solved for coordinate back into one of the equations to get the y-coordinate.