Main content

### Course: Algebra 2 > Unit 9

Lesson 4: Scaling functions# Scaling functions horizontally: examples

The function f(k⋅x) is a horizontal scaling of f. See multiple examples of how we relate the two functions and their graphs, and determine the value of k.

## Want to join the conversation?

- This is so confusing, I wish they had made summary/clarification/FAQ for this particular lesson like what they do for the lessons previously.(15 votes)
- Transformations of functions is the most trickier and interesting topic I've seen since joining khan academy. Scaling vertically and horizontally have connection, don't they ? if we scale by the same factor, are they the same in the linear function y=x and different in y=x^2(13 votes)
- ngl this is pretty confusing at first glance.(9 votes)
- I know, but I prefer to think about horizontal stretches and shrinks like this:

For horizontal stretches like (1/2x)^2, whatever y value you have, the transformed function will have that value at the product of the original x-value and the reciprocal of the horizontal stretch value. For example, if f(x) is x^2 and has (1,1) and g(x) is (1/2x)^2, g(x) will have (2,1).

For horizontal shrinks, it's the opposite. If f(x) is x^2 and g(x) is (2x)^2, when f(x) has the point (1,1), g(x) has the point (1/2, 1).

In summary, it's about multiplying the original x-values by the reciprocal of the stretch/shrink value.(1 vote)

- Does anyone understand how he got the x values for the table? Why are the 1/2x values the one used in the graph? Why aren't those just the x values?(5 votes)
- Explanation 1:

Look carefully at both function f(x) and g(x).

You will see that the only difference between them is that in g(x), x is multiplied by (1/2).

So, g(x) = f(x/2).

Explanation 2:

f(x) = (x - 4)^2 - 4 ---- {Given in the question).

Define a new variable b. Let b = (x/2).

Substitute b into function f.

f(b) = (b - 4)^2 - 4

Since b = x/2.

f((x/2)) = ((x/2) - 4)^2 - 4

This is the exact same function as g(x).

----------------------------------------

He used those x values because they have an easy to determine y value.

Hope this helps.(4 votes)

- why is it 3x and not x/3 for g(x)?(4 votes)
- we know when:

f(-3) = g(-1)

f(6) = g(2)

So the input of f is always*3 times*the input for g.

So if the input for g is x, then the input for f has to 3x.

Hopefully that makes sense!(4 votes)

- Where did he get g(x)= f(0.5x)? It looks like he just ignored the whole rest of the equation.(3 votes)
- He got g(x) = f(0.5x) from the first function of the graph of f(x). If you look at both of the equations of f(x) and g(x) you will notice that they both have the same horizontal translation and vertical translation than that of the parent function of x^2. The only change is that g(x) is a horizontal stretch by a factor of 2 than f(x). Thus he ignored the rest part of the equation since that was not required for graphing. If by any chance the graph of g(x) was to be graphed on the basic of the parent function then, yes, all of the characteristics of the graph needs to be in mind. But in this example you are graphing g(x) on the basis of f(x) so doing the translation which has been done already will lead to incorrect results. That is why he graphed g(x) = f(0.5x) rather than graphing the whole equation again.

Hope this helps(5 votes)

- When I tried doing this problem on my own I came to f(x)=g(1/3x) but Sal did f(3x)=g(x) are they the same thing?(3 votes)
- Yes, they are one and the same. Take this for example -

If you have 3x = y, you can also represent it as x = y/3 (divide both sides by 3)

Hope this helped!(4 votes)

- For the second question, why am i not able to solve the question by just subbing in x values and plotting the graph?(4 votes)
- Why are horizontal transformations counterintuitive?(3 votes)
- They're not. Think of it this way:

Say you have the curve y=x³-3. To shift the curve down 5, we replace y by y+5. This is because if the point (x, y) is on the original curve, we want (x, y-5) to satisfy the new equation. So we increase y by 5 so that when (x, y-5) is plugged in, the 5s cancel and we get the original, true expression back.

So, (2, 5) lies on the curve y=x³-3. This means (2, 0) will lie on the down-shifted curve. The right-hand side still evaluates to 2³-3=5, not 0, so to edit the equation, we subtract 5 from y to rebalance. (2, 0) does satisfy y-5=x³-3.

That's how it works in any direction. To shift down 2, replace y by y+2.

To shift up 2, replace y by y-2.

To shift left 2, replace x by x+2.

To shift right 2, replace x by x-2.

All of the shifts are in the opposite direction that you might expect because we are working to cancel out the shift to keep the equation true.(1 vote)

- It’s like I’m thinking of this concept in the opposite way can someone pls break this down Barney style(3 votes)

## Video transcript

- [Instructor] We're told this
is the graph of function f, fair enough. Function g is defined as g
of x is equal to f of two x. What is the graph of g? So pause this video, and try
to figure that out on your own. All right, now let's work through this. And the way I will think about it, I'll set up a little table here. And I'll have an x column, and then I'll have a, well,
actually just put g of x column. And of course, g of x
is equal to f of two x. So when x is, and actually let me
see, when x is equal to, I could pick a point like x equaling zero, so g of zero is going to
be f of two times zero. So it's going to be f of two times zero, which is still f of zero, which is going to be equal
to a little bit over four, so which is equal to f of zero. And so they're going to both
have the same y-intercept, but interesting things are
going to happen the further that we get from the y-axis or as our x increases in
either direction away, or as our x gets bigger in
either direction from zero. So let's think about
what's going to happen at x equals two. So at x equals two, g of two is going to be
equal to f of two times two, two times two, which
is equal to f of four. And we know what f of four is. F of four is equal to zero. So g of two is equal to f of
four, which is equal to zero. So notice, the corresponding
point has kind of gotten compressed in or
squeezed in or squished in, in the horizontal direction. And so what you see happening, at least on this side of the graph, is everything's happening
a little bit faster. Whatever was happening at a certain x, it's now happening at half of that x. So this side of the graph
is going to look something, try to draw it a little
bit better than that, it's going to look something like this, like this. Everything's happening twice as fast. And what happens when you go
in the negative direction? Well, think about what
g of negative two is. G of negative two is equal to
f of two times negative two, two times negative two, which is equal to f of negative four, which we see is also equal to zero. So g of negative two is zero. And you might be thinking, "Why did you pick two and negative two?" Well, the intuition is that things are going to be squeezed in. Things are happening twice as fast. So whatever was happening at x equals four is now going to happen at x equals two. Whatever is happening at
x equals negative four is now going to happen
at x equals negative two. And I saw that we were
at very clear points at x equals negative four
and x equals four on f, so I just took half of that to pick my x-values right over here. And then so what our graph is going to look like is something like this. It's going to look something like this. It's going to look like
it's been squished in from the right and the left. Now let's do another example. So now they've not only
given the graph of f, they've given an expression for it. What is the graph of g of x which is equal to this business? So pause this video, and
try to figure that out. All right, the key is to
figure out the relationship between f of x and g of x. And what we can see,
the main difference is, is instead of an x here in f
of x, we have an x over two. So everywhere there was an x, we've been replaced with an x over two. So another way of thinking
about it is g of x is equal to f of not
x but f of x over two. Or another way of
thinking about it, g of x is equal to f of 1/2x. And then we can do a
similar type of exercise. And they've given us
some interesting points, the points two, the point, or the point x equals two,
the point x equals four, and the point x equals six. So let's think about this. Last time, when it was g
of x is equal to two x, things were happening twice as fast. Now things are going
to happen half as fast. And so what I would do, let me just set up a little table here. The interesting x-values for me are the ones that if I take half of them, then I'm going to get one of these points. So actually let me write this, half, 1/2x, and then I can think about what g of x is equal to f of 1/2x is going to be. So I want my 1/2x to be, let's see, it could be two, four, and six, two, four, and six. And why did I pick those again? Well, it's very clear
what values f takes on at those points. And so if 1/2x is two,
then x is equal to four. If 1/2x is four, then x is equal to eight. If x is equal to 12, then 1/2x is six. And so then we could
say, all right, g of four is equal to f of two, which is equal to zero. That's why I picked two, four, and six. It's very easy to evaluate f of two, f of four, and f of six. They gave us those points very clearly. So g of eight is going to be equal to g, is going to be equal to f of
1/2 of eight, or f of four, which is equal to negative four. And then g of 12 is equal to f of six, which is half of 12, which
is equal to zero again. So then we could plot these points, and we get a general sense
of the shape of the graph. So let's see, g of four is equal to zero, g of eight is equal to negative four right over there, and then g of 12 is equal to zero again. So everything has been stretched out. So there you go, it's been
stretched out in at least, in the horizontal direction
is one way to think about it, in the horizontal direction. And you can see that this point in f corresponds to this point in g. It's gotten twice as far from the origin because everything is
growing half as fast. You input an x, you take a half of it, and then you input it into f. And then this point right over here corresponds to this point. Instead of happening at
four, this vertex point, it's now happening at eight. And last but not least, this point right over here
corresponds to this point. Instead of happening at
six, it's happening at 12. Everything is getting stretched out. Let's do one more example. F of x is equal to all of this. We have to be careful,
there's a cube root over here. And g is a horizontally
scaled version of f. The functions are graphed where
f is solid and g is dashed. What is the equation of g? So pause this video, and see
if you can figure that out. All right, let's do this together, and it looks like they've
given us some points that seem to correspond with each other. To go from f to g, it looks
like these corresponding points have been squeezed in
closer to the origin. And what we can see is, is
that f of negative three, f of negative three seems to be equal to g of negative one. And f of six over here, f of six seems to be equal to g of two, g of two. Or another way to think about it, whatever x you input in g,
it looks like that's going to be equivalent to three times that x inputted into f. So g of x is equal to f of three x. And so if you want to
know the equation of g, we just evaluate f of three x. So f of three x is going to be equal to, and I could just actually
put an equal sign like this, f of three x is going to
be equal to negative three times the cube root of, instead of an x, I'll put
a three x right over there, three x plus two, and
then we have plus one. And that's it, that's
what g of x is equal to. It's equal to f of three x, which is that. We substituted this x with a three x. And we are done.