Lesson Explainer: Equations of Parallel and Perpendicular Lines Mathematics • 11th Grade

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


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.


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 π‘Ž?


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


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)=π‘₯βˆ’14βˆ’1.

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 𝑐


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


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


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)βˆ’8βˆ’8=βˆ’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.

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