 In this video I'm going to talk about how to horizontally stretch or compress a function. I'm also going to talk about how to vertically stretch or compress a function. So basically what we're doing is we're taking these lines, taking these functions here and we're going to, in this case we're going to horizontally stretch this. Now if you can well imagine, if we take this and horizontally stretch it, horizontal is left and right. So we're going to make this line wider. It's going to get, it's not going to be as steep as what it once was. Okay, so that's the general idea of what we're going to do. We're going to horizontally stretch this function by a factor of three and we're going to see how that affects the function itself, how it changes the function. Okay, so now the first thing that we're going to do is we're going to find a couple of points on this line and then we're going to horizontally stretch them and then we're going to look to see how that affects the equation itself. So we're going to basically rewrite the equation. Okay, so a couple of things I need is I need a couple of points. So the y-intercept is a good point. There's a good point here, negative one, negative one. And then another point here, it looks like one-three. And that's a good number of points for now. Okay, so what we want to do is we want to horizontally stretch this. Now when we horizontally stretch, horizontally means left and right, which is our x-axis. Now remember your x and y-axis. We're going to take these points and we are going to stretch them by a factor of three, which means we're either going to multiply or divide by three. Basically, it's kind of what it means. Okay, now when we horizontally stretch something, that means we're going to multiply by three and we're going to take the x-coordinates and we're going to multiply them by three. So notice that this one here is one away, has an x-coordinate of one. Okay, and then now what I'm going to do is if I stretch that by a factor of three, that's going to change that x-coordinate from a one to a three. So one, two, three. Yep, one, two, three, right about there. Okay, so what we have just done is we've taken this point and moved it, basically just moved it from a position of having an x-value of one to now it has an x-value of three, okay, multiplied by a factor of three is basically what we did. Okay, now for this one here, this one is already, it has an x-coordinate of zero. So if I take that x-coordinate of zero times two, nothing actually happens. So that point is actually just going to stay where it's at. Okay, and then this point down here, that little distance of negative one here. So if I multiply by three, it's going to go to negative three, which is over here. Okay, very similar to what we did up here. Let's do one more point just to get a little bit better idea of this. So this point down here, this right here is a distance of two. Okay, I have an x-coordinate of negative two. So if I multiply that times three, that's going to be negative six. So negative two, negative three, negative four, negative five, negative six, right over here. Okay, so notice how big of a change that is. Right here we moved from, it was two points away, now it's six points away. It's a little difference of four here. This one was one away from my y-axis. Now it's three away, which is a difference of two. But notice each one of these are going to be just a little bit different. Anyway, connect the dots and let's see what the equation of this line is. Let's see what the equation of this function is. Okay, so this is my g function, make sure to label it correctly, it's my g function. All right, so now I'm going to write the equation for this line. All right, so g of x, g of x is equal to, okay, I got to find out what the slope is and what the y-intercept is. Well, the y-intercept actually didn't change at all. Since the x-coordinate was zero, zero times three didn't really change anything. That's going to stay where it's at. So I have a plus one for a y-intercept, but my slope is going to change. It looks like it got smaller. Now that's kind of an odd way to think about it. But if you take the x-coordinates and stretch them, my slope actually gets smaller. So notice my slope now is one, two, one, two, three. Let's check another one. One, two, one, two, three, okay? One, two, one, two, three, there we go. All right, so my slope is going to be a positive two-thirds. I just checked it with a couple of different points here just to make sure I did those correctly. All right, so as we look at this, we horizontally stretch this function by a factor of three. Now if you take a look at the function, basically what this is is if you compare these two, well the y-intercept stayed the same, but the slope changed. Now by a factor of three is the number that we used, notice that our slope gets divided by three. That's not a coincidence, that's done on purpose. All right, so now when you think if we're going to horizontally stretch something, the slope is actually going to get smaller. The slope is going to get flatter, okay? It's not going to rise and run as much as what the original function was. So that makes sense that our slope goes from two to two-thirds. We go from a pretty big slope of two to a pretty small slope of two-thirds by dividing by three. So in general, I'm actually going to have to rewrite another one of these. In general, if I, let me actually rewrite this now. f of x, if I want to change it, one over a times x. So now this one that I rewrote here, this actually applies to this example that we have here. Basically what happened is I took the x portion, I took the x portion of my function, and I took that and basically divided by the factor that I was using. Okay, this is a factor, factor of a. Okay, so basically that's what I did. I took two, the x portion, okay, right here, took this x portion, and I divided it by three. It was got me to two-thirds, and so that's represented down here. Now this is for a horizontal, horizontal stretch. Okay, so horizontal stretch. Now the thing is, is you can horizontally stretch, or you can actually horizontally compress. Okay, now if we horizontally compress something, it actually gets taller. If we compress this line, it's going to get taller. Okay, now what happens there is you actually take your x coordinates and you would divide by your factor, but in essence that makes your slope taller, and so you would actually multiply your x times this. And so this is the notation that we would use for a horizontal, horizontal compression. Okay, horizontal compression, there we go. So yeah, you really got to think about this when you're doing your horizontal stretch and compress. So basically it comes down to, it's going to be by a factor of three, so you got to think to yourself, am I going to multiply times three, or divide by three? And it all really depends on if you're stretching or compressing. So I like to think of it this way. My slope, do I want to make my slope bigger or smaller? So in this case, we were horizontally stretching this function, horizontally stretching it. I wanted my slope to get smaller, so what I'm going to do is I'm going to divide by three. I want my slope to get smaller, so I'm going to divide by three. That's the kind of the thought process you need to have when you're doing this. And that's kind of the simple way of doing that. Okay, that's horizontal stretching and compressing. Let's do real quick the vertical stretching and compressing. It's actually really very similar to what we just did, but it's a little bit backwards. I'll show you what I mean here in a minute. Okay, so we're going to do the same thing. We're going to take some points. So here's a point, here's a point, and notice we're using the same function. Now we're going to vertically stretch this function by a factor of three. Okay, so we're using the same factor, but we're going to vertically stretch this time instead of horizontally stretch. Okay, so let's find a couple more points, negative one, negative one, and this negative two, what is that, one, two, three, negative three, okay, negative two, negative three. Okay, now what I'm going to do is I'm going to vertically stretch these by a factor of three. Now what that means is I'm going to take the y-coordinates, the y-coordinates, and multiply them by three. Vertical stretch, vertical goes up and down, remember here's your x, here's your y, vertical goes up and down, so I'm going to take my y-coordinates, the ones that go up and down, and I'm going to multiply them by a factor of three, okay. Now this is actually going to be a little bit tough for the points that I have here because I have a, right here, this is three, this is a height of three, and I'm going to take that in times by three, well three times three is nine, which is all the way up here, it's actually off of my grid, so I can't really plot that point, okay. So let's move on to the next one, right here I have a y-coordinate of one, take one times three it's going to be three, so my y-intercept actually moves up to right there, this point here it has a y-coordinate of negative one, down here negative one, and so take that times three it's going to be negative three, so it's going to be down here, there we go, and now see my other points that I have, my other points that I have are going to be too big, okay this is a negative three for a, for my y-coordinate here, this is a negative three, if I take that times negative, sorry take that negative three times three it's going to get me nine, so it's going to be all the way down here, so I really can't graph it on this grid, okay so what I'm going to do, these are my only two points that I have that I could actually draw, so I'm going to use one of the straightest lines that I can to try and draw what this function is going to look like, not bad if I do say so myself, a little curve right there, but that is what my g-function is going to look like, okay so that's what a vertical stretch looks like, everything is going to get taller, okay everything's going to get taller, okay so now let's write the rule for g of x, so I actually write the function itself, okay so I need a slope and a y-intercept, alright so what I need is a slope, well I do have two points I can find the slope, so one two three four five six one, well got a slope of six, okay and then I have a y-intercept of one two three, got a y-intercept of positive three, okay now as I compare these two functions notice that okay actually we're vertically stressing by a factor of three notice what happened, 2x became 6x that's just timesing by three, one became three that's just timesing by three, so notice what we did, if we are going to we took our function, we changed it by taking the factor and multiplying it times the entire function, this is what we call a vertical, vertical stretch, okay and this is by a factor, factor of a, okay so that one's actually a little bit easier than the last one we just basically just multiply everything times that factor to make everything bigger, everything taller, okay and then we actually we can actually vertically compress this so I actually have to rewrite this a little bit if I want to vertically compress something if I want to vertically compress something that's actually going to make it smaller so as you can well imagine if I want to make something smaller I'm going to have to divide by that factor or multiply by one over that factor which is the same thing, okay so this one would be for a vertical, vertical compression, vertical compression, okay so if I want to if I want to vertically compress this line it would actually get smaller the slope would actually go down so I would actually have to divide everything by that factor, okay so that's just a couple, that's just a couple of quick examples on how to do your horizontal stretching and compressing and your vertically stretching and compressing and then also the notation that kind of goes with that the big thing that that you can learn here though is that if you're ever in doubt if you don't remember a lot of this notation that's actually not that big of a deal if you simply just get your points on here and then modify those points draw the new line and then write your new equation that's that's basically good enough that's basically what we're doing here anyway the notation is basically just a a quicker way of doing all of that but again both processes will get you the same answer, alrighty that is vertically stretching compressing and horizontal stretching and compressing