Hi everyone and welcome to our lecture on the equations of lines. We're going to study linear functions in this lecture, talk about their graphs and interpretation of the pieces that make their equation. So let's start off with the formula that I think most people would know, and the equation of a line if I asked some folks that say y = mx +b. Okay, so this is the equation of a line. That's true. However, one piece of this is it has to be non-vertical. Most of the graphs of equations of lines you're going to see in this course are in fact of the form y = mx + b. But we're going to learn that even though this is the most common answer when you ask people what's the equation of a line, it's really not a good way to think about lines. It's one of the worst ways in all honesty. However, it's useful if you have this information. I promise as you get more advanced you don't get this information or it's tougher to get. So we just want to sort of give you a little stronger equations to work with lines. One thing that you have to notice, non-vertical lines only, if you have a nice boring vertical line, it would fail the vertical line test, so that would not be good. m, of course is your slope, why slope is called m, I don't know but it is. m is, of course, your slope, so mm, slope. It is found by the rise over run formula that perhaps you've heard or seen before. If you want to get a little more fancy, you could say delta y over delta x. This Greek letter delta represents change, talk about that later. But so rise over run and here's a nice little formula you might want to keep handy. It's the change in y, so the difference of two points, over the change in x. So y2- y1 over x2- x1. And so we have lots of ways to calculate these things and we'll do some calculations later but lines generally come in four different flavors. The line can go up. The line can go down. The line can be straight horizontally or a nice vertical line. In this case, if we try to capture the differences between them if you look at the slope between these two things if you grab a point on a line and perhaps a second one and look at the change of y values. The y values of this function, so this would be like your y2 and your y1 for the two different points. As you move up a hill, your height increases. So I always assume you're moving to the right here. So your delta x is the change in x, your y values go up, you climb the hill, that's going to give you and for your slope a positive number over a positive number. And so this slope here is positive, m is positive. We say m > 0 or you can think of this as m as positive. So we have a positive slope to your line, up the hill you go as you move from left to right. For all the same reasons, if you come down the hill, if your line goes from top to bottom as you move left to right, your slope is negative here. You have a positive difference in your x values, but a negative different in your y values. So you get negative divided by a positive which is negative. So if your slope is negative, down the hill you go. If you are flat, if you are a nice horizontal line, your y values don't change. There's no change in your height. These are boring. This is y2 minus y, they're equal, the y value's the height so you would have a slope of 0. So you have all three cases here, right, positive, negative, or 0. In the case of vertical lines, we don't like this here. Then your x2 would be equal to your x1, there's no change in x. If you were to graph this line on the x, y axis, there's no change and all of a sudden your denominator of your slope equation is 0. So we would have, we say that the slope is undefined here. I like to remember this. I always thought of a little skier. You put like a little skier on the hill and if you go up the hill then you're doing work. It's always harder to go up the hill than it is down, so your slope is positive if your skier's going up the hill. However, once you get to the top then the fun begins and down you go. And so you do like no work and so your slope is negative. Wee, down the hill you go. For a horizontal line, this would be the corresponding analogy here of cross country skiing where you're skiing on a flat surface, what's the point? So m is 0, 0 fun. Sorry, if you're an avid cross-country skier there. And last but not least if you have like a cliff or something terrible, you put your skier on the cliff and you down it goes and the idea is this would be bad for the skier. You would hurt the skier. So there's a rule you can't hurt the skiers in math. So the slope is in fact undefined. So it's going to be one of four cases always. And you can see why if the slope is undefined, you get a nice division by 0 error. In that case this formula y = mx + b doesn't make any sense. That's why we say it's for non-vertical lines only. Now, how do we interpret these coefficients? Well, the slope I want you to think of it, yes, it's a slope, but more importantly it's a measure, and this will help you later on, measure of the rate of change. So this tells you how fast the function is changing. And this is something that we're going to care about a lot going forward, does the function increase? If you have a hill, and I say, go climb the hill, you probably want to know is it going to be a steep climb? Is it a gradual climb? What's going on? The same goes for almost everything you observe in life, in the sciences. Like, what are you watching change? Humans are very good at seeing change happen. I can take a data point today, I can measure again tomorrow, and I want to talk about what is going on, how fast is this changing? This is going to get us into the ideas of calculus and trying to measure this. But for a line, if we start with the simple objects first, a line, the slope is really going to be a measure of the rate of change. So when you see the slope formula, I really want you to see the relationship in the two variables. It's the change of y over the change of x. When we look at a graph, we look at a function, we look at a line, we're usually interested, as time moves on. And so you pick one unit. So you have your x, make your observation here, and you can pick your second unit at another time. You can always pick the units on the x axis to be 1. And so your change, whatever the distance is, maybe it's one mile, one year, one week, one day, it doesn't matter. Whatever your units are, let the distance be 1, and really this measures what is your change in y, what happens to your change in y. And this is why we use the symbol delta x over delta y. Rise over run, yeah, it's a nice way to get sort of the picture of the graph. But I really want to think of this as the measure of change. And the fact that the rate of change of a linear function is constant characterizes linear functions, this is super important. This is the thing to get here. The slope is constant for linear functions. Let me say that again, because it's extremely important. The fact that the slope is constant defines the object. A lot of people think, I have a line so its slope is constant. That's true, but I want you to sort of reverse that thinking. If you have a constant rate of change, then the graph, the equation, and the model for whatever you're doing is in fact a line. So that's what the slope is going to do. Slope here is constant, so we have a nice line. The other coefficient on our equation, the b if you will, the b of the y = mx + b equation, is the y-intercept. So this is where the graph crosses the y-axis. This number is not as important as the slope. It is a very, very distant second. It is where you start observing. If you notice if I have the equation y = mx + b, now a lot of times you say, y = mx + b, you really mean y is a function of x, and it's m times x + b. So b is found by plugging in x = 0. Again, think of being a scientist and taking observations here. If you plug in x = 0, you obviously get 0 times m + b and that's your b. So b is where, yes, as a point, where this graph touches the y-axis, but try to get away from like A picture of like describing something by picture. What is the meaning? What do the symbols mean on the page? So this is your initial observation. This is where I'm going with this. This is your initial observation. When you start caring about the model, when you start taking your research, when you track something. So you can imagine you're tracking stocks change over time or something, whenever you start, that's your initial observation. Normally most people are not interested in something in the past or when you first start, it tends to be at the end. What are your conclusions? What are your predictions? What happened in between? So this number, again, very distant second y-intercept, okay? So this is your initial observation. All right, let's do an example. Play around this for a little bit. So after diving to a wreck at a depth of 110 feet, a diver starts her ascent to the surface of the ocean, rising at the rate of 2 feet per second. Find an equation of the depth of the diver measured in feet from the ocean surface as a function of time t in seconds. With all the joys of word problem, you might want to read this again, go a little slower, write stuff down. So let's imagine now our x axis is 0 and we have a little diver who's diving down to a depth of 110 feet. So we can model this different ways, but let's say we're at negative 110. You can certainly make it positive and just understand that we're below, but let's use negative numbers. So I'm at a wreck at 110 feet. So there's my little diver, and I'm starting my initial observation at time 0, okay? So I'm going to rise to the surface at a rate. Now, it's important to realize this rate is constant, I'm not accelerating. If you've ever gone diving before, you want to go nice and slow. So I'm rising to the rate of 2 feet per second, probably want to do a couple surface integrals intervals in there, but we'll see what's happening. So I have a little diver and our rate is at 2 feet per second. So the slope is 2 feet per second. Notice that it is a rate, right, 2 feet per second. Every second I change two feet. So if my interval time is in seconds, this is my graph for t, my x-axis, every interval's of 2 seconds. So the change of time is going to be 1 second. And the change in my depth, the change in the feet, the change in the y-axis maybe, is going to be 2. So you have a nice rate. Find an equation of the depth of the diver measured in feet from the ocean surface as a function of specifying the equation of this line. Okay, so find the equation of the line. So we already know that the slope is 2 and it's positive because you're ascending, so we're going up. And that the intercept, so the b in this equation would be minus 110 feet. And so we put it all together, you get y equals 2x plus negative 100 or y equals 2x minus 110. And so realize though that, in this model, if you have a negative number it means you're below the surface. If you put positive numbers on it, then you can view it as the distance is positive from the surface. So however you want to interpret this thing. But y would be your distance below with the sign negative or put a positive on it if you wanted to view it there. So either one is perfectly fine. The things that I want you to realize from here is, if you're given a word problem, can you recognize the initial observation? So put in your intercept and what's your constant slope. So that's a nice little example. We're going to go back into the vault for a minute now and talk about parallel lines. So friendly reminder, parallel lines are lines on the plane that don't touch. So you have these nice two lines that don't touch. I'm not sure it's the best picture, but try to draw two parallel lines on the plane here. So if you have parallel lines, what characterizes parallel lines? Well, they have the same rate of chains. So parallel lines have the same slope. So if two lines are parallel, call lines line 1 and line 2, then we say parallel lines have the same slope. You can write that as m1 equals m2. They have the same rate of change. If you have perpendicular lines, so perpendicular lines are lines that meet at a right angle. So maybe you have a line 1 going a little bit up and down, and some other line going this way. You can try this, try any two perpendicular lines you want, try to draw them as best you can so they meet at a nice right, angle 90 degrees or pi over 2 radians. And you'll find that you can't draw one without having sort of the one going up and one going down. Try not to draw a horizontal and vertical line like the x-axis, you run into slope issues there. But assuming one is non-vertical, one line is going to go up, one line is going to go down. So there's a relationship between the slopes, so if they're perpendicular, then one slope, maybe you remember this, is the negative reciprocal of the other one. This is a two step process. You have to flip, that's what we mean by reciprocal, and negate flip and the gate, okay? So keep these formulas in mind, start maybe to create a formula sheet in a notebook or something like that as we go through. And now let's just do lots of examples. You'll see more of these, but we'll just do a couple here. So let's find some equations of a line. And finding equation of a line is a very important skill to have. Add what's going to come at you is different givens. So I'll do one example here, but let's say given a slope m, now let's make up some numbers here. Perhaps 2, and a point that the line goes through, let's say 1, negative 2. So you can imagine if I draw a little picture here and I go to 1, negative 2, so I'm down here in quadrant four, and I tell you I want you to rise and run. I want you to increase at a constant slope 2, well, you would be able, that's enough information to find this line. So how do we put this all together? There's a couple ways to do this, and this introduces us to our new formula. We could go through with the y equals mx plus b thing, but I want to introduce you to a new formula called the point-slope equation of a line oftentimes. And again, you can imagine, I'm a little scientist, I observe something initially and then I observe how it changes. This is you're going to get these two pieces of information. So the point-slope equation of a line is as follows. It's y minus y naught equals mx minus x naught, or whatever your initial observations are. This subscript you can read as x0, y0, or sometimes is read as just naught. So I tend to say naught, x naught, y naught, so just be ready those. The point that you're given, this is your initial observation. So x naught, y naught, and then the slope, of course, is already there. So we get y minus minus 2 equals 2, and then x minus 2 again. Notice the negatives, you gotta be careful here, two negatives make a positive. So you get y plus 2. And we could distribute the 2 in 2x minus 4, and let's subtract 2 from both sides. And you get y equals 2x minus 6. This equation of a line that most of us know and love, the y equals mx plus b, where I see the slope and I see the intercept, equations tend to get named after what you can read off, what you can see. So because I can see the slope and the intercept, this is called the slope intercept form of a line. I can also, the point-slope equation. And if you put it in that form, you can read off the point it goes through, as well as the the slope through it, okay? So let's another example. And now instead of me giving you a slope and a point, let's imagine I give you two points. So let's say we're going to go through one-half and 1, and then 1 and 4. So let's say I go through these two. It's a little different than the last one, but can you sort of put it together? If I give you two points, what's something you can find pretty quickly? Well, from here, so you're just given two points, I'm going to find the slope. So step one is going to be to find the slope. Now remember, slope is the change of y over the change of x. Order matters here, so we're going to go 4 - 1. Again, grab the y values, not the x values, and then 1- 1/2. Little fractions involved, so just be careful. 4- 1 = 3, 1- 1/2 = 1/2. Friendly reminder, fraction divided by a fraction, think of this as like 3/1. I'll do this a long way once, but after that, you should know how to do, it's keep, change, flip. Keep the numerator, so you get 3/1, flip the division to multiplication, and change the 1/2 to 2. So I may have the back keep, change, flip. So some people call this like the KFC method and that does quite work for this to remember it. So you just flip the denominator there and you get 6/1 multiply across the top, multiply across the bottom, better known as 6. So a little algebra review there for you as well. So slope is 6 and now, you're kind of in a similar situation in the last one, you have a slope, which is 6 and you have a point, in fact, you have two points. It turns out, it does not matter which one you pick. So pick your favorite point and let's use the point slope intercept equation of a line. We have x- X knot and I don't know, let's pick the one without the fraction maybe just because it's a little nicer. So let's pick, let's do y- 4 = 6 (x- 1). We clean this up a little bit, so you bring the 6 into both pieces and you get 6x- 6. And then if I add the 4 over, so you get y- 4 is that, so add the 4 and you get 6x- 2. Brilliant, okay, good, let's do another one. Let's find another equation of a line, that's our goal in this section. Given anything, find the find the equation of a line. So let's say I want a horizontal line and let's have it go through the point root 7, pi. Ugly numbers, it's okay, they're beautiful numbers. Horizontal line, so again, if you want, think of a picture here, so go over root 7, whatever that is, there it is. Now, it's on the map, and I want to go a pi, so like 3.14, so there it is. And I want a nice horizontal line through that. So it's a perfectly good line, yeah. The numbers are not what we're used to, but get used to seeing messy numbers, that's okay. So it's a horizontal line, so you gotta remember the slope of this line. Once I tell you a horizontal, that's them actually telling you the slope, this is slope 0. So you can still do, you have a point, you have a slope, and we use the point slope formula. So y is actually even easier because you have that 0. Y- y knot is m(x- x knot). Hey, I'm a 0, that's super nice. So 0 times anything, that's going to give us 0 on the right side and then I just grab the y value, so it's just y- pi. Move the pi over and you get the line y = pi. When you have y equal a constant, when you have y = pi, the constant that is always, so there's no slope anywhere, there's no variable x with a number on it, that's always the slope of a constant line. I want you think of in terms of where to change, what makes a line constant as I move to the right. There is no change, this is the world's most boring function, y = pi, okay? So this is what it means to be a constant function. There is no rate of change, the rate of change is 0. Let's do another one, let's do another one. Let's find the equation of a line that's parallel to a given line. So x + 2 y = 0 and goes through the point (1, 2). All right, now we're always looking for a slope, we're always looking for a point The point is usually given, this is like I can make an observation. We have lots of fancy machinery to make an observation. Parallel to, this is interesting. So how do I get the slope of the line I want from this? Well, remember, parallel lines have the same slope. So I've look at the equation x + 2 y = 0 and grab the slope. The danger here is it's not in slope intercept form, so we have to do a little bit of rearranging. So let's subtract x from both sides and then let's divide by 2. And now, we see that this equation is y = -1/2x. So the slope of the line that's given is -1/2 and that because parallel lines have the same slope is the number for the slope that I'll use. Now, I have a slope and I have a point, so we do point slope formula, y- y0 = m(x- x knot), plug in my numbers. So I have y- 2 = -1/2 (x- 1) and I'm going to leave it like this just to avoid algebra, but it's perfectly fine and this happens eventually. The point slope formula is a better way to think about lines that you almost want to hand off to the next person, what a point is and what the slope is. And sometimes, you don't want to put it in slope intercept form, the mx + b form, that's a win-win for everybody. So the person you're handing this off to gets the line in point slope formula and you don't have to do algebra, which means that you're not running the risk of making algebraic mistakes. You can imagine and I could have gotten something that was perpendicular to a given line, I would take the negative reciprocal just for practice over here, the negative reciprocal of -1/2. Of course, it's 2 and then I would have used 2 here if that were the question. So be ready to answer sort of any questions that are both parallel or perpendicular. So now, let's look at a different kind of question. There are lots of plug and chug questions to find the equation of a line, but let's look at a little more conceptual questions. So let's say I have some graph of something that's going up and it's going, okay? And what I'm interested in is, let's say I take two observations at some moments in time. So I have maybe it's like a stock market price or maybe it's some reaction in the lab, who knows. Pick your favorite thing that you're going to be able to study. If it changes, you're going to need this sort of idea. So I want to know, is the rate of change faster, so let's call this time 1 and time 2. So my graphic goes up and down and my time 1 is sort of near the top of the graph and time 2 near the bottom. So is the rate of change greater at t1 at the first observation or the second observation? No formulas here, no numbers, strictly conceptual. So what does that mean? So when we do that, I want to know the rate of change and this is sort of one of the deep insights that we're going to get to later [LAUGH] And study is if you zoom in close enough to everything, the world is flat. So imagine a line that's like a little hill. What is the slope, what is the rate of change at a specific point? Even though the rate of change of the original function may not be constant, small enough locally, it's a line. If you look out your window, the world seems flat, if you zoom out, then it's round. So what is going on here? So you can imagine a little line that sort of models the behavior locally and you do that for both points here. And you can see very quickly that at the first point, the slope is going to be negative, so something in this function is decreasing. And at the other point here, this line that just goes through the point, the slope is positive. So I don't know what the numbers are, I have no idea. I can't measure this explicitly, but which one is greater? Well, this is like asking what is bigger, a negative number or positive? Well, positive is always bigger than that, so we have a slope. We have a greatest where to change a t2, this thing is exhilirating. So there's a question in the abstract and let's do one more. Let's do a little business application here. So imagine if you're selling some product, some widget, whatever you want it to be. So you have a fixed cost, you make sneakers or something like that, you have a fixed cost of $230. And for each unit you make, for each additional unit, the cost is $7. So you have to pay the workers an extra hour, you gotta keep the lights on, you gotta run the electricity, all these things. So for every additional thing that you make, it's 7 bucks. And so we have a cost function here, let's assume a linear cost. So what would this mean my fixed cost? You can think of this like just showing up to work, what's it going to cost to run the business, that is your 230. So you can see another role here for the intercept playing. This graph is for a me to understand what's going on here. So x is the number of products that I make and the y value is my cost. So for each additional item that I make, my cost function rises. We're assuming our constant cost is $7, so this is a line. So I get 230 + 7x as the cost to manufacture these items. You can also look at your revenue model. So if you sell these shirts, let's say at $12 each, so we can also look at our revenue model. Let's assume that we're going to sell these items at $12. So for each item I make, I make 12 bucks. So now, I have my cost function in some line and I have some revenue model and I get something else, another line. This point where the two lines meet, this is a name in business, this is called your break-even point. This is your break even point. So it's a pretty common question to ask when is your break-even point. If you're an investor, you might want to know if you're going to invest, when does the business start to make money, what is the moment in time? So break-even point is when your revenue is equal to your cost. This a nice little algebra thing, you can actually say how many you need to make, so you can make 230 + 7x = 12x and solve for x. So subtract 7x from both sides, you get 230 = 5X and do a quick division and you get x = 46. So you have to make 46 units or over this intersection happens is at 46, anything after 46 just start to make a profit. So this sort of knowledge of how grass behave can lead to some good business decisions. All right, a few new formulas in this lecture. Keep them all together, keep them handy, and then we'll see some more examples next time as we go forward. All right, great job on this one. See you soon.