Stretches and compressions
A parent graph comes in one size. What does multiplying its output, or its input, by a number do to it?
Where you are 7 in Transformations of functions
When you reach for it
The parent graphs of the squaring and cubing functions and the square root and reciprocal functions come in one size. Real rules rarely do: 3x^2, \displaystyle \frac{1}{2}x^3, \displaystyle \sqrt{2x}. Each is a parent with a number multiplying either the whole output or the input, and its graph is the parent pulled or squashed in one direction.
Reach for this move to draw such a graph without plotting it point by point, to say what a number in a rule does, and to name the move when a graph or table has a parent’s shape but the wrong size. It also describes scaling in the world: turning up the volume multiplies how far a speaker cone moves, and playing a recording faster squeezes the same motion into less time.
The procedure
Multiplying the output: a\,f(x)
Let g(x) = a\,f(x) with a > 0. At every input, g works out what f gives and then multiplies it by a. So if (p, q) is on the graph of f, then g(p) = a\,f(p) = aq, and the point moves like this:
Every point moves straight up or down, and its distance from the x-axis is multiplied by a. Points on the x-axis have q = 0 and a \cdot 0 = 0, so they stay where they are.
- If a > 1, the graph is stretched vertically by a factor of a: pulled away from the x-axis.
- If 0 < a < 1, it is compressed vertically by a factor of a: squashed toward the x-axis.
A point below the axis moves down in a stretch and up in a compression, so “away from” and “toward the axis” are the words that are right for every point.
The inputs are untouched, so the domain does not change. If a is negative, then a\,f(x) = -\big(|a|\,f(x)\big): a stretch or compression by |a| together with a reflection across the x-axis.
Multiplying the input: f(bx)
Let g(x) = f(bx) with b > 0. Now the number acts before f does: g multiplies its input by b and hands the result to f, which is evaluating f at an expression. Where does the point (p, q) go? g gives the output q when f receives p, that is when bx = p, which happens at \displaystyle x = \frac{p}{b}:
Every point moves sideways, and its distance from the y-axis is multiplied by \displaystyle \frac{1}{b}, the reciprocal of the number in the rule.
- If b > 1, then \displaystyle \frac{1}{b} < 1 and the graph is compressed horizontally by a factor of \displaystyle \frac{1}{b}, toward the y-axis.
- If 0 < b < 1, then \displaystyle \frac{1}{b} > 1 and the graph is stretched horizontally by a factor of \displaystyle \frac{1}{b}, away from it.
The reciprocal is the reason a horizontal move looks backwards. Take b = 2: g(x) = f(2x) does at x = 3 what f does at 6, and at x = 5 what f does at 10. Everything f does, g does at half the input, so the graph is squeezed to half its width, even though the rule says “times 2”. The outputs are untouched, so the range does not change, and a point on the y-axis (p = 0) stays put.
Naming a stretch from a graph
Read the move off two matching points. For a vertical move, compare outputs at the same input: if f(p) \ne 0, then \displaystyle a = \frac{g(p)}{f(p)}. For a horizontal move, compare inputs at the same output: if f reaches the height q \ne f(0) at x = p and g reaches it at x = p', the horizontal factor is \displaystyle \frac{p'}{p} and \displaystyle b = \frac{p}{p'}. One pair of points fixes the number; a second pair confirms that the graph really is that stretch and not some other curve through the same point.
Worked examples
Stretching the squaring graph
Graph g(x) = 3x^2 from y = x^2, and describe the move.
SolutionThe 3 multiplies the whole output, so every height of y = x^2 is tripled and every input stays.
| x | -2 | -1 | 0 | 1 | 2 |
|---|---|---|---|---|---|
| x^2 | 4 | 1 | 0 | 1 | 4 |
| 3x^2 | 12 | 3 | 0 | 3 | 12 |
Each point (x, y) goes straight up to (x, 3y). The vertex (0, 0) stays, since 3 \cdot 0 = 0. The curve looks narrower because it rises faster: it reaches height 3 at x = \pm 1, where y = x^2 needs \displaystyle x = \pm\sqrt{3} \approx \pm 1.73. The domain and the range, y \ge 0, are unchanged. The graph is y = x^2 stretched vertically by a factor of 3, as in the first figure.
Compressing the cubing graph, and one flip
Describe the graphs of (a) \displaystyle h(x) = \frac{1}{2}x^3 and (b) \displaystyle k(x) = -\frac{1}{2}x^3, starting from y = x^3.
Solution(a) Every output of y = x^3 is halved:
| x | -2 | -1 | 0 | 1 | 2 |
|---|---|---|---|---|---|
| x^3 | -8 | -1 | 0 | 1 | 8 |
| \displaystyle \frac{1}{2}x^3 | -4 | \displaystyle -\frac{1}{2} | 0 | \displaystyle \frac{1}{2} | 4 |
The point (2, 8) moves down to (2, 4), and (-2, -8) moves up to (-2, -4). Both have halved their distance from the x-axis. The graph is y = x^3 compressed vertically by a factor of \displaystyle \frac{1}{2}: flatter, with the same domain and range, all real numbers.
(b) k(x) = -h(x), so k is the graph of h reflected across the x-axis. Its points are (-2, 4), \displaystyle \left(-1, \frac{1}{2}\right), (0, 0), \displaystyle \left(1, -\frac{1}{2}\right) and (2, -4). It is y = x^3 compressed vertically by a factor of \displaystyle \frac{1}{2} and reflected. The order of the two does not matter, because multiplication is commutative: \displaystyle -\frac{1}{2}y = \frac{1}{2}(-y) for every height y.
A horizontal compression of the square root
Describe the graph of \displaystyle p(x) = \sqrt{2x}, starting from \displaystyle y = \sqrt{x}.
SolutionThe 2 multiplies the input, so expect the reciprocal: points move to half their distance from the y-axis. Choose inputs that make 2x a perfect square, so the outputs are easy:
| x | 0 | \displaystyle \frac{1}{2} | 2 | \displaystyle \frac{9}{2} | 8 |
|---|---|---|---|---|---|
| \displaystyle \sqrt{2x} | 0 | 1 | 2 | 3 | 4 |
The parent reaches height 2 at x = 4; p reaches it at x = 2, since \displaystyle p(2) = \sqrt{4} = 2. The parent reaches 3 at x = 9; p at \displaystyle x = \frac{9}{2}. Each point (x, y) moves to \displaystyle \left(\frac{x}{2}, y\right), so the graph is \displaystyle y = \sqrt{x} compressed horizontally by a factor of \displaystyle \frac{1}{2}.
The domain is unchanged: 2x \ge 0 exactly when x \ge 0. The range is still y \ge 0.
A horizontal stretch of the reciprocal
Describe the graph of q(x) = \dfrac{1}{x/4}, starting from \displaystyle y = \frac{1}{x}.
SolutionThe input is multiplied by \displaystyle b = \frac{1}{4}, so each point moves to \displaystyle \frac{1}{b} = 4 times its distance from the y-axis: (x, y) goes to (4x, y). So \displaystyle \left(\frac{1}{2}, 2\right) goes to (2, 2), (1, 1) to (4, 1), \displaystyle \left(2, \frac{1}{2}\right) to \displaystyle \left(8, \frac{1}{2}\right) and (-1, -1) to (-4, -1).
Check one: \displaystyle q(8) = \frac{1}{8/4} = \frac{1}{2}. The graph is \displaystyle y = \frac{1}{x} stretched horizontally by a factor of 4. Both asymptotes stay: \displaystyle \frac{x}{4} = 0 only at x = 0, and the outputs still shrink toward 0 far out.
Now simplify the rule. Dividing by \displaystyle \frac{x}{4} is multiplying by \displaystyle \frac{4}{x}, so
The same curve is also \displaystyle y = \frac{1}{x} stretched vertically by a factor of 4: the point (1, 1) goes up to (1, 4), and indeed q(1) = 4. One graph, two correct names.
Naming a stretch from a graph
The solid curve g is the graph of y = x^2 after a stretch or compression. Name it as a vertical move and as a horizontal move, and write the rule each way.
As a vertical move, compare outputs at the same input. At x = 1 the parent gives 1 and g gives 4, so \displaystyle a = \frac{4}{1} = 4. Confirm with a second input: at \displaystyle x = \frac{1}{2} the parent gives \displaystyle \frac{1}{4}, and \displaystyle 4 \cdot \frac{1}{4} = 1, which is the marked point. So g is y = x^2 stretched vertically by a factor of 4, and g(x) = 4x^2.
As a horizontal move, compare inputs at the same output. The parent reaches height 1 at x = 1, and g reaches it at \displaystyle x = \frac{1}{2}. The horizontal factor is \displaystyle \frac{1}{2}, a compression, so b is its reciprocal, 2. Confirm with height 4: the parent reaches it at x = 2, and g at x = 1, half as far out. So g(x) = (2x)^2.
The two rules agree, since (2x)^2 = 4x^2 by the power of a product. For the squaring function every horizontal move is also a vertical one.
The speaker cone
Udo records how far a speaker cone sits from its resting position, f(t) millimeters (outward positive), t milliseconds after a note starts:
| t | 0 | 2 | 4 | 6 | 8 |
|---|---|---|---|---|---|
| f(t) | 0 | 0.5 | 0 | -0.5 | 0 |
(a) Waleed turns the volume up so the cone moves three times as far at every moment: g(t) = 3f(t). Make a table for g.
(b) Nikita plays the note at twice the speed: h(t) = f(2t). Make a table for h, and say what the table for f cannot tell you about h.
Solution(a) The times stay and every displacement triples:
| t | 0 | 2 | 4 | 6 | 8 |
|---|---|---|---|---|---|
| g(t) | 0 | 1.5 | 0 | -1.5 | 0 |
A vertical stretch by a factor of 3: the cone swings out to 1.5 mm and in to -1.5 mm.
(b) h(t) = f(2t) does at time t what f did at time 2t. So h(1) = f(2) = 0.5, h(2) = f(4) = 0, h(3) = f(6) = -0.5 and h(4) = f(8) = 0:
| t | 0 | 1 | 2 | 3 | 4 |
|---|---|---|---|---|---|
| h(t) | 0 | 0.5 | 0 | -0.5 | 0 |
The same swing now takes 4 ms instead of 8: a horizontal compression by a factor of \displaystyle \frac{1}{2}. The table cannot give h(8), because h(8) = f(16) and f is known only up to t = 8.
Boundaries
The numbers must not be 0. With a = 0, every point lands on the x-axis and the graph is the line y = 0; with b = 0, f(0 \cdot x) = f(0) for every x, a flat line or nothing at all if f(0) is undefined, as for \displaystyle \frac{1}{x}. Neither is a stretch, and neither can be undone.
A negative number adds a flip. a < 0 is a stretch or compression by |a| together with a reflection across the x-axis; b < 0 also reflects across the y-axis. Those moves belong to reflecting a graph.
Stretches are about the axes. A vertical move fixes the points on the x-axis and a horizontal one fixes the points on the y-axis. For a graph that has also been shifted, the order of the moves matters; that is combining transformations.
Domain and range. A horizontal move never changes the range, and a vertical one never changes the domain. A horizontal move can change a domain with an end: if f is defined only for 0 \le x \le 8, then f(2x) is defined only for 0 \le x \le 4.
Two names is special. For x^2, x^3, \displaystyle \sqrt{x} and \displaystyle \frac{1}{x} every horizontal move is also a vertical one. For most functions it is not (Exercise 23).
Where this goes next
Stretches are one of the four kinds of move, and combining transformations puts them all into a\,f\big(b(x - h)\big) + k. With that form, graphing by transformations draws a whole graph from its rule, and finding the rule of a transformed graph runs the naming in this lesson backwards. The a in vertex form is this lesson’s vertical stretch.
The two numbers return for waves. In y = a\sin(bx) the a is the Amplitude and reflection, a vertical stretch, and the period is the parent’s period times \displaystyle \frac{1}{b}: the reciprocal again, in amplitude, period and phase shift. A dilation about the origin is a vertical and a horizontal stretch by the same factor at once.
Exercises
Vertical stretches and compressions
Describe each graph as a move of its parent, and give the image of each listed parent point.
- y = 4x^3; the points (1, 1) and (-2, -8)
- \displaystyle y = \frac{1}{3}\sqrt{x}; the points (9, 3) and (4, 2)
- \displaystyle y = \frac{5}{x}; the points (1, 1) and \displaystyle \left(-2, -\frac{1}{2}\right)
- \displaystyle y = \frac{1}{4}x^2; the points (2, 4) and (-6, 36)
Horizontal stretches and compressions
Describe each graph as a move of its parent, and give the image of each listed parent point.
- y = (3x)^3; the points (3, 27) and (-1, -1)
- \displaystyle y = \sqrt{x/3}; the points (4, 2) and (1, 1)
- \displaystyle y = \frac{1}{5x}; the points (1, 1) and \displaystyle \left(-2, -\frac{1}{2}\right)
- \displaystyle y = \left(\frac{x}{2}\right)^2; the points (3, 9) and (-1, 1)
Write the rule
- y = x^3 stretched vertically by a factor of 5.
- \displaystyle y = \sqrt{x} compressed horizontally by a factor of \displaystyle \frac{1}{9}.
- \displaystyle y = \frac{1}{x} stretched horizontally by a factor of 2.
- y = x^2 compressed vertically by a factor of \displaystyle \frac{1}{3} and reflected across the x-axis.
Naming from a graph or a table
- A graph with the shape of \displaystyle y = \sqrt{x} starts at (0, 0) and passes through (4, 6) and (9, 9). Name it as a vertical move and write its rule.
- A parabola with its vertex at the origin, a vertical move of y = x^2, passes through (4, 2) and \displaystyle \left(-2, \frac{1}{2}\right). Name the move and write the rule.
- f(-2) = 5, f(-1) = 2, f(0) = -1, f(1) = 4, f(2) = 7, and g(-6) = 5, g(-3) = 2, g(0) = -1, g(3) = 4, g(6) = 7. Write g in terms of f and name the move.
- f(-1) = 2, f(0) = -4, f(1) = 6, f(2) = 0, and g(-1) = 5, g(0) = -10, g(1) = 15, g(2) = 0. Write g in terms of f and name the move.
- A graph with the shape of \displaystyle y = \frac{1}{x} passes through (3, 1) and (-3, -1). Write its rule as a horizontal move and as a vertical move, and show the two rules are equal.
Tables and points
- f(0) = 2, f(3) = 5, f(6) = -1, f(9) = 4, f(12) = 8. Make tables for g(x) = 4f(x) and for h(x) = f(3x).
- Tomasina’s speaker cone moves d = f(t) millimeters at t milliseconds, and first reaches its largest outward displacement, 0.6 mm, at t = 1.5. She plays the track at half speed, so the cone now moves \displaystyle d = f\!\left(\frac{t}{2}\right). When does the slowed cone first reach its largest displacement, and how large is it? Name the move.
- The point (6, -2) is on the graph of y = f(x). Give a point on each graph: (a) y = 4f(x), (b) y = f(4x), (c) \displaystyle y = f\!\left(\frac{x}{2}\right), (d) \displaystyle y = -\frac{1}{4}f(x).
Reasoning
- Mercedes says y = f(3x) must stretch the graph, because 3 is bigger than 1. Use one point of y = x^2 to show what happens instead, and explain why.
- Explain why a vertical stretch never moves an x-intercept, and why a horizontal stretch never moves a y-intercept.
- Show that (bx)^2 = b^2x^2, so every horizontal move of y = x^2 is also a vertical one. Then show that for f(x) = x + 1, the rule f(2x) is not a\,f(x) for any number a.
- Why does the lesson require a \ne 0 in a\,f(x)? Describe the graph of y = 0 \cdot x^3 and say why no move can bring y = x^3 back from it.
Answers
- Vertical stretch by a factor of 4; (1, 4) and (-2, -32). Each height is multiplied by 4.
- Vertical compression by a factor of \displaystyle \frac{1}{3}; (9, 1) and \displaystyle \left(4, \frac{2}{3}\right).
- Vertical stretch of \displaystyle y = \frac{1}{x} by a factor of 5, since \displaystyle \frac{5}{x} = 5 \cdot \frac{1}{x}; (1, 5) and \displaystyle \left(-2, -\frac{5}{2}\right).
- Vertical compression by a factor of \displaystyle \frac{1}{4}; (2, 1) and (-6, 9).
- Horizontal compression of y = x^3 by a factor of \displaystyle \frac{1}{3}; (1, 27) and \displaystyle \left(-\frac{1}{3}, -1\right). Each x is divided by 3: (3 \cdot 1)^3 = 27.
- Horizontal stretch of \displaystyle y = \sqrt{x} by a factor of 3; (12, 2) and (3, 1). Here \displaystyle b = \frac{1}{3}, so each x is multiplied by 3: \displaystyle \sqrt{12/3} = 2.
- Horizontal compression of \displaystyle y = \frac{1}{x} by a factor of \displaystyle \frac{1}{5}; \displaystyle \left(\frac{1}{5}, 1\right) and \displaystyle \left(-\frac{2}{5}, -\frac{1}{2}\right).
- Horizontal stretch of y = x^2 by a factor of 2; (6, 9) and (-2, 1).
- y = 5x^3. Every output of x^3 is multiplied by 5; (2, 8) goes to (2, 40).
- \displaystyle y = \sqrt{9x}, which equals \displaystyle 3\sqrt{x}. A horizontal factor of \displaystyle \frac{1}{9} means b = 9; (9, 3) goes to (1, 3).
- \displaystyle y = \frac{1}{x/2}, which equals \displaystyle \frac{2}{x}. A horizontal factor of 2 means \displaystyle b = \frac{1}{2}; (1, 1) goes to (2, 1).
- \displaystyle y = -\frac{1}{3}x^2. Compress by \displaystyle \frac{1}{3}, then the minus sign reflects; (3, 9) goes to (3, -3).
- Vertical stretch by a factor of 3; \displaystyle y = 3\sqrt{x}. At x = 4 the parent gives 2 and the graph 6; at x = 9, 3 \cdot 3 = 9 confirms.
- Vertical compression by a factor of \displaystyle \frac{1}{8}; \displaystyle y = \frac{1}{8}x^2. At x = 4, a \cdot 16 = 2 gives \displaystyle a = \frac{1}{8}; at x = -2, \displaystyle \frac{1}{8} \cdot 4 = \frac{1}{2} confirms.
- \displaystyle g(x) = f\!\left(\frac{x}{3}\right), a horizontal stretch by a factor of 3. Each output of f appears in g at three times the input, for instance g(3) = f(1) = 4.
- \displaystyle g(x) = \frac{5}{2}f(x), a vertical stretch by a factor of \displaystyle \frac{5}{2}. At each input g is \displaystyle \frac{5}{2} times f: \displaystyle \frac{5}{2} \cdot 2 = 5, \displaystyle \frac{5}{2} \cdot (-4) = -10.
- \displaystyle y = \frac{1}{x/3}, a horizontal stretch by 3, since the parent’s (1, 1) moved to (3, 1); and \displaystyle y = \frac{3}{x}, a vertical stretch by 3, since the parent’s \displaystyle \left(3, \frac{1}{3}\right) moved up to (3, 1). They are equal: dividing by \displaystyle \frac{x}{3} is multiplying by \displaystyle \frac{3}{x}.
- g: g(0) = 8, g(3) = 20, g(6) = -4, g(9) = 16, g(12) = 32. h: h(0) = 2, h(1) = 5, h(2) = -1, h(3) = 4, h(4) = 8, since h(x) = f(3x) means h(2) = f(6).
- At t = 3 ms, still 0.6 mm. The slowed cone does at time t what the original did at \displaystyle \frac{t}{2}, and \displaystyle \frac{t}{2} = 1.5 gives t = 3. A horizontal stretch by a factor of 2.
- (a) (6, -8), (b) \displaystyle \left(\frac{3}{2}, -2\right), (c) (12, -2), (d) \displaystyle \left(6, \frac{1}{2}\right). Vertical moves change only the -2; horizontal moves change only the 6.
- It compresses. y = x^2 reaches height 9 at x = 3, while y = (3x)^2 reaches it at x = 1. The input is tripled before squaring, so each height comes at a third of the input: a horizontal compression by a factor of \displaystyle \frac{1}{3}.
- An x-intercept has height 0, and a \cdot 0 = 0, so a vertical move leaves it in place. A y-intercept has x = 0, and a horizontal move sends (0, q) to \displaystyle \left(\frac{0}{b}, q\right) = (0, q).
- (bx)^2 = b^2x^2 by the power of a product, so f(bx) = b^2 f(x) for f(x) = x^2. For f(x) = x + 1, f(2x) = 2x + 1. If 2x + 1 = a(x + 1) for every x, then x = 0 gives a = 1 and x = 1 gives 3 = 2a, so \displaystyle a = \frac{3}{2}: no single a works.
- y = 0 \cdot x^3 is the line y = 0. Every graph flattens to that same line, so it records nothing about y = x^3 and no move brings it back. A stretch by a \ne 0 is undone by one by \displaystyle \frac{1}{a}.