Let's begin by reviewing what we know about the of a . We know that it can be written in the , as shown below.
y=mx+b
In this equation,
m is the and
b is the . Let's see how different pieces of information about the line can help us complete the equation with the values of
m and
b.
Slope and y-intercept
If we are given the slope and the
y-intercept, then we can just substitute them in the slope-intercept form and get the final equation. Let's say that we are given that the slope of a line is
2 and the
y-intercept is
3. To write its equation, we can substitute
m=2 and
b=3.
y=2x+3
Slope and a Point
If we are given the slope and a point that the line passes through, then we can begin by substituting
m with the slope. Next we can substitute the given point in the equation to find the value of
b. Let's say that we are given that the slope of a line is
4 and it passes through the point
(1,2). We can substitute
m=4 first.
y=4x+b
Now we can substitute the given point in this equation to find
b.
y=4x+b
2=4(1)+b
2=4+b
-2=b
b=-2
Finally, we can complete our equation!
y=4x−2
Two Points
If we are given two points that the line is passing through, then we can use the to find the slope
m first. Then we can substitute one of the points to find
b. Let's say that we are given that a line passes through the points
(3,5) and
(5,9).
m=x2−x1y2−y1
m=5−39−5
m=24
m=2
Now we can substitute
m=2 in our equation.
y=2x+b
To find
b, we can substitute one of the points in this equation. Let's take
(3,5).
y=2x+b
5=2(3)+b
5=6+b
-1=b
b=-1
Finally, we can complete our equation!
y=2x−1
Conclusion
As we can see, given different pieces of information about a line, we can write its equation.