Lesson Explainer: Equations of Parallel and Perpendicular Lines | Nagwa Lesson Explainer: Equations of Parallel and Perpendicular Lines | Nagwa

Lesson Explainer: Equations of Parallel and Perpendicular Lines Mathematics

In this explainer, we will learn how to write the equation of a line parallel or perpendicular to another line.

There are many ways of classifying straight lines that can be helpful, depending on the circumstances. The most familiar expression of a straight line is using the formula

𝑦=𝑚𝑥+𝑏,(1)

where we would plot this graph in the 𝑥𝑦-plane, with 𝑚 representing the slope of the line and 𝑏 representing the 𝑦-intercept. The slope 𝑚 tells us the slope of the line, and the 𝑦-intercept is where it crosses the 𝑦-axis. These two pieces of information are enough to understand everything about a straight line and to plot it at any point in the 𝑥𝑦-plane, and we refer to equation (1) as the “slope–intercept” form of a straight line. More often than not, when solving a problem involving a straight line, we will be looking to write the answer in this format, where 𝑚 and 𝑏 are calculated as part of solving the problem.

The value of the slope 𝑚 determines the general “direction” of the straight line. Reading left to right, if 𝑚 is positive, then the slope goes “uphill,” and if 𝑚 is negative, then the slope goes “downhill.” We can demonstrate this by taking two straight lines, as follows: 𝑦=2𝑥+3𝑦=12𝑥+3.and

The two lines have the same 𝑦-intercept but slopes with opposite signs. These two functions are plotted in the graph below, where 𝑦 is shown in red and 𝑦 is shown in green. The graph of 𝑦 travels “uphill” as we move left to right, which is due to the positive slope, whereas 𝑦 travels “downhill” due to the negative slope. This is a fundamental property relating to straight lines, and we will return to the matter later when we discuss perpendicular lines.

For the moment, it is worth remembering that slope–intercept form is only one way of writing the equation of a straight line, even though this is the most common. We may generally be given any linear equation as a way of classifying a straight line, for example 𝑥𝑦-plane 𝑎𝑥+𝑏𝑦=𝑘, where 𝑎, 𝑏, and 𝑘 are real numbers. This expression is less common than slope–intercept form of equation (1), but nonetheless it is perfectly valid. Indeed, solving the above equation for 𝑦 will yield the traditional slope–intercept form (providing that 𝑏0). Sometimes, we will be given the equation of a straight line in the above format rather than in slope–intercept form, and we will be expected to work with this expression natively.

There are two other ways of writing a straight line that will be particularly useful. Suppose we are told that there is a straight line that has slope 𝑚 and passes through the particular point (𝑥,𝑦). Then, the equation of the straight line with these properties is given by 𝑦𝑦=𝑚(𝑥𝑥), which can of course be rearranged into the slope–intercept form of equation (1). For this result to be directly applicable, the slope must first be known, and there are many examples where this will be the case, as we will see throughout the rest of this explainer.

The final result is the most relevant for a discussion on the slope, since it expresses the equation of a straight line that is known to pass through the two points (𝑥,𝑦) and (𝑥,𝑦). In this case, the equation of the straight line is given by the formula 𝑦𝑦𝑦𝑦=𝑥𝑥𝑥𝑥.

In this case, we will actually choose to rewrite the above expression in slope–intercept form by solving for 𝑦, since this will serve as a reminder of how we can calculate the slope of any straight line from two points that the line passes through. Suppose we were to take the equation above and multiply both sides by (𝑦𝑦). This would effectively cancel this term in the denominator of the left-hand side, giving the new result 𝑦𝑦=(𝑦𝑦)𝑥𝑥𝑥𝑥.

As an interim step, we can tidy up the equation above slightly, as follows: 𝑦𝑦=𝑦𝑦𝑥𝑥(𝑥𝑥).

Expanding out the right-hand side then gives 𝑦𝑦=𝑦𝑦𝑥𝑥𝑥𝑦𝑦𝑥𝑥𝑥, and then finally solving for 𝑦 gives 𝑦=𝑦𝑦𝑥𝑥𝑥𝑦𝑦𝑥𝑥𝑥+𝑦.

This is hardly the neatest way of writing the previous equation, but it does allow us to compare it directly to the slope–intercept form of a straight line as described in equation (1). By comparing the 𝑥-terms between this equation and the one directly above, we find that we can write the slope as 𝑚=𝑦𝑦𝑥𝑥, which confirms what we know about calculating the slope of a straight line given two points on the line.

These results have been included as a reminder of the known techniques we can employ when working with straight lines, and we will use all of these throughout the explainer as an integral part of our workings. Although we will give some outline working in many examples, it is generally assumed that you will be comfortable enough with these techniques that many stages of working should not be too mysterious! With this point hopefully made, we will now introduce the first of the two key concepts of this explainer: parallel lines.

Definition: Parallel Lines

Consider two straight lines with slopes 𝑚 and 𝑚. These two lines are parallel if 𝑚=𝑚 and the lines have different 𝑦-intercepts. If the 𝑦-intercepts are also the same, then the two lines are identical.

We will demonstrate this with an example. Suppose that we had the straight line that was already written in slope–intercept form as follows: 𝑦=3𝑥5.

We know that the slope is equal to 3, meaning that the slope goes uphill, moving from left to right. Furthermore, the line has a 𝑦-intercept of 5. This is enough information to allow us to render the following plot.

Now suppose that we took the second straight line that is governed by the equation 𝑦=3𝑥+1.

Clearly the two straight lines have the same slope but different 𝑦-intercepts. By our definition above, this means that the two straight lines are parallel to each other, which can be seen when we plot the new line below in green.

By the definition of parallelism, these two lines will never meet each other. This can be observed algebraically if one attempts to solve the simultaneous equations 𝑦=3𝑥5 and 𝑦=3𝑥+1, which quickly results in a mathematical error.

The above situation is probably the easiest circumstance of determining whether two lines are parallel because they are both written in slope–intercept form, meaning that we can directly compare the slopes and the 𝑦-intercepts. In the following examples, we will see that we have to work harder and use many of the results that were introduced in this explainer before we even began speaking of parallel lines.

Example 1: Finding the Equation of a Line That Is Parallel to a Given Line

Write, in the form 𝑦=𝑚𝑥+𝑏, the equation of the line through (1,1) that is parallel to the line 6𝑥𝑦+4=0.

Answer

We begin by rearranging the equation 6𝑥𝑦+4=0 into the standard slope–intercept form. Doing so gives the equation 𝑦=6𝑥+4, which means that the slope of this line is 6. The line we must calculate is parallel to the line above, meaning that the we can write the slope of the new line as 𝑚=6. We are also told that the new line must pass through the point (1,1), which, with knowledge of the slope, is enough to classify the line entirely. For a general straight line with slope 𝑚 that passes through the point (𝑥,𝑦), we can use the formula 𝑦𝑦=𝑚(𝑥𝑥).

By substituting 𝑚=6 and (𝑥,𝑦)=(1,1) into this equation, we obtain 𝑦(1)=6(𝑥(1)), which we can solve for 𝑦 to find 𝑦=6𝑥7.

We could check that these lines are parallel by plotting both of them, as we have done below. The first line is plotted in green, and the second line is plotted in red. We can see that the red line passes through the point (1,1), which is plotted in purple.

It is not always necessary to plot straight lines, nor to think of them in any geometric sense, if all we are interested in is whether or not they are parallel. The conditions in the above definition are algebraic conditions on the relationships between the two slopes and the two 𝑦-intercepts. As such, plotting straight lines can sometimes be thought of as a helpful technique rather than a necessary step, although of course it is normally good practice to sketch out a problem in order to understand it fully and help verify any results. In the following two examples, we will answer the questions using purely algebraic means and then plot a graph to verify our working.

Example 2: Finding the Values of the Unknown Coefficients in Two Parallel Straight Lines’ Equations

The straight lines 8𝑥+5𝑦=8 and 8𝑥+𝑎𝑦=8 are parallel. What is the value of 𝑎?

Answer

For the two lines to be parallel, we require that their two slopes be equal. Rearranging both of the given equations for 𝑦 will give the two results 𝑦=85𝑥+85𝑦=8𝑎𝑥8𝑎.and

The two slope terms will be equal if 𝑎=5, which will also imply that the 𝑦-intercepts will be different (also having opposite sign). This fits the two requirements for straight lines to be parallel, meaning that the second line is written in full as 𝑦=85𝑥85.

Below, we have plotted both of these lines to demonstrate that they are parallel, where the first line is in red and the second line is in green. This confirms that the answer 𝑎=5 is correct.

Example 3: Finding the Equation of a Straight Line That is Parallel to Another Given Line

Find, in slope–intercept form, the equation of the straight line passing through the point (3,1) and parallel to the straight line passing through the two points (1,1) and (4,3).

Answer

We begin by calculating the equation of the second line so that we can find the slope as part of this process. For a straight line passing through the two points (𝑥,𝑦) and (𝑥,𝑦), we can use the formula 𝑦𝑦𝑦𝑦=𝑥𝑥𝑥𝑥.

By setting (𝑥,𝑦)=(1,1) and (𝑥,𝑦)=(4,3) into the equation above, we obtain 𝑦(1)3(1)=𝑥141.

This simplifies slightly to give 12(𝑦+1)=13(𝑥1), which we can solve for 𝑦 to find 𝑦=23𝑥13.

Now that the second line has been written in slope–intercept form, we can see that the slope is 23. For any line to be parallel to this line, the slope must be the same, meaning that 𝑚=23.

Now that the slope of the new line is known, we can recall the formula for a straight line with known slope 𝑚 that passes through the point (𝑥,𝑦): 𝑦𝑦=𝑚(𝑥𝑥).

Taking the calculated slope 𝑚=23 and the given point (𝑥,𝑦)=(3,1), we substitute both of these into the equation above to obtain 𝑦1=23(𝑥3).

Solving for 𝑦 gives the equation in slope–intercept form: 𝑦=23𝑥+3.

To verify that we have completed the calculations correctly, we have created the plot below. The two points (1,1) and (4,3) are plotted in purple, with the first line going through these two points being plotted in red. The point (3,1) is plotted in black, and the parallel line through this point is plotted in green.

In the previous two examples, we saw how we needed a strong understanding of the core techniques that could be used to obtain the equation of a straight line, depending on which two pieces of information we are initially given. Ideally, these would be the slope and the 𝑦-intercept, which would allow the line to be written immediately in slope–intercept form. Usually, however, this is not the case, and we are instead given information that requires us to complete some extra working in order to understand the full picture. The same principles will be true as we move into the second half of this explainer to focus on perpendicular lines, where we will assume that the main techniques involving straight lines are fully understood.

Definition: Perpendicular Lines

Consider two straight lines with slopes 𝑚 and 𝑚. These two lines are perpendicular (at right angles to each other) if they have the relationship 𝑚=1𝑚. This relationship is often expressed by the equivalent form 𝑚𝑚=1, meaning that the product of the slopes must be 1. Two perpendicular lines will meet each other exactly once.

To illustrate this idea, we will return to the two lines that we gave at the very start of this explainer. These were defined as 𝑦=2𝑥+3𝑦=12𝑥+3.and

We observed that the slope of the first line was positive, meaning that it went “uphill”, and that the slope of the second line was negative, meaning that it went “downhill.” As a reminder, when plotted, the two lines are as follows.

What we have not yet stated is that, visually, these two lines appear to be perpendicular to each other, meeting at a right angle at the point (0,3), which also happens to be the 𝑦-intercept. If the slope of the first line is written as 𝑚=2 and the slope of the second line as 𝑚=12, then we do find that these obey the given relationship 𝑚=1𝑚. Then, according to our definition, these lines are perpendicular.

If two lines are perpendicular, then 𝑚=1𝑚, which means that the two slopes must have the opposite sign to each other. Consequently, if 𝑚 is positive, then 𝑚 must be negative, and vice versa. Geometrically speaking, if the first line is uphill, then the second (perpendicular) line is downhill, and vice versa. This geometric understanding provides a method for verifying whether two given lines are perpendicular. It should be noted, however, that two lines having slopes with opposite signs does not mean that they are perpendicular. For example, if one line had a slope of 10‎ ‎000 and the other had a slope of 10000, then these would certainly not be perpendicular!

Note that, unlike the criteria for parallel lines, for perpendicular lines there are no conditions on the 𝑦-intercepts of the two lines involved. In fact, this is entirely irrelevant when deciding whether two lines are perpendicular, which depends only on the two slopes of the lines involved. We can actually prove that two perpendicular lines will always meet. Suppose we took two perpendicular lines with two different 𝑦-intercepts but with the relationship between the slopes 𝑚=1𝑚. We could take the two lines in slope–intercept form, as follows: 𝑦=𝑚𝑥+𝑐𝑦=1𝑚𝑥+𝑐.and

We could solve for both 𝑥 and 𝑦 to find where these two lines meet each other by first setting 𝑚𝑥+𝑐=1𝑚𝑥+𝑐.

Bringing the slope terms to the left-hand side and the 𝑦-intercept term to the right-hand side gives 𝑚+1𝑚𝑥=𝑐𝑐, which we choose to write in the equivalent form 𝑚+1𝑚𝑥=𝑐𝑐.

Solving for 𝑥 then gives 𝑥=𝑚(𝑐𝑐)𝑚+1.

The crucial point is that we can always calculate the 𝑥-coordinate of the meeting point, irrespective of the values of 𝑐 or 𝑐, although we must be wary that we cannot allow the slope of either line to be zero, as otherwise the initial relationship 𝑚=1𝑚 would not be valid. By substituting the above value for 𝑥 into the equation 𝑦=𝑚𝑥+𝑐, we would find (after skipping some working) that 𝑦=𝑐+𝑐𝑚𝑚+1, meaning that we always have an expression for the 𝑦-coordinate of the meeting point.

For the moment, this is all that we will need to understand about perpendicular lines, and we will now proceed with some examples of this type.

Example 4: Determining the Condition for Two Lines to be Perpendicular Using Their Equations

If lines 𝑦=𝑎𝑥+𝑏 and 𝑦=𝑐𝑥+𝑑 are perpendicular, which of the following products equals 1?

  1. 𝑏 and 𝑐
  2. 𝑏 and 𝑑
  3. 𝑎 and 𝑑
  4. 𝑎 and 𝑐

Answer

Assume that there are two perpendicular lines with slopes 𝑚 and 𝑚. Then, by definition, these slopes must be in the relationship 𝑚=1𝑚. Alternatively, we can express this in the form 𝑚𝑚=1.

With this alternative expression now being established, we see that the two given lines are written in slope–intercept form. Hence, the slopes are respectively 𝑎 and 𝑐. For these lines to be perpendicular, we require that 𝑎=1𝑐, or, alternatively, that 𝑎𝑐=1. Therefore, the product of 𝑎 and 𝑐 is 1, which corresponds to option D above.

We will now give two final examples that will require us to understand the criteria for two lines to be perpendicular as well as all of the different formulae for straight lines that we gave at the beginning of this explainer. For both examples, we will complete the working algebraically and then plot the graphs of the straight lines as a confirmatory step. Given that we will always be talking about perpendicular lines, we will expect to observe the behavior that we noted earlier: that if one line has a positive slope, then the other will have a negative slope (and vice versa), meaning that one line will always be going uphill, while the other will always be going downhill.

Example 5: Finding the Equation of a Straight Line That is Perpendicular to Another Given Line

Find, in slope–intercept form, the equation of the line perpendicular to 𝑦=2𝑥4 that passes through the point 𝐴(3,3).

Answer

We are conveniently given the first line in slope–intercept form, which means that we can directly read off the slope as 𝑚=2. For any other line to be perpendicular, the two slopes must obey the relationship 𝑚=1𝑚, which gives the slope of the second line as 𝑚=12. We will choose to write this as 𝑚=12.

The equation of a straight line with slope 𝑚 that goes through the point (𝑥,𝑦) is given by 𝑦𝑦=𝑚(𝑥𝑥).

We substitute 𝑚=12 and (𝑥,𝑦)=(3,3) into this expression, giving 𝑦(3)=12(𝑥3).

Rearranging and solving for 𝑦 gives the equation in slope–intercept form: 𝑦=12𝑥32.

In the graph below, we have plotted the first line in red and the second, perpendicular line in green. As we can see, the two lines do appear to be perpendicular, and the second line passes through the point (3,3), as shown in black. The two slopes have opposite signs, which is also reflected in the diagram.

Example 6: Determining in Slope–Intercept Form the Equation of a Line given a Perpendicular Line

Determine, in slope–intercept form, the equation of the line passing through 𝐴(13,7) and perpendicular to the line passing through 𝐵(8,9) and 𝐶(8,10).

Answer

We will first calculate the slope of the straight line that passes through the points 𝐵 and 𝐶. The slope for a straight line through the two points (𝑥,𝑦) and (𝑥,𝑦) is as follows: 𝑚=𝑦𝑦𝑥𝑥.

We substitute the values (𝑥,𝑦)=(8,9) and (𝑥,𝑦)=(8,10) into this equation, giving 𝑚=10(9)88=1916.

With this result established, we are now interested in finding the equation of the straight line that is perpendicular to the initial line while passing through the point 𝐴(13,7). If the slope of the second line is 𝑚, then we must have the relationship 𝑚=1𝑚, which gives 𝑚=1=1619. We will write this more simply as 𝑚=1619. We can now find the equation of this line by recalling that the equation for a straight line with a known slope that passes through the point (𝑥,𝑦) is given by the formula 𝑦𝑦=𝑚(𝑥𝑥).

Now, substituting 𝑚=1619 and (𝑥,𝑦)=(13,7) into this equation gives 𝑦(7)=1619(𝑥13).

Solving this equation for 𝑦 gives the slope–intercept form 𝑦=1619𝑥34119.

Below, we have plotted the initial straight line in red, and this passes through the two points 𝐵 and 𝐶, which are plotted in purple. The second line is plotted in green, and this is clearly perpendicular to the red line, also passing through the given point 𝐴.

Key Points

  • The slope–intercept form of a straight line is given by 𝑦=𝑚𝑥+𝑏, where 𝑚 is the slope and 𝑏 is the 𝑦-intercept.
  • An equation with slope 𝑚 that goes through the point (𝑥,𝑦) can be written as 𝑦𝑦=𝑚(𝑥𝑥), which can be rearranged into slope–intercept form.
  • The equation of a straight line through the two points (𝑥,𝑦) and (𝑥,𝑦) can be written as 𝑦𝑦𝑦𝑦=𝑥𝑥𝑥𝑥, which can also be rearranged into slope–intercept form.
  • Take two straight lines with slopes 𝑚 and 𝑚. These lines are parallel if 𝑚=𝑚 (and the two 𝑦-intercepts are different).
  • If we have the relation 𝑚=1𝑚, then the two straight lines are perpendicular and it is guaranteed that they will meet each other. This relationship is sometimes written in the form 𝑚𝑚=1.

Download the Nagwa Classes App

Attend sessions, chat with your teacher and class, and access class-specific questions. Download the Nagwa Classes app today!

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.