# Math: How to Find the Intersection of Two Lines and Other Types of Curves

*I studied applied mathematics, in which I did both a bachelor's and a master's degree.*

An intersection of two lines is a point where the graphs of two lines cross each other. Every pair of lines does have an intersection, except if the lines are parallel. This means that the lines move in the same direction. You can check whether two lines are parallel by determining their slope. If the slopes are equal, then the lines are parallel. This means they do not cross each other, or if the lines are the same then they cross in every point. You can determine the slope of a line with the help of the derivative.

Every line can be represented with the expression y = ax + b, where x and y are the two-dimensional coordinates and a and b are constants that characterize this specific line.

For a point (x,y) to be an intersection point we must have that (x,y) lays on both lines, or in other words: If we fill in these x and y than y = ax + b must be true for both lines.

### An Example of Finding the Intersection of Two Lines

Let's look at two lines:

y = 3x + 2

y = 4x - 9

Then we must find a point (x,y) that satisfies both linear expressions. To find such a point we must solve the linear equation:

3x + 2 = 4x - 9

To do this, we must write the variable x to one side, and all terms without x to the other side. So the first step is to subtract 4x on both sides of the equality sign. Since we subtract the same number on both the right hand side as well as the left hand side the solution does not change. We get:

3x + 2 - 4x = 4x - 9 -4x

-x + 2 = -9

Then we subtract 2 on both sides to get:

-x = -11

Finally, we multiply both sides with -1. Again, since we perform the same operation on both sides the solution does not change. We conclude x = 11.

We had y = 3x + 2 and fill in x = 11. We get y = 3*11 + 2 = 35. So the intersection is at (7,11). If we check the second expression y = 4x - 9 = 4*11 -9 = 35. So indeed we see that the point (7,11) also lies on the second line.

In the picture below, the intersection is visualized.

- Math: How to Solve Linear Equations and Systems of Linear Equations
- Math: What Is the Derivative of a Function and How to Calculate It?

**Parallel Lines**

To illustrate what happens if the two lines are parallel there is the following example. Again we have two lines, but this time with the same slope.

y = 2x + 3

y = 2x + 5

Now if we want to solve 2x + 5 = 2x + 3 we have a problem. It is impossible to write all terms involving x to one side of the equality sign since we then would have to subtract 2x from both sides. However if we would do this we end up with 5 = 3, which clearly is not true. Therefore this linear equation has no solution and hence there is no intersection between these two lines.

## Other Intersections

Intersections do not limit to two lines. We can calculate the intersection point between all types of curves. If we look further than only lines we might get situations in which there are more than one intersection. There are even examples of combinations of functions that have infinitely many intersections. For example the line y = 1 (so y = ax + b where a = 0 and b = 2) has infinitely many intersections with y = cos(x) since this function oscillates between -1 and 1.

Here, we will look at an example of the intersection between a line and a parabola. A parabola is a curve which is represented by the expression y = ax^{2} + bx + c. The method of finding the intersection remains roughly the same. Let's for example look at the intersection between the following two curves:

y = 3x + 2

y = x^{2} + 7x - 4

Again we equate the two expressions and we look at 3x + 2 = x^{2} + 7x - 4.

We rewrite this to a quadratic equation such that one side of the equality sign is equal to zero. Then we must find the roots of the quadratic function we get.

So we start by subtracting 3x + 2 on both sides of the equality sign:

0 = x^{2} + 4x - 6

There are multiple ways to find the solutions of these kind of equations. If you want to know more about these solution methods I suggest reading my article about finding the roots of a quadratic function. Here we will choose to complete the square. In the article about quadratic functions I describe in detail how this method works, here we will just apply it.

x^{2} + 4x - 6 = 0

(x + 2)^{2} -10 = 0

(x + 2)^{2} = 10

Then the solutions are x = -2 + sqrt 10 and x = -2 - sqrt 10.

Now we will fill in this solution in both expressions to check whether this is correct.

y = 3*(-2 + sqrt 10) + 2 = - 4 + 3 * sqrt 10

y = (-2 + sqrt 10)^{2} + 7*(-2 + sqrt 10) - 4 = 14 - 4*sqrt 10 -14 + 7*sqrt 20 - 4

= - 4 + 3 * sqrt 10

So indeed, this point was an intersection point. One can also check the other point. This will result in the point (-2 - sqrt 10, -4 - 3*sqrt 10). It is important to make sure you check the right combinations if there are multiple solutions.

It always helps to draw the two curves to see if what you calculated makes sense. In the picture below you see the two intersection points.

## Summary

To find the intersection between two lines y = ax + b and y = cx + d the first step that must be done is to set ax + b equal to cx + d. Then solve this equation for x. This will be the x coordinate of the intersection point. Then you can find the y coordinate of the intersection by filling in the x coordinate in the expression of either of the two lines. Since it is an intersection point both will give the same y coordinate.

It is also possible to calculate the intersection between other functions, which are not lines. In these cases it might happen that there is more than one intersection. The method of solving remains the same: set both expression equal to each other and solve for x. Then determine y by filling in x in one of the expressions.

*This content is accurate and true to the best of the author’s knowledge and is not meant to substitute for formal and individualized advice from a qualified professional.*