Lesson Explainer: Equations of Straight Lines | Nagwa Lesson Explainer: Equations of Straight Lines | Nagwa

Lesson Explainer: Equations of Straight Lines Mathematics

Join Nagwa Classes

Attend live Mathematics sessions on Nagwa Classes to learn more about this topic from an expert teacher!

In this explainer, we will learn how to find the equation of a line in the form π‘¦βˆ’π‘¦=π‘š(π‘₯βˆ’π‘₯) or π‘Žπ‘₯+𝑏𝑦+𝑐=0 given the slope and one point, or two different points, that it passes through.

An equation of a straight line, or a linear equation, in two variables is any polynomial equation of degree 1 containing exactly two variables (usually π‘₯ and 𝑦). You have already encountered equations of straight lines in the slope–intercept form, that is, in the form 𝑦=π‘šπ‘₯+𝑐, which describe a straight line in the plane, with slope π‘š, crossing the 𝑦-axis at the point (0,𝑐). An example of a polynomial equation that is not linear might be something of the form 𝑦=π‘Žπ‘₯+𝑏π‘₯+𝑐. This equation contains a term of degree 2, namely π‘₯, and is therefore not an equation of a straight line. It is a quadratic equation and if you were to draw its graph, you would not get a straight line but a curveβ€”a parabola.

In this explainer, we will look at equations of straight lines in two other forms: the point–slope form, π‘¦βˆ’π‘¦=π‘š(π‘₯βˆ’π‘₯), and the general form, π‘Žπ‘₯+𝑏𝑦+𝑐=0, and we will learn how to derive these equations from two pieces of data: either two given points on the line in question or a single point on the line and the line’s slope.

Let us consider first the point–slope form of an equation of a straight line: π‘¦βˆ’π‘¦=π‘š(π‘₯βˆ’π‘₯). Here, π‘₯ and 𝑦 are the variables, π‘š denotes the slope of the line, and π‘₯ and π‘¦οŠ§ are the π‘₯- and 𝑦-coordinates of any given point (π‘₯,𝑦) that lies on the line. One way to think about this form of an equation of a straight line is as a reformulation of the definition of the slope.

The slope of a straight line is defined as follows: slopechangeinchangeinπ‘š=𝑦π‘₯.

If we are given two points on the line, say 𝑃(π‘₯,𝑦) and 𝑄(π‘₯,𝑦), then we can calculate the ratio of the change in 𝑦 to the change in π‘₯ using the differences of the 𝑦-coordinates and π‘₯-coordinates of the two points. That is, slopechangeinchangeinπ‘š=𝑦π‘₯=π‘¦βˆ’π‘¦π‘₯βˆ’π‘₯.

Taking 𝑄 to be the β€œgeneral point” (π‘₯,𝑦) on the line, we have π‘š=π‘¦βˆ’π‘¦π‘₯βˆ’π‘₯, and multiplying everything by (π‘₯βˆ’π‘₯) yields π‘¦βˆ’π‘¦=π‘š(π‘₯βˆ’π‘₯).

We can also convert back and forth between the slope–intercept and point–slope forms. On the one hand, given an equation of a line in the slope–intercept form 𝑦=π‘šπ‘₯+𝑐, we can rearrange it as (π‘¦βˆ’0)=π‘šο€»π‘₯βˆ’βˆ’π‘π‘šο‡, which is in point–slope form; the point (π‘₯,𝑦)=ο€»0,βˆ’π‘π‘šο‡οŠ§οŠ§ is the π‘₯-intercept of the line. On the other hand, given a straight line equation in the point–slope form π‘¦βˆ’π‘¦=π‘š(π‘₯βˆ’π‘₯), we can first expand the bracket: π‘¦βˆ’π‘¦=π‘šπ‘₯βˆ’π‘šπ‘₯. Then, we can rearrange for 𝑦=π‘šπ‘₯+π‘¦βˆ’π‘šπ‘₯, which is in slope–intercept form; π‘¦βˆ’π‘šπ‘₯ is the 𝑦-coordinate of the line’s 𝑦-intercept.

To write down the point–slope form of a straight line equation given that the slope and a point on the line are straightforward, let us look at an example.

Example 1: Finding the Equation of a Line given the Slope and a Point on the Line

Find, in point–slope form, the equation of the graph with slope 4 that passes through the point (2,βˆ’3).

Answer

The question tells us that we should give our answer in point–slope form. Therefore, the first thing to do is to write down the point–slope form of an equation of a straight line: π‘¦βˆ’π‘¦=π‘š(π‘₯βˆ’π‘₯).

The only thing to do now is to substitute in the relevant quantities. In this equation, π‘š denotes the slope of the line, which we are told is π‘š=4. The quantities π‘₯ and π‘¦οŠ§ are the π‘₯- and 𝑦-coordinates of any point on the line. This we are also given: (2,βˆ’3) is a point on the line, so we can take π‘₯=2 and 𝑦=βˆ’3. Hence, our answer is π‘¦βˆ’(βˆ’3)=4(π‘₯βˆ’2) or 𝑦+3=4(π‘₯βˆ’2).

Both the point–slope and the slope–intercept forms are useful forms of an equation of a straight line. As we saw in the previous example, they are often easy to write down, and they are also easy to interpret, giving one immediate access to the slope of the line in question and the coordinates of a point on it. However, both forms have a small problem: not every straight line can be written in these forms. Specifically, lines of the form π‘₯=π‘Ž for any constant π‘Ž, that is, lines parallel to the 𝑦-axis, cannot be written in these forms since the slopes of such lines are not defined. For this reason, we will sometimes need to use the general form of an equation of a straight line π‘Žπ‘₯+𝑏𝑦+𝑐=0. Fortunately, converting from point–slope form to general form is just a matter of rearrangement: π‘¦βˆ’π‘¦=π‘š(π‘₯βˆ’π‘₯)π‘¦βˆ’π‘¦=π‘šπ‘₯βˆ’π‘šπ‘₯𝑦+(βˆ’π‘š)π‘₯+(π‘šπ‘₯βˆ’π‘¦)=0, where this corresponds to π‘Ž=βˆ’π‘š, 𝑏=1, and 𝑐=π‘šπ‘₯βˆ’π‘¦οŠ§οŠ§ in the general form. Similarly, we can rearrange to slope–intercept form to get 𝑦=π‘šπ‘₯+π‘˜π‘¦βˆ’π‘šπ‘₯βˆ’π‘˜=0, where π‘Ž=βˆ’π‘š, 𝑏=1, and 𝑐=βˆ’π‘˜.

Now, what if we are given not a line’s slope and a point on it, but two points on a line? In order to write down an equation of the line in this situation, we must first calculate the slope of the line. As above, the slope π‘š of a line can be calculated by slopechangeinchangeinπ‘š=𝑦π‘₯=π‘¦βˆ’π‘¦π‘₯βˆ’π‘₯, where 𝑃(π‘₯,𝑦) and 𝑄(π‘₯,𝑦) are two points on the line. Now that we have the slope of the line and a point on it (in fact, two: you can pick either 𝑃 or 𝑄), we can write down an equation for the line in point–slope form just as in the previous example.

Example 2: Finding the Equation of a Line in General Form given Two Points on the Line

A line 𝐿 passes through the points (3,3) and (βˆ’1,0). Work out the equation of the line, giving your answer in the form π‘Žπ‘₯+𝑏𝑦+𝑐=0.

Answer

First, we calculate the slope of the line using slopechangeinchangein=𝑦π‘₯=π‘¦βˆ’π‘¦π‘₯βˆ’π‘₯=0βˆ’3βˆ’1βˆ’3=βˆ’3βˆ’4=34. Now, we can substitute the slope 34 and the coordinates of a point on the line into the point–slope form of the equation of the line: π‘¦βˆ’π‘¦=π‘š(π‘₯βˆ’π‘₯). Substituting the coordinates of the point (3,3), we get the equation π‘¦βˆ’3=34(π‘₯βˆ’3).

To convert this equation into general form π‘Žπ‘₯+𝑏𝑦+𝑐=0, we first collect all nonzero terms on the left-hand side: 𝑦=34π‘₯+34π‘¦βˆ’34π‘₯βˆ’34=0. Then, we multiply everything by 4 to get integral coefficients: βˆ’3π‘₯+4π‘¦βˆ’3=0.

So, the equation of the line passing through the points (3,3) and (βˆ’1,0) in general form π‘Žπ‘₯+𝑏𝑦+𝑐=0 is βˆ’3π‘₯+4π‘¦βˆ’3=0.

In the previous example, after calculating the slope of the line, we substituted in the coordinates of one of the points we were givenβ€”the point (3,3)β€”to obtain an equation for the line. However, we were given two points on the line, not one. What if we had used the coordinates of the other point? Would this not give us a different equation?

Indeed, substituting the coordinates of (βˆ’1,0) into π‘¦βˆ’π‘¦=34(π‘₯βˆ’π‘₯) yields π‘¦βˆ’0=34(π‘₯βˆ’(βˆ’1)) or 𝑦=34(π‘₯+1), which is certainly not the same equation as π‘¦βˆ’3=34(π‘₯βˆ’3). However, while these two equations are different, they describe the same line, since by multiplying out the right-hand side and simplifying, we get π‘¦βˆ’3=34(π‘₯βˆ’3)=34π‘₯βˆ’94𝑦=34π‘₯βˆ’94+3=34π‘₯+34. The first equation yields the same equation in slope–intercept form as when we apply this procedure to the second equation: 𝑦=34(π‘₯+1)=34π‘₯+34.

So, we have shown that regardless of the choice of points, we will always arrive at the same equation upon rearranging. In general, this is a quality that applies to any point on the line that we choose.

The examples that follow are variations on this theme of finding the equation of a line given its slope and a point or given two points on the line.

Example 3: Finding the Equation of a Line given Its Slope and Given That It Shares Its 𝒙- or π’š-Intercept with Another Given Line

The line 𝑦=4π‘₯βˆ’8 crosses the π‘₯-axis at the point 𝐴. Find the equation of the line with a slope of βˆ’3 passing through the point 𝐴.

Answer

This is an example of a question in which we are being asked to find the equation of a line given its slope and a point on it. The only complication here is that the point we are given is slightly β€œdisguised.”

First of all, write down the point–slope form of the equation of the line: π‘¦βˆ’π‘¦=π‘š(π‘₯βˆ’π‘₯). We can immediately substitute in the value of the slope π‘š=βˆ’3 since we are given this in the question: π‘¦βˆ’π‘¦=βˆ’3(π‘₯βˆ’π‘₯).

We are also given a point on the line: 𝐴. The question is, what are the coordinates (π‘₯,𝑦) of this point? We are told that 𝐴 is the point at which the line 𝑦=4π‘₯βˆ’8 crosses the π‘₯-axis. Since the π‘₯-axis is the collection of all points on the plane with 𝑦-coordinate zero, we can substitute zero for 𝑦 in the equation 𝑦=4π‘₯βˆ’8 to find the π‘₯-coordinate of this line’s π‘₯-intercept: 0=4π‘₯βˆ’84π‘₯=8π‘₯=2. Hence, the coordinates of the point 𝐴 are (2,0). We can now substitute these coordinates into π‘¦βˆ’π‘¦=βˆ’3(π‘₯βˆ’π‘₯) giving us a final answer of π‘¦βˆ’0=βˆ’3(π‘₯βˆ’2) or 𝑦=βˆ’3(π‘₯βˆ’2).

In the previous example, we were not given the coordinates of a point on the line directly but had to deduce it from the information given to us. In this next example, we will investigate the case when one of the points is given as the intersection point of two other lines.

Example 4: Finding the Equation of a Line given a Point on the Line and Given That It Passes through the Intersection Point of Two Other Given Lines

The lines 𝑦=βˆ’13π‘₯+6 and 𝑦=π‘₯βˆ’2 intersect at the point 𝑆. The point 𝑇 has coordinates (βˆ’5,8). Find the equation of the line passing through the points 𝑆 and 𝑇.

Answer

In this question, we are being asked to find the equation of a line given two points 𝑆 and 𝑇 on that line. We are given the coordinates of the point 𝑇 but are only told that the point 𝑆 is the intersection point of two other lines. We will therefore need to do a little work to calculate the coordinates of 𝑆. We will proceed as follows:

  • Calculate the coordinates of the point 𝑆.
  • Use the points 𝑆 and 𝑇 to calculate the slope of the line passing through them.
  • Substitute the slope of the line and the coordinates of either point 𝑆 or 𝑇 into the point–slope form of the equation of a straight line to find the equation we are looking for.

So, we begin by calculating the coordinates of the point 𝑆. We have that 𝑆 is the intersection of the lines 𝑦=βˆ’13π‘₯+6 and 𝑦=π‘₯βˆ’2. So, we can find the coordinates of this point by setting the 𝑦-variables in each equation to be equal to each other. That is, we have π‘₯βˆ’2=βˆ’13π‘₯+6. To simplify this, we can multiply everything by 3, 3π‘₯βˆ’6=βˆ’π‘₯+18, and then collect the terms in π‘₯ on the left to get 3π‘₯+π‘₯βˆ’6=18 and the constant terms on the right to get 4π‘₯=18+6=24. Then, we divide by 4 to get π‘₯=6. Now, substitute π‘₯=6 into either of the equations 𝑦=βˆ’13π‘₯+6 or 𝑦=π‘₯βˆ’2 to find the 𝑦-coordinate of the point 𝑆: 𝑦=6βˆ’2=4. So, the coordinates of 𝑆 are (6,4).

We can now calculate the slope of the line passing through 𝑆(6,4) and 𝑇(βˆ’5,8): slopechangeinchangein=𝑦π‘₯=π‘¦βˆ’π‘¦π‘₯βˆ’π‘₯=8βˆ’4βˆ’5βˆ’6=4βˆ’11=βˆ’411. The last step is to substitute our slope π‘š=βˆ’411 and the coordinates of either 𝑆 or 𝑇 into the point–slope form of the equation of a straight line, π‘¦βˆ’π‘¦=π‘š(π‘₯βˆ’π‘₯), to find the equation we are looking for. So, our final answer is π‘¦βˆ’4=βˆ’411(π‘₯βˆ’6), using the point 𝑆, or π‘¦βˆ’8=βˆ’411(π‘₯+5), using the point 𝑇.

In this final example, we will calculate an equation of a straight line given the data of two points on the line, neither of which are given explicitly by coordinates.

Example 5: Finding the Equation of a Line That Passes through the 𝒙- and π’š-Intercepts of Two Other Lines

Find the equation of the line joining the π‘₯-intercept of the line 𝑦=βˆ’3π‘₯βˆ’9 with the 𝑦-intercept of the line 𝑦=12π‘₯+5. Give your answer in the form π‘Žπ‘₯+𝑏𝑦+𝑐=0, where π‘Ž, 𝑏, and 𝑐 are integers.

Answer

Once we have calculated the coordinates of the π‘₯-intercept of the line 𝑦=βˆ’3π‘₯βˆ’9 and the 𝑦-intercept of the line 𝑦=12π‘₯+5, this is simply a question of working out the equation of a line passing through two given points and then converting that equation to the general form π‘Žπ‘₯+𝑏𝑦+𝑐=0.

Since we are given the equation of the line 𝑦=12π‘₯+5 in slope–intercept form, the coordinates of its 𝑦-intercept may be read off directly: it crosses the 𝑦-axis at (0,5). Let us call this point 𝑃(0,5).

To find the π‘₯-intercept of the line 𝑦=βˆ’3π‘₯βˆ’9, we substitute 𝑦=0 into its equation: 0=βˆ’3π‘₯βˆ’93π‘₯=βˆ’9π‘₯=βˆ’3, giving us the coordinates (βˆ’3,0). Let us call this point 𝑄(βˆ’3,0).

It may be helpful to draw a sketch at this point.

The next step is to calculate the slope of the line passing through 𝑃(0,5) and 𝑄(βˆ’3,0): slopechangeinchangein=𝑦π‘₯=π‘¦βˆ’π‘¦π‘₯βˆ’π‘₯=0βˆ’5βˆ’3βˆ’0=βˆ’5βˆ’3=53.

At this point, we could substitute into the point–slope form of the equation of a straight line, but since we actually know the 𝑦-intercept of our line (namely (0,5)), it is easier to use the slope–intercept form 𝑦=π‘šπ‘₯+𝑐. So, substituting, we have 𝑦=53π‘₯+5. This is an equation for the line passing through the points 𝑃 and 𝑄. All that remains now is to convert this into the general form π‘Žπ‘₯+𝑏𝑦+𝑐=0 with π‘Ž, 𝑏, and 𝑐 as integers. First, we collect all nonzero terms on the left-hand side: βˆ’53π‘₯+π‘¦βˆ’5=0. Finally, we multiply everything by βˆ’3 for our final answer: 5π‘₯βˆ’3𝑦+15=0.

Let us finish by recapping a few important concepts from this explainer.

Key Points

  • Given the slope π‘š of a line 𝐿 and the coordinates (π‘₯,𝑦) of a point on 𝐿, you can write down an equation for 𝐿 by substituting π‘š, π‘₯, and π‘¦οŠ§ into the point–slope form of the equation of a straight line: π‘¦βˆ’π‘¦=π‘š(π‘₯βˆ’π‘₯).
  • If you are given two points 𝑃(π‘₯,𝑦) and 𝑄(π‘₯,𝑦) on a line 𝐿, you can write down an equation for 𝐿 by first calculating its slope using the formula slopechangeinchangein=𝑦π‘₯=π‘¦βˆ’π‘¦π‘₯βˆ’π‘₯ and then substituting this along with the coordinates of either of the points 𝑃 or 𝑄 into the point–slope form of the equation of a straight line as before.
  • It is sometimes necessary to write down the equation of a straight line in the general form π‘Žπ‘₯+𝑏π‘₯+𝑐=0, not least because not all lines have equations of slope–intercept or point–slope forms (namely lines π‘₯=π‘Ž for constant π‘Ž, parallel to the 𝑦-axis). You can convert from slope–intercept or point–slope form to general form by rearranging π‘¦βˆ’π‘¦=π‘š(π‘₯βˆ’π‘₯)βŸΆπ‘¦+(βˆ’π‘š)π‘₯+(π‘šπ‘₯βˆ’π‘¦)=0,𝑦=π‘šπ‘₯+π‘˜βŸΆπ‘¦βˆ’π‘šπ‘₯βˆ’π‘˜=0.

Join Nagwa Classes

Attend live sessions on Nagwa Classes to boost your learning with guidance and advice from an expert teacher!

  • Interactive Sessions
  • Chat & Messaging
  • Realistic Exam Questions

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