 In this video, I'm going to talk about writing the equation of a line given some data. I'm actually, this is a video where I'm going to do two different examples, and you'll note here that I have the, this is the slope intercept form of an equation, and then over here I have the point slope form of the equation. So I'm actually going to be working this same, using the same data set, using the same data set, I'm going to be using it twice, once to write the equation in slope intercept form, and then I'm also going to use this data set to write the equation in point slope form, so that you have an example of both of them, and you can decide for yourself which method you would like to use, either slope intercept or point slope. Okay, so the first thing that I need to do is, okay, decide which method I want to do. So in this case I'm going to, let's work with slope intercept. This one's my favorite, so let's use slope intercept form first. Okay, now for slope intercept form what I need, there are two things. I need to know the slope, and I need to know the intercept. So again, the y-intercept, so again slope intercept form of the equation, the name tells you exactly what you need. I need to know the slope and the y-intercepts. Okay, now actually looking at the data, this is a little bit tough. We like pictures better than we like data, but I could still use this to figure out what the slope and the y-intercept is. Okay, so what I'm going to do for slope, actually since I only have data, since I can't look at a picture, I'm forced to use formulas. So I'm going to come back down here, I'm going to write the formula for slope. m is equal to the difference in the y's, so y1-y2 over the difference in the x's, which is x1-x2. So what I need to do is I need to find two coordinates to use to plug into this formula. So I'm going to use two coordinates. Now up here, I don't have two coordinates, I have 1, 2, 3, 4 coordinates. x and y coordinates. Now this right here is f of x means function, function that involves the variable x. You can also just treat that as a y. So from now on, I'm just going to say these are the y coordinates and these are the x coordinates. Okay, so I have four points to choose from. Now only choose points that are easy to work with. Notice here that I got decimals. Decimals can be sometimes hard to work with. I want to try to make this as easy as possible for me, so I'm not going to use those two. I'm going to use negative 8, negative 5, and 8, negative 1. Those are the two points I'm going to use. So actually over here, I'm going to write those two points real quick, just so I have easy reference to them. Let's write them up here. Negative 8, negative 5, and 8, 1. Alright, so those are the two points that I'm going to be using. Did I write them down right? Yes, I did. Let's just double check in my work. So what I want to do is do the difference in the y's. So I have a y of negative 5 and a y of 1. So negative 5 minus 1. Okay, now since I chose negative 5 first and then I chose negative 1 in that order, I've got to do the same thing for the x's. Don't make that mistake. So for the x's, I've got negative 8 minus 8. I've got to go in that order, same thing. So negative 5 minus 1, negative 8 minus 8. I've got to make sure I can go in that same order. Or that's going to, technically what it's going to do is going to flip the sign of what my slope is and that's going to screw everything up. So make sure you do everything in the same order. Okay, 5 minus 1 is negative 6 and negative 8 minus 8 is a negative 16. The two negatives will cancel, so 6 over 16. I can reduce that to 3 over 8. So I have a slope of 3 eighths. A lot of math going on there. Alright, so that's the first thing I need. Just found it. Now what I need to do is find the y-intercept. Now as I look back up here, data doesn't tell me what y-intercept is. Maybe if I get lucky and if one of the, let's see, y-intercept, the x would be 0. If one of these points up here was 0, that would actually be the y-intercept, but I'm not that lucky this time. So I have to use something else. So what am I going to use? So I'm going to come back down here. I'm going to look at the information that I have. I have the slope and I have a couple of points that I used. So actually, if I look at my equation, slope, and then look here. I have an x and I have a y. That is a point. x, y coordinates, x, y variables. So what I'm going to do is I'm going to use that equation to my, I'm going to use that fact to my advantage. y equals mx plus b. I know what the slope is. It's 3 eighths. Now what I'm going to do is I'm going to use one of these points up here. I'm actually going to use, let's use 8 negative 1. Let's use something easy. Don't use a lot of negatives. Try to make this as easy as you can for yourself. So I'm going to use 1, or excuse me, 8, 1. The y coordinate goes here and then the x coordinate goes there plus b. Notice the y-intercept. I don't know what that is. The data doesn't tell me anything about it. The problem, the direction is nothing. It doesn't tell me anything about y-intercept. So I've got to kind of find it on my own. Now after plugging in all this information, 3 eighths times 8. This 8, this timesing by 8, dividing by 8, that's going to cancel and I'm left with just 3. Lucky enough. And what I'm going to do here, this 3, I'm going to subtract it over. So 1 minus 3 is negative 2 is equal to b. Now that tells me what the y-intercept is going to be is going to be negative 2. So it crosses the y-axis at negative 2. Alrighty, so now I have enough information. I have the y-intercept and I have my slope. I'm going to use those 2. y equals 3 eighths x minus 2 to write the equation. y equals 3 eighths x minus 2. Slope intercept form of the equation. There you go. So that is how you find the slope intercept form of the equation just by using the data, just by using numbers, not having a picture to go along with it. Okay, so that's the first method of doing this. Now I'm going to go to the point slope form. Notice that I have a point x1, y1, and then slope of m. So in this case, that tells you point slope form. I need a point and I need the slope of this data to figure out what the equation is going to be. So let's look to see if we can find those two things. So slope, now I know what the slope is going to be. It's going to be 3 eighths. So I know that, but I'm still going to go through the motions. I'm still going to do it because this is a totally different way of doing the problem, but there are going to be some similarities. So the first thing that I need to do, change colors here a little bit, is I need to find out what the slope is. Slope form, so I'm going to find the slope first. To do that, I'm going to use my slope formula. Difference in the y's over the difference in the x's. And you know what, this will actually be a good time to show you something. What I'm going to do is I'm going to use those same points. I'm going to use 8, negative 5, and 8, 1 because those are easy points to use. There's no decimals or anything like that, like my other points of 4, negative 3.5, and negative, or excuse me, negative 4, negative 3.5, and 4, negative 1.5. So I don't have any decimals, so I'm going to use these again. But notice I wrote them in a different order. What I'm going to do is I'm going to flip which one was my first and which one was my second coordinate. Now, the reason I'm doing this is I'm going to show you it doesn't matter which one is the first, which one is the second. You'll always get the same slope. But again, what does matter is that you make sure and do them in the same order. When you input the numbers, do this in the same order so that you don't flip any signs or anything like that. So I'm just going to show you that you can do this either way. Alright, so 1 and negative 5. So I'm going to take my y's and subtract them. This is going to be 1 minus a negative 5. 1 minus negative 5 is actually going to be plus 5. 2 negative makes it positive. Alright, so x1 minus x2, so 8 minus a negative 8. 2 negatives is going to make it positive. Okay, so a little bit different here. So we can see that the work over here, a little bit different, a little bit different work. Okay, so 1 plus 5 is 6. 8 plus 8 is 16. Hey, but notice here some similarities. 6 is in 16s. But this time, I don't have any negatives, but I still reduce to the same slope. So again, it doesn't matter what order you put them in, but it doesn't matter. Make sure you pick one point to be your first, one point to be your second. Okay, so I've found the slope. Now I just need a point. So actually, now you can make a good argument that this form of the equation is a lot easier to use because the only thing you have to find is slope. And then you need a single point. Well, I have 1, 2, 3, 4 points to choose from. So actually, I'm going to use these points and let's use 8, 1 again. Let's use that again. All right, so y minus y1, which is 1 equals 3 eighths times x minus x1, which is 8. Oops, that's a bad parenthesis there. And then that's it. That is it. Not as much work as slope intercept form. I will admit that slope intercept form is my favorite way of finding the equation of a line, but the point slope form is actually a little bit less work. But the thing is with that little bit of less work, you don't have as much information about what the graph looks like. If I look over here in red, I know what the slope of 3 eighths is. I know it's positive and I know it's not very big. 3 eighths is not a very big number. So it doesn't go uphill very fast. And then I also know I have a y intercept of negative 2. So that's below. That's kind of at the bottom of the grid. So that's where it intercepts the y axis. That actually gives me a lot of information. On the other hand, if I look over here, I know what the slope of 3 eighths is. I know what the slope is, 3 eighths. So I know it goes uphill. It's not a very steep slope. But then that's it. That's all I know about this equation. That's the only thing I know what it looks like. What I would have to do if I wanted more information is I would have to distribute this 3 eighths, and then I would have to add 1 to this side, y equals 3 eighths x minus 2, which is the exact same thing that I have over here. It's the exact same thing that I have over here. I know what the slope is and what the y intercept is. So each way of solving, each way of writing an equation has its own benefits. Make sure that when you're doing problems like this, read your directions and make sure you know which form to use. Do the directions ask for slope intercept? Or do the directions ask for point slope? It just kind of depends on what the problem is asking you. If you have a choice, you can use whatever you want to. But again, remember that one form gives you a good amount of information. This second form over here doesn't give you as much. Yes, it's easier to use, but it doesn't give you as much information. So decide which one you would rather use. Alright, that is writing the equation of a line just given data, just given some points. I hope that this video was helpful to you, and thank you for watching.