Equations of a line

Return to Module 0 page

Any non-vertical line in a plane can be represented by an equation that specifies Below we will look at finding the equation of a line if we are given certain information. These explanations need to be written for use in a number of different courses. For most of those courses we write the slope-intercept form of a linear equation as y = m*x + b, where m is the slope and b is the second coordinate of the y-intercept. In statistics, however, we write the slope-intercept form of a linear equation as y = a + b*x, where a is the second coordinate of the y-intercept and b is the slope. Because we have two different forms of the equation of a line the presentation will be given in a two-column table. The left column will use the y = m*x + b form and the right column, probably of interest only to students in statistics, will use the y = a + b*x form.

Using the slope-intercept form:
y = m*x + b
Using the slope-intercept form:
y = a + b*x
Situation 1: Find the equation of a line if we are told that the slope is ¾ and the y-intercept is at the point (0,5).
We have the y-intercept form as y = m*x + b, where m is the slope and b is the second coordinate of the y-intercept. But we told that m is ¾ and the y-intercept is the point (0,5), which means that b is 5. Therefore, our equation is
y = ¾*x + 5
We have the y-intercept form as y = a + b*x, where a is the second coordinate of the y-intercept and b is the slope. But we told that b is ¾ and the y-intercept is the point (0,5), which means that a is 5. Therefore, our equation is
y = 5 + ¾*x
Situation 2: Find the equation of a line if we are told that the slope is 2.5 and the the line contains the point (4,7).
We have the y-intercept form as y = m*x + b, where m is the slope and b is the second coordinate of the y-intercept. But we told that m is 2.5. However, we have no idea about the value of the y-intercept. We can at least start writing the equation of the line as
y = 2.5*x + b
But we know that the point (4,7) has to make that equation work, so we know that
7 = 2.5*4 + b
We can simplify this to
7 = 10 + b
and then solve that for b,
− 3 = b
But that means that we now know the value of b so our final equation becomes
y = 2.5*x + − 3
We have the y-intercept form as y = a + b*x, where a is the second coordinate of the y-intercept and b is the slope. But we told that b is 2.5. However, we have no idea about the value of the y-intercept. We can at least start writing the equation of the line as
y = a + 2.5*x
But we know that the point (4,7) has to make that equation work, so we know that
7 = a + 2.5*4
We can simplify this to
7 = a + 10
and then solve that for a,
− 3 = a
But that means that we now know the value of a so our final equation becomes
y = − 3 + 2.5*x
Situation 3: Find the equation of a line if we are told that y-intercept is (0,2) the line contains the point (6,-7).
We have the y-intercept form as y = m*x + b, where m is the slope and b is the second coordinate of the y-intercept. But we told that b is 2. However, we have no idea about the value of the slope. We can at least start writing the equation of the line as
y = m*x + 2
But we know that the point (6,-7) has to make that equation work, so we know that
-7 = m*6 + 2
We can simplify this to
-9 = m*6
and then solve that for m,
− 9/6 = m
or
− 3/2 = m
But that means that we now know the value of m so our final equation becomes
y = (− 3/2)*x + 2
We have the y-intercept form as y = a + b*x, where a is the second coordinate of the y-intercept and b is the slope. But we told that a is 2. However, we have no idea about the value of the slope. We can at least start writing the equation of the line as
y = 2 + b*x
But we know that the point (6,-7) has to make that equation work, so we know that
-7 = 2 + b*6
We can simplify this to
-9 = b*6
and then solve that for b,
− 9/6 = b
or
− 3/2 = b
But that means that we now know the value of b so our final equation becomes
y = 2 + (-3/2)*x
Situation 4: Find the equation of a line if we are told that the line contains the point (-4,-2) and the point (8,-5).
We have the y-intercept form as y = m*x + b, where m is the slope and b is the second coordinate of the y-intercept. However, we have no idea about the value of the either the slope or the y-intercept. We do know two points on the line. If we say that point 1 is (x1,y1) = (8,-5) and that point 2 is (x2,y2) = (-4,-2) then we can compute the slope of the line containing those two points as
m = 
y2 − y1 / x2 − x1
 = 
-5 − (-2) / 8 − (-4)
 = 
-3 / 12
 = 
-1 / 4
. Now we know that m=(-1/4). We can at least start writing the equation of the line as
y = (-1/4)*x + b
But we know that the point (8,-5) has to make that equation work, so we know that
-5 = (-1/4)*8 + b
We can simplify this to
-5 = -2 + b
and then solve that for b,
− 3 = b
But that means that we now know the value of b so our final equation becomes
y = (− 1/4)*x + − 3
We have the y-intercept form as y = a + b*x, where a is the second coordinate of the y-intercept and b is the slope. However, we have no idea about the value of the either the slope or the y-intercept. We do know two points on the line. If we say that point 1 is (x1,y1) = (8,-5) and that point 2 is (x2,y2) = (-4,-2) then we can compute the slope of the line containing those two points as
b = 
y2 − y1 / x2 − x1
 = 
-5 − (-2) / 8 − (-4)
 = 
-3 / 12
 = 
-1 / 4
. Now we know that b=(-1/4).
y = a + (-1/4)*x
But we know that the point (8,-5) has to make that equation work, so we know that
-5 = a + (-1/4)*8
We can simplify this to
-5 = a + (-2)
and then solve that for a,
− 3 = a
But that means that we now know the value of a so our final equation becomes
y = -3 + (-1/4)*x


Here are a few more important concepts related to the equation of a line.

Return to Module 0 page
©Roger M. Palay     Saline, MI 48176     December, 2022