Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.

Video: Transforming Functions: Horizontal Stretch

Tim Burnham

Learn how to recognize and carry out function transformations of the form f(ax), which are horizontal stretches. We consider a range of examples for different values of a, resulting in stretches and squashes about the y-axis and reflections in the y-axis.

16:35

Video Transcript

In this video we’re gonna take some functions and carry out transformations that will stretch or squash the graphs parallel to the π‘₯-axis, so away from or towards the 𝑦-axis. We’ll also take a look at the effect of such transformations on the equations of the functions and we’ll come up with a general rule about stretch and squash transformations parallel to the π‘₯-axis.

Here’s a graph of a function called 𝑓 of π‘₯. Now let’s define another function 𝑔 of π‘₯ so the 𝑔 of π‘₯ is equal to 𝑓 of two π‘₯. Now let’s just first recap the process for calculating the 𝑦-coordinates for a function. So 𝑦 equals 𝑓 of π‘₯. First we input our π‘₯-coordinate, our π‘₯-value, into the function. Then the 𝑓 of π‘₯ function does some math with that number. And the number that pops out is the corresponding 𝑦-coordinate. So now to work out a 𝑦-coordinate or output value for the 𝑔 function for a specific input value, I can just double that π‘₯-value and pass it into the 𝑓 function. And the answer I get to that tells me the 𝑦-coordinate corresponding to π‘₯ for the 𝑔 function.

So the process for working out all the 𝑦-coordinates for the 𝑔 function is just going to be to take the π‘₯-coordinates, double them, read off the corresponding 𝑦-coordinates from the graph of 𝑦 equals 𝑓 of π‘₯ and use those as the corresponding 𝑦-coordinates for the 𝑔 of π‘₯ function. So for example, 𝑔 of zero is gonna be the same as 𝑓 of two times zero and two times zero is zero. So 𝑔 of zero is the same as 𝑓 of zero. Well 𝑓 of zero here is zero. So that is going to map to 𝑔 of zero, here to the same place. And 𝑔 of one is equal to 𝑓 of two times one which is 𝑓 of two So the 𝑦-coordinate that corresponds to an π‘₯-coordinate of one in the 𝑔 function is going to be the same as the 𝑦-coordinate that corresponds to an π‘₯-coordinate of two in the 𝑓 function. So if we look that up, that’s going to be this point here is going to map to this point here. 𝑔 of one is the same as 𝑓 of two. So to work out the 𝑦-coordinate that corresponds to an π‘₯-coordinate of two in the 𝑔 function, we need to work out the 𝑦-coordinate that corresponds to an π‘₯-coordinate of four on the 𝑓 function. And that’s this one, zero, so that’s got an π‘₯-coordinate of four on the 𝑓 function. So on the 𝑔 function, it’s going to, half that- is going to have an π‘₯-coordinate of two.

Now let’s try some negative π‘₯-coordinates. 𝑔 of negative one is gonna be the same as 𝑓 of two times negative one, so 𝑓 of negative two. Now 𝑓 of negative two is this point here. It’s got a 𝑦-coordinate value of about two point four. Now that’s gonna correspond to an π‘₯-coordinate of negative one on the 𝑔 function. So that point is gonna map to here. And 𝑔 of negative two is equal to 𝑓 of two times negative two, so that’s 𝑓 of negative four. And that’s obviously off our graph down there somewhere. But the effect is gonna be the same; it’s gonna have its π‘₯-coordinate halved and moved in here somewhere. So after running through a few of these points, we can see a bit of a pattern emerging. All the points on the curve 𝑦 equals 𝑓 of π‘₯ are being squashed towards the 𝑦-axis. It’s like the 𝑔 of π‘₯ curve is exactly the same as the 𝑓 of π‘₯ curve, but with all of the π‘₯-coordinates halved. So the point that was on the 𝑦-axis and had an π‘₯-coordinate of zero stays where it is because a half of zero is zero. But all of the other π‘₯-coordinates are being squashed inwards.

So let’s now complete the sketch by joining up the dots, so taking this curve one section at a time. So let’s look at this section first here instead of being this section of the curve. All of those π‘₯-coordinates are gonna be halved. So it’s gonna come-come down here like that. And then the next section from here up to here, halving all those π‘₯-coordinates, it’s gonna bring it here like that. And then this section up here, all of those π‘₯-coordinates are gonna be halved. And it’s gonna look something like that. Then this section of the 𝑓 of π‘₯ curve is gonna be squashed towards the π‘₯-axis to look something like that. And then finally this section is gonna be squashed towards the π‘₯-axis to look something like that. And once we’re happy with it, let’s just colour it in a different colour to make it stand out, so there we have it. Because 𝑔 of π‘₯ is equal to 𝑓 of two π‘₯, this’s had the effect of halving all of the π‘₯-coordinates on our 𝑓 of π‘₯ curve to turn them into the 𝑦-coordinates for our 𝑔 of π‘₯ curve.

Now let’s look at another function β„Ž of π‘₯, where β„Ž of π‘₯ is equal to 𝑓 of half π‘₯. Again we’re gonna use the graph of 𝑓 of π‘₯ to work out all the values of β„Ž of π‘₯. We simply take the π‘₯-input value, halve it, and then feed the result into the 𝑓 function. What comes out is the value we’re looking for for β„Ž of π‘₯. So again just running through some points, β„Ž of zero is equal to 𝑓 of a half times zero, which is just 𝑓 of zero. And 𝑓 of zero is here and that’s gonna map to exactly the same place here. Now β„Ž of one is equal to 𝑓 of a half times one, so that’s 𝑓 of a half. And remember the π‘₯-coordinate a half plugged into the 𝑓 functions gives us the 𝑦-coordinate answer that we would get if we plug one into the β„Ž function. So this point is going to map to here. And that’s about negative one point two-ish. β„Ž of two is equal to 𝑓 of a half times two, so that’s 𝑓 of one. And 𝑓 of one looks like it’s about negative two point four and that is going to map to the β„Ž function with an π‘₯-coordinate of two. So that point is gonna be transformed to here. Now hopefully you can see the pattern that’s emerging. In doing the transformation β„Žπ‘₯ equals 𝑓 of a half π‘₯, we’re taking all of these π‘₯-coordinates and we are effectively doubling them. So this π‘₯-coordinate up from here on the 𝑓 function gets doubled over to here on the β„Ž function. Now this means that the curve 𝑦 equals β„Žπ‘₯ is exactly like the curve 𝑦 equals 𝑓 of π‘₯, but with all of the π‘₯-coordinates doubled. It’s stretched away from the 𝑦-axis parallel to the π‘₯-axis.

So let’s quickly work out a few more points here with negative π‘₯-coordinates. β„Ž of negative one is the same as 𝑓 of negative a half which works out to be about one point two-ish. So this point maps to here. And β„Ž of negative two is the same as 𝑓 of negative one and that’s about two. So this point here maps to this point here. So again by following that pattern, we’re doubling all of the π‘₯-coordinates, but this time obviously in the negative direction.

Let’s just manually stretch another couple of points. This point here down to the bottom of this part of the curve has got an π‘₯-coordinate of about two point three, two point four. So that’s gonna double. And we’ll move out to about here somewhere. And this point here has- well it’s obviously got a 𝑦-coordinate of zero; it’s got an π‘₯-coordinate of four. So that’s gonna double out to eight. So now I can sort of complete the sketch for this side of my curves. So it’s gonna come down here and then sort of up and that’s an up to here. And then let’s just plot another couple of points on the left-hand side to the left of the 𝑦-axis. At this point here, it’s got an π‘₯-coordinate of about minus one point seven. So that’s gonna double to about negative three point four. So this point is gonna move out to here. And this point here with an π‘₯-coordinate of negative three is gonna map out here to have an π‘₯-coordinate of negative six. And again now I can complete the sketch on this side. So the curve is gonna come something around here, something like that. So wholly you can see that we locked off the 𝑦-axis there. That point that was on the 𝑦-axis stayed exactly where it was, but everything else is being stretched away from the 𝑦-axis parallel to the π‘₯-axis. And it’s having all of its π‘₯-coordinates doubled.

Now we’ve been transforming functions by multiplying the input values by a constant. So we’ve been mapping or transforming something like 𝑓 of π‘₯ onto 𝑓 of π‘Ž times π‘₯. And we’ve seen that when π‘Ž is greater than one β€” so we tried when π‘Ž was two, we did 𝑓 of two π‘₯. This squashes the curve of 𝑦 equals 𝑓 of π‘₯ towards the 𝑦-axis. So we’re gonna multiply the π‘₯-coordinates by one over π‘Ž, which in this case is going to be less than one. So it’s squashing it towards the 𝑦-axis. And we also saw that when π‘Ž is between zero and one, remember we had tried the value of half, that stretches the curve of 𝑦 equals 𝑓 of π‘₯ away from the 𝑦-axis. But again we’re multiplying the π‘₯-coordinates by one over π‘Ž. But because this time π‘Ž is between zero and one, one over eight becomes a positive whole number greater than one. So it’s stretching those π‘₯-coordinates away from the 𝑦-axis. But what if we would’ve used the value of one for π‘Ž? That would have done 𝑓 of one times π‘₯. Well the curve would stay the same; we’re just multiplying all the π‘₯-coordinates by one. So again we’re multiplying the π‘₯-coordinates by one over π‘Ž. But because π‘Ž is one, we get one over one which is just one. So we’re multiplying all the π‘₯-coordinates by one.

Well now let’s take a quick look at what happens when those π‘Ž values are negative. What effect does that have on the transformation? Well let’s start off by thinking about when π‘Ž is negative one. So if we’re doing the transformation 𝑔 of π‘₯ is equal to 𝑓 of π‘Ž times π‘₯, if π‘Ž is negative one that means 𝑓 of negative one times π‘₯, so we’re gonna multiply all the π‘₯-coordinates by one over negative one. So that’s negative one. It would just be the negative version of all the π‘₯-coordinates.

So 𝑔 of π‘₯ will equal 𝑓 of negative π‘₯.

And that is just a reflection in the 𝑦-axis. Let’s have a quick look. Let’s use the same curve we’ve been using for our other examples. Let’s start with this point here. When the π‘₯-coordinate is zero, the negative is zero-zero. So that point on the 𝑦-axis stays exactly where it is. And this point here is gonna map to negative four over here. And this point here is gonna map to positive three over here.

These points here we’re gonna take the negative of their π‘₯-coordinates. So they’re gonna map across here like that. I will draw the arrows in as it started to get a bit messy. And these points down here below the π‘₯-axis will map across to here like this. And these points here will map across to here like this. And then we can actually start to fill in the sketch. So joining up the dots that we have, the transformed curve is going to look something like this, going up to here. And now let’s go on and transform some more points. So these points here are gonna map to here like this and these last points here, over here like this. Then joining them up to complete our sketch, we’re gonna get this curve here. So if the black dotty curve was our original 𝑦 equals 𝑓 of π‘₯ curve when we transformed that, so 𝑔 of π‘₯ is equal to 𝑓 of negative π‘₯, 𝑦 equals to 𝑔 of π‘₯ is the orange curve here. It’s just a reflection in the 𝑦-axis.

Now looking at some other negative values of π‘Ž, let’s think about what would happen if π‘Ž is between zero and negative one, so for example, if π‘Ž was equal to negative half. Now we can define a new function. Let’s call it β„Ž of π‘₯. That’s equal to 𝑓 of π‘Ž times π‘₯. Now if π‘Ž is equal to negative a half, that means β„Ž of π‘₯ is equal to 𝑓 of negative a half π‘₯. So as we just seen that negative in there is gonna cause a reflection in the 𝑦-axis. We’re gonna be taking the negative of all the π‘₯-coordinates, but then we’re multiplying those π‘₯-coordinates by a half as the input values. And we saw before that that’s going to double the π‘₯-coordinates on the output on our graph. So the effect of this transformation is gonna be a reflection in the 𝑦-axis followed by a stretch doubling the π‘₯-coordinates away from the 𝑦-axis.

Now obviously any point on the 𝑦-axis is gonna map to itself in this scenario. So that point is gonna map to there. And this point here has an π‘₯-coordinate of four. So in this transformation, we’re going to take then negative that, negative four. Then we’re going to double it; so it’s gonna go to negative eight. And that’s slightly off of our scale in this example. But this point here has an π‘₯-coordinate of negative three. We’re going to make it the negative of that, so positive three, and then double it. So that’s gonna map to six.

Now let’s try another couple of points. So this point here has an π‘₯-coordinate of about minus one point seven. So that’s gonna be negativized and then doubled. That’s gonna map over to here to about three point four. And this point here has an π‘₯-coordinate with about two point four. So that’s gonna be negatived and doubled to be negative four point eight. So that’s gonna map over to about here somewhere. So this bit of the curve here is going to be reflected and stretched out something like this. And this bit of the curve here is going to be stretched out and reflect across the 𝑦-axis something like this. So it’s gonna come up like that. So that just leaves us with this section of the curve here to map. And we’ve got a point down here at the bottom; this is going to map to over here, about here. So take the negative-the negative three point eight, double that; you can get about positive seven point six. So the rest of that curve is going to come down here and look something like that. So just coloring that in a different color to make it really stand out, that green curve then is 𝑦 equals β„Ž of π‘₯, which is 𝑓 of negative a half π‘₯. The negative remember reflecting in the 𝑦-axis and the half times π‘₯ is doubling all of that π‘₯-coordinates. So it’s stretching it out away from the 𝑦-axis.

Let’s just quickly consider then when π‘Ž is less than negative one, so for example, if it was negative two. Now β„Žπ‘₯ equals 𝑓 of π‘Žπ‘₯ would be 𝑓 of negative two π‘₯. And negatives are going to cause this reflection in the 𝑦-axis and the two times π‘₯ is going to squash the curve towards the 𝑦-axis, halving all of those π‘₯-coordinates. So the points to the right of the 𝑦-axis there are gonna move over to the other side of the 𝑦-axis and have their π‘₯-coordinates halved. So that half of the reflecting curve will look something like this. And the points to the left of the 𝑦-axis are going to reflect like this, creating a curve that looks something like that.

So having a run through those examples, we can now complete our summary for all the transformations of this format. And that basically amounts to if we’re transforming 𝑓 of π‘₯ into 𝑓 of π‘Ž times π‘₯, what we do is we take the π‘₯-coordinates and we’re multiplying them by one over π‘Ž. Sometimes that squashes the entire curve towards the 𝑦-axis. Sometimes it stretches it away from the 𝑦-axis. And we can summarize that basically as being a horizontal stretch. Now I know I promised in the introduction that I would take a look at what happens to the equations of these functions under the transformations, but I’ve run out of time unfortunately. So I will record a separate video and we’ll talk all about what happens to the equations.