Main content

## Algebra 1

### Unit 5: Lesson 3

Writing slope-intercept equations- Slope-intercept equation from graph
- Writing slope-intercept equations
- Slope-intercept equation from graph
- Slope-intercept equation from slope & point
- Slope-intercept equation from two points
- Slope-intercept from two points
- Constructing linear equations from context
- Writing linear equations word problems
- Slope-intercept form review

© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Writing slope-intercept equations

CCSS.Math: , ,

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 left parenthesis, 0, comma, 3, right parenthesis and left parenthesis, 2, comma, 7, right parenthesis in slope-intercept form.

Recall that in the general slope-intercept equation y, equals, start color #ed5fa6, m, end color #ed5fa6, x, plus, start color #0d923f, b, end color #0d923f, the slope is given by start color #ed5fa6, m, end color #ed5fa6 and the y-intercept is given by start color #0d923f, b, end color #0d923f.

### Finding start color #0d923f, b, end color #0d923f

The y-intercept of the line is left parenthesis, 0, comma, start color #0d923f, 3, end color #0d923f, right parenthesis, so we know that start color #0d923f, b, end color #0d923f, equals, start color #0d923f, 3, end color #0d923f.

### Finding start color #ed5fa6, m, end color #ed5fa6

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 left parenthesis, 0, comma, 3, right parenthesis and left parenthesis, 2, comma, 7, right parenthesis:

**In conclusion, the equation of the line is y, equals, start color #ed5fa6, 2, end color #ed5fa6, x, start color #0d923f, plus, 3, end color #0d923f.**

## Check your understanding

## Writing equations from any two points

Let's write the equation of the line that passes through left parenthesis, 2, comma, 5, right parenthesis and left parenthesis, 4, comma, 9, right parenthesis 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 start color #ed5fa6, m, end color #ed5fa6

### Finding start color #0d923f, b, end color #0d923f

We know that the line is of the form y, equals, start color #ed5fa6, 2, end color #ed5fa6, x, plus, start color #0d923f, b, end color #0d923f, but we still need to find start color #0d923f, b, end color #0d923f. To do that, we substitute the point left parenthesis, 2, comma, 5, right parenthesis 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 start color #0d923f, b, end color #0d923f.

**In conclusion, the equation of the line is y, equals, start color #ed5fa6, 2, end color #ed5fa6, x, start color #0d923f, plus, 1, end color #0d923f.**

## Check your understanding

## Want to join the conversation?

- i think i'll just sell corn on the street(18 votes)
- smart one

my mom's dad was 12 when he started to sell bananas on the street(3 votes)

- Bruh this is hard to do. I still dont undertand(13 votes)
- no way that this makes a single drop of sense(7 votes)
- bro why does hurt my brain

like i did fine on my Quiz(5 votes) - Math teacher who?! Khan Acadamy is so much better(5 votes)
- On number 4, why would b=17?(2 votes)
- This is the process they show you:

y =−4x+b

9 =−4⋅2+b

9 =−8+b

17=b

----------

In THIS ("9 =−8+b") step they are subtracting -8 from 9 which looks like this: 9-(-8). We know that two negative operations make a positive sum, which is why the answer is 17 : 9-(-8) = 17.

(2 votes)

- So I get how to get the y-intercept but I'm having hard time with the rest. Any ideas to help me out please and thank you.(2 votes)
- Hey there Laurie! So let's just say we are given two random points which are
*(31,5)*and*(33,27)*. We have to figure out an slope intercept for equation for it. Well, we already know that the format of the equation should look like this:**y = mx + b**.

So first, let's start out with finding the slope. When trying to find the slope, we first have to use the common formula*y change*over*x change*. Or in other words,*rise over run*. Now, lets take our two points and minus the y's.**Final answer**: 27 - 5 = 22. Good, now just remember you can subtract the points any way you want, but most people just prefer to subtract y2 - y1. That's what we did. Moving on, let's apply the same method we just used to subtract the x's.**Final answer**: 33 - 31 = 2.

Great! So now we are left with out a y that is 22 and a x that is 2. This is the step in which we apply the strategy*y change*over*x change*. All we have to do now is just divide the y by the x!**Final answer**: 22/2 = 11. 11 is now our slope!**Status Check**: Your current equation should look like this so far: *y = 11x

Following, when we add our slope (11) to our equation, please be sure to also include the x being multiplied to it as well. So here, you said you know how to get the y-int, but I will just go over it very quick! With our two given points on a graph, just pick any one. It doesn't really matter. I will just go with the point*(31,5)*. Now, with the x and y in this point, we must substitute it for the x and y in the equation.*With the substituted numbers in the equation, it should look like this so far*: 5 = 11(31) + b Last but not least, don't forget to solve! Multiply 11 by 31 and get 341. And just subtract that from 5 and you will get -336! That will be your y intercept!

To sum up, this is basically how to write a slope intercept equation with 2 given points! Final answer:*y = 11x - 336*If you have any questions regarding this, please feel free to ask!! I hope this helps.(3 votes)

- On the challenge problem when I had to solve for b, instead of using y=mx+b,

I used b=(0,?) (5,35) = (0,10)

---------------(-5,-5(5))

I subtracted 5 from x so as to make it 0, and multiplied that subtraction to the slope to solve for y. Is that method valid?(2 votes)- Yes, it's a completely valid method.

In order to get from (5, 35) to (0, 𝑏) we would have to move −5 along the 𝑥-axis, which would also move us 5 ∙ (−5) = −25 along the 𝑦-axis.

Thereby, (0, 𝑏) = (5, 35) + (−5, −25) = (0, 10) ⇒ 𝑏 = 10

Good job!(3 votes)

- This is so hard How do you do number four(3 votes)
- First find the slope: rise/run = (9-1)/(2-4) = 8/(-2) = -4.

So the equation so far is y = -4x + b.

Now substitute either point and solve for b. Let’s choose the point (4,1). So we have

1 = -4*4 + b

1 = -16 + b

b = 17.

The equation is y = -4x + 17.

It’s a good idea to check the equation by verifying that both given points make the equation true.

The point (4,1) makes the equation true because 1 = -4*4 + 17.

The point (2,9) makes the equation true because 9 = -4*2 + 17.

Therefore, since two points determine a line, the equation y = -4x + 17 is correct.

Have a blessed, wonderful Valentine’s Day!(1 vote)

- Is there a way to write the equation of a line using the x-intercept and the slope?(2 votes)
- Nice question! The equation of a line with slope m and x-intercept a is y = m(x - a).

(Note that since this equation is the same as y = mx - ma, the slope is m. Furthermore, a is an x-intercept because when x=a, y=m(a - a) = 0.)

Have a blessed, wonderful day!(2 votes)