# Video: Transforming Functions: Horizontal Stretch

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

16:34

### 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.