Learn how to find the slope-intercept equation of a line from two points on that line.
If you haven't read it yet, you might want to start with our introduction to slope-intercept form.

Writing equations from yy-intercept and another point

Let's write the equation of the line that passes through the points (0,3)(0,3) and (2,7)(2,7) in slope-intercept form.
Recall that in the general slope-intercept equation y=mx+by=\maroonC{m}x+\greenE{b}, the slope is given by m\maroonC{m} and the yy-intercept is given by b\greenE{b}.

Finding b\greenE b

The yy-intercept of the line is (0,3)(0,\greenE{3}), so we know that b=3\greenE{b}=\greenE{3}.

Finding m\maroonC m

Recall that the slope of a line is the ratio of the change in yy over the change in xx between any two points on the line:
Slope=Change in yChange in x\text{Slope}=\dfrac{\text{Change in }y}{\text{Change in }x}
Therefore, this is the slope between the points (0,3)(0,3) and (2,7)(2,7):
m=Change in yChange in x=7320=42=2\begin{aligned}\maroonC{m}&=\dfrac{\text{Change in }y}{\text{Change in }x} \\\\ &=\dfrac{7-3}{2-0} \\\\ &=\dfrac{4}{2} \\\\ &=\maroonC{2}\end{aligned}
In conclusion, the equation of the line is y=2x+3y=\maroonC{2}x\greenE{+3}.

Check your understanding

Problem 1
Write the equation of the line.

Problem 2
Write the equation of the line.

Writing equations from any two points

Let's write the equation of the line that passes through (2,5)(2,5) and (4,9)(4,9) in slope-intercept form.
Note that we are not given the yy-intercept of the line. This makes things a little bit more difficult, but we are not afraid of a challenge!

Finding m\maroonC m

m=Change in yChange in x=9542=42=2\begin{aligned} \maroonC{m}&=\dfrac{\text{Change in }y}{\text{Change in }x} \\\\ &=\dfrac{9-5}{4-2} \\\\ &=\dfrac{4}{2} \\\\ &=\maroonC{2} \end{aligned}

Finding b\greenE b

We know that the line is of the form y=2x+by=\maroonC{2}x+\greenE{b}, but we still need to find b\greenE{b}. To do that, we substitute the point (2,5)(2,5) into the equation.
Because any point on a line must satisfy that line’s equation, we get an equation that we can solve to find b\greenE{b}.
Substituting (2,5)(2,5) into the equation is the same as substituting x=2x=2 and y=5y=5 into the equation.
Remember that every point on the graph of a two-variable equation is a solution of that equation. In other words, if we substitute the point into the equation we get a true statement.
To use a different equation as an example, the point (3,1)(3,1) is on the line y=x2y=x-2. This means that substituting the point into the equation will result in a true statement:
y=x21=32x=3 and y=11=1\begin{aligned}y&=x-2 \\\\ 1&=3-2&\small\gray{x=3\text{ and }y=1} \\\\ 1&=1 \end{aligned}
In our solution, we do the same thing, only we don't know the complete equation of the line. Substituting a point that we know is on the line will help us find the missing b\greenE{b}.
y=2x+b5=22+bx=2 and y=55=4+b1=b\begin{aligned}y&=\maroonC{2}\cdot x+\greenE{b}\\\\ 5&=\maroonC{2}\cdot 2+\greenE{b}&\gray{x=2\text{ and }y=5}\\\\ 5&=4+\greenE{b}\\\\ \greenE{1}&=\greenE{b} \end{aligned}
In conclusion, the equation of the line is y=2x+1y=\maroonC{2}x\greenE{+1}.

Check your understanding

Problem 3
Write the equation of the line.

Problem 4
Write the equation of the line.

Challenge problem
A line passes through the points (5,35)(5,35) and (9,55)(9,55).
Write the equation of the line.

Loading