Video: Equation of a Straight Line: General Form

In this video, we will learn how to find and write the equation of a straight line in general form.

17:32

Video Transcript

In this video, we will learn how to find and write the equation of a straight line in its general form. We’ll see how to do this when we’re given the coordinates of two points which lie on the line. And we’ll also see how we can do this from the graph of a straight line. You should already be familiar with how to calculate the slope of a straight line either from two points or from its graph, although we will review this in our examples.

So the general form of the equation of a straight line then. The exact letters you use most often may vary depending on where in the world you are. But the two most commonly used forms are 𝑦 equals π‘šπ‘₯ plus 𝑏 or sometimes 𝑦 equals π‘šπ‘₯ plus 𝑐. The values of π‘š and 𝑏 or 𝑐 have important meanings in terms of the graph of the line.

The value π‘š first of all, which is the coefficient of π‘₯ in this equation, refers to the slope of the line. For every one unit the line moves to the right, the line will move π‘š units up. If π‘š is negative, then this will mean that the line has a negative slope. It slopes downwards from left to right.

There are lots of different ways that people think about calculating the slope. The first is as change in 𝑦 over change in π‘₯. That’s the vertical change over the horizontal change between two points that lie on the line. Formally, if those two points have the coordinates π‘₯ one, 𝑦 one and π‘₯ two, 𝑦 two, then this can be written as 𝑦 two minus 𝑦 one over π‘₯ two minus π‘₯ one. The difference in the 𝑦-values over the difference in the π‘₯-values.

Or another more casual way that people sometimes like to think of this value π‘š is as the rise over the run. Rise being a vertical change and run being a horizontal change. It doesn’t really matter which way you prefer to think of it as long as you’re comfortable with calculating the slope of the line.

Going back to our general form, the value of 𝑏 or 𝑐 refers to the 𝑦-intercept of the line. That’s the 𝑦-value at which the line intercepts the 𝑦-axis. For this reason then, because the values of π‘š and 𝑏 or 𝑐 represent the slope and 𝑦-intercept of a straight line, an equation given in this form is sometimes referred to as the slope–intercept form.

To find the equation of a straight line in this general form, we just need to determine the values of these two constants. Let’s see how we can do this in the context of an example.

Find the equation of the line that passes through the points 𝐴: five, 11 and 𝐡: 10, 21.

In this question then, we’ve been given the coordinates of two points that lie on the line. We’re going to find the equation of this line in its general form. That’s 𝑦 equals π‘šπ‘₯ plus 𝑏 or sometimes 𝑦 equals π‘šπ‘₯ plus 𝑐, where π‘š represents the slope of the line and 𝑏 represents the 𝑦-intercept.

We’re going to calculate the slope or gradient of this line first of all. And we can do this using the formula change in 𝑦 over change in π‘₯ or more formally 𝑦 two minus 𝑦 one over π‘₯ two minus π‘₯ one, where π‘₯ one, 𝑦 one and π‘₯ two, 𝑦 two represent the coordinates of the two points on the line. We can think of point 𝐴 as π‘₯ one, 𝑦 one and point 𝐡 as π‘₯ two, 𝑦 two, although it doesn’t actually matter which way round we do this, as long as we’re consistent about the order we subtract for both π‘₯ and 𝑦.

So substituting the values for these two coordinates, we have 21 minus 11 for the change in 𝑦 and 10 minus five for the change in π‘₯. That gives 10 over five, which is equal to two.

Now, it’s really important to remember that we must divide the change in 𝑦 by the change in π‘₯. A really common mistake is to do this the other way round, so to divide the change in π‘₯ by the change in 𝑦. But in this case, that would give five over 10, which is equal to a half. We would get the reciprocal of the slope we actually need. The other common mistake is to subtract one set of values in the wrong order. We must make sure that we always subtract in the same order for both π‘₯ and 𝑦. If we don’t, we’ll end up with the exact negative of the slope we want, which again will be incorrect.

Now that we know the slope of the line is two, we can substitute this value of π‘š into the equation. So we know that the equation of our line is in the form 𝑦 equals two π‘₯ plus 𝑏. To determine the value of 𝑏, we use the fact that each of these points, points capital 𝐴 and capital 𝐡, lie on our line, which means we have two pairs of π‘₯- and 𝑦-values which must satisfy this equation.

We don’t need to use both of them. Let’s just consider point 𝐴, which tells us that when π‘₯ is equal to five, 𝑦 is equal to 11. We can therefore substitute these values of π‘₯ and 𝑦 into our equation 𝑦 equals two π‘₯ plus 𝑏 to enable us to find the value of 𝑏. Doing so gives 11 equals two multiplied by five plus 𝑏. This is a relatively straightforward equation to solve. Two multiplied by five is 10. And then if we subtract 10 from each side, we find that the value of 𝑏 is one. So we can substitute this value of 𝑏 into the equation of our straight line. And we now have that the equation of this line in its general form is 𝑦 equals two π‘₯ plus one.

Now, we use the coordinates of point 𝐴 here. But it’s just worth pointing out we could equally have used the coordinates of point 𝐡, which tell us that when π‘₯ is equal to 10, 𝑦 is equal to 21. We would then have a different equation to solve. But it gives the same solution of 𝑏 equals one. The equation of the straight line passing through the two given points then is 𝑦 equals two π‘₯ plus one.

Let’s now consider a second example using a table of values.

Write the equation of the line that passes through the points indicated in the table of values.

Now, this table is just a different way of presenting the coordinates of two points that lie on the line. We’re told that when π‘₯ is equal to three, 𝑦 is equal to 12. So we have the point three, 12. And when π‘₯ is equal to seven, 𝑦 is equal to zero. So we also have the point seven, zero.

We know that the general equation of a straight line is 𝑦 equals π‘šπ‘₯ plus 𝑏, where π‘š represents the slope and 𝑏 represents the 𝑦-intercept. To calculate the slope first of all, we can use the formula change in 𝑦 over change in π‘₯. Subtracting the coordinates of our first point from the coordinates of our second then, we have zero minus 12 for the change in 𝑦 and seven minus three for the change in π‘₯.

Remember, we must make sure we subtract our coordinates in the same order. We don’t simply subtract the smaller from the larger. This gives negative 12 over four, which simplifies to negative three. So the equation of our line is 𝑦 equals negative three π‘₯ plus 𝑏, and we need to determine the value of 𝑏. To do this, we can use the coordinates of either point as they each lie on the line.

Let’s use the point seven, zero. We substitute seven for π‘₯ and zero for 𝑦, giving the equation zero equals negative three multiplied by seven plus 𝑏. That simplifies to zero equals negative 21 plus 𝑏. And adding 21 to each side, we find that 𝑏 is equal to 21. We can then substitute this value of 𝑏 into the equation of our line, and we have our answer. 𝑦 equals negative three π‘₯ plus 21.

Sometimes if the values of either the slope π‘š or 𝑦-intercept 𝑏 are fractional, it may be preferable to give our answer in an equivalent form that doesn’t involve fractions. For example, suppose we found the equation of a straight line and it was 𝑦 equals a half π‘₯ minus four. In order to eliminate the fraction of one-half, we could multiply the entire equation by the denominator of two. If we do this though, we must remember to multiply every single term in the equation by two.

So on the left-hand side, we’d have two 𝑦. And on the right-hand side, we’d have π‘₯ minus eight. A really common mistake would be to forget to multiply the constant term by two. The equation of this line is equivalent to 𝑦 equals a half π‘₯ minus four, but it doesn’t involve any fractions.

Now, it’s more usual in this instance to give our answers in the form π‘Žπ‘₯ plus 𝑏𝑦 plus 𝑐 equals zero, which just means we group all of the terms on the same side of the equation. And we have zero on the other side. We could do this by subtracting two 𝑦 from each side of the equation to give the equation π‘₯ minus two 𝑦 minus eight is equal to zero. Or equivalently, we could subtract π‘₯ and add eight to each side to give the equation negative π‘₯ plus two 𝑦 plus eight equals zero, which is the exact negative of the previous equation we wrote down.

Another commonly used form is to group the π‘₯ and 𝑦 terms on one side of the equation and the constant term on the other. So an example of this would be the equation negative π‘₯ plus two 𝑦 equals negative eight. All of these are simply rearrangements of the original equation, so they’re all equivalent. We just need to make sure we read any questions carefully and give our answers in the required form. Let’s look at an example of this.

Find the equation of the line that passes through the points 𝐴: negative 10, two and 𝐡: zero, five, giving your answer in the form of π‘Žπ‘¦ plus 𝑏π‘₯ plus 𝑐 is equal to zero.

Now, we’ve been asked to find the equation of this straight line in a specific form, with all of the terms on the same side of the equation. But we’ll begin by using the general form of the equation of a straight line. That’s 𝑦 equals π‘šπ‘₯ plus 𝑏, where π‘š is the slope of the line and 𝑏 is its 𝑦-intercept.

Now, it’s important to be aware here that this value 𝑏 is not necessarily the same in our general equation and in the requested form. We’re told that the line passes through the point with coordinates zero, five. So the 𝑦-intercept of our line is zero, five. And we can work out straightaway that the value 𝑏 in our general form is five.

To work out the value of π‘š, we can use the formula change in 𝑦 over change in π‘₯. Subtracting the coordinates of 𝐴 from those of 𝐡, and we have five minus two over zero minus negative 10. We need to be really careful here because we are subtracting a negative value. A common mistake would be to just have zero minus 10 in the denominator. But that wouldn’t actually be subtracting the π‘₯-coordinate of 𝐴 from the π‘₯-coordinate of 𝐡.

Simplifying, we have three in the numerator. And in the denominator, zero minus negative 10 is zero plus 10, which is 10. So the slope of the line is three-tenths. Substituting the values of π‘š and 𝑏 into the equation of our straight line then, and we have 𝑦 equals three-tenths of π‘₯ plus five.

Now, this isn’t in the required form because we’re asked to collect all the terms on the same side of the equation. And although the question doesn’t explicitly say this, the values of π‘Ž, 𝑏, and 𝑐 that we use should be integers. We have a fraction of three-tenths. But we can eliminate this by multiplying each side by the denominator of 10. Doing so and remembering we need to multiply every term in the equation, including the constant term, by 10, we get 10𝑦 equals three π‘₯ plus 50. Grouping all the terms on the left-hand side by subtracting three π‘₯ and subtracting 50 gives the equation 10𝑦 minus three π‘₯ minus 50 equals zero, which is in the requested form.

Alternatively, we could’ve grouped the terms on the other side of the equation, which would give the equivalent form negative 10𝑦 plus three π‘₯ plus 50 equals zero, the exact negative of the equation we’ve given.

So in this example, we’ve seen how to give the equation of a straight line in an alternative but equivalent form. In our next example, we’ll see how we can use knowledge about the π‘₯- and 𝑦-intercepts of a straight line to determine its equation.

What is the equation of the line with π‘₯-intercept negative three and 𝑦-intercept four?

Let’s begin by considering a sketch of this line. We know its π‘₯-intercept is negative three and its 𝑦-intercept is four. So the line looks a little something like this. We can see that this line has a positive slope. So we can use this fact to sense-check our answer.

First, we’ll consider the equation of this line in its general form 𝑦 equals π‘šπ‘₯ plus 𝑏. Now, we can actually work out the value of 𝑏 straightaway because we’ve been given the 𝑦-intercept explicitly in the question. The value of 𝑏 is four. So our equation has the form 𝑦 equals π‘šπ‘₯ plus four. To calculate the slope π‘š, we can use change in 𝑦 over change in π‘₯ or the more casual rise over run.

From our sketch, we can see that the vertical change or the rise is from zero, which will be the 𝑦-value on the π‘₯-axis, to four. That’s a change of four units. And the horizontal change is from negative three to zero. That’s a change of three units. That gives a slope of four-thirds. This value is positive. So this is indeed consistent with our starting sketch.

Substituting the values of π‘š and 𝑏 into the general equation of our straight line then, and we have 𝑦 equals four-thirds π‘₯ plus four. Now, this would be an acceptable form in which to give our answer, but it does involve fractions. And we often prefer to work without fractions. So let’s find an equivalent form.

To eliminate the fractions, we can multiply the entire equation by the denominator of three. Doing so, and we have three 𝑦 equals four π‘₯ plus 12. Remember, we must multiply every term by three, including the constant term. Now, this would be an acceptable form in which to give your answer. Or we could choose to collect the π‘₯ and 𝑦 terms on one side and leave the constant term on the other. Subtracting four π‘₯ from each side of the equation, and we have our answer in this form. Three 𝑦 minus four π‘₯ is equal to 12.

In our final example, we’ll practice finding the equation of a straight line when we’ve been given its graph.

Write the equation represented by the graph shown. Give your answer in the form 𝑦 equals π‘šπ‘₯ plus 𝑏.

We recall firstly that, in the general form of the equation of a straight line 𝑦 equals π‘šπ‘₯ plus 𝑏, π‘š represents the slope of the line and 𝑏 represents the 𝑦-intercept. We need to determine each of these values from the graph. We can see the 𝑦-intercept of this line straightaway. It crosses the 𝑦-axis at four. So the value of 𝑏 is four.

We can calculate the value of π‘š using the formula change in 𝑦 over change in π‘₯. And to do this, we need to identify any two points on the graph. We’ve already identified the 𝑦-intercept. How about we consider the π‘₯-intercept? That’s the point with coordinates negative two, zero. From the graph, we can see that between these two points, the change in 𝑦 is four units. It’s a positive change. And the change in π‘₯ is two units, again a positive change. So the slope is four over two, which is equal to two.

Now, remember, the slope of the line will be the same no matter which points we used to calculate it. We could equally have used the point negative four, negative four or the point one, six. It doesn’t matter. We’ll get the same slope in each case. Finally, we substitute the values of π‘š and 𝑏 into the general form, giving our answer to the problem. 𝑦 equals two π‘₯ plus four.

Let’s now summarize the key points from this video. Firstly, the general equation of a straight line is the form 𝑦 equals π‘šπ‘₯ plus 𝑏 or sometimes 𝑦 equals π‘šπ‘₯ plus 𝑐, where π‘š represents the slope of the line and 𝑏 or 𝑐 represent its 𝑦-intercept. For this reason, this form is sometimes referred to as slope–intercept form. The slope π‘š can be calculated either from two points which lie on the line or from a graph using change in 𝑦 over change in π‘₯. This can be formalized as 𝑦 two minus 𝑦 one over π‘₯ two minus π‘₯ one. Or we can think of it more casually as rise over run.

Once we’ve found the slope, the 𝑦-intercept 𝑏 or 𝑐 can be found by substituting the coordinates of any point that we know lies on the line. Or it can be found from a graph. To avoid having fractional values, we can also give the equations of straight lines in alternative equivalent forms, such as π‘Žπ‘¦ plus 𝑏π‘₯ plus 𝑐 equals zero or π‘Žπ‘¦ plus 𝑏π‘₯ equals 𝑐. Although we need to be careful that we’re aware that the values of π‘Ž, 𝑏, and 𝑐 will not all be the same between the three different forms.

When answering questions on finding the equations of straight lines, we need to make sure we read the question carefully and always give our answer in the form that has been requested.

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