# Writing slope-intercept equations

CCSS Math: 8.F.A.1, 8.F.A.3, HSF.LE.A.2

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 $y$-intercept and another point

Let's write the equation of the line that passes through the points $(0,3)$ and $(2,7)$ in slope-intercept form.

Recall that in the general slope-intercept equation $y=\maroonC{m}x+\greenE{b}$, the slope is given by $\maroonC{m}$ and the $y$-intercept is given by $\greenE{b}$.

### Finding $\greenE b$

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

### Finding $\maroonC m$

Recall that the slope of a line is the ratio of the change in $y$ over the change in $x$ between any two points on the line:

Therefore, this is the slope between the points $(0,3)$ and $(2,7)$:

**In conclusion, the equation of the line is $y=\maroonC{2}x\greenE{+3}$.**

## Check your understanding

## Writing equations from any two points

Let's write the equation of the line that passes through $(2,5)$ and $(4,9)$ in slope-intercept form.

Note that we are not given the $y$-intercept of the line. This makes things

*a little bit*more difficult, but we are not afraid of a challenge!### Finding $\maroonC m$

### Finding $\greenE b$

We know that the line is of the form $y=\maroonC{2}x+\greenE{b}$, but we still need to find $\greenE{b}$. To do that, we substitute the point $(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 $\greenE{b}$.

**In conclusion, the equation of the line is $y=\maroonC{2}x\greenE{+1}$.**