Unit 3, lesson 31

Stretching and Compressing Graphs

How multiplying a function's output differs from multiplying its input, how each one moves the points of a graph, and how to read the scale factor in each direction.

  • Theory part 61
  • Practice part 62
  • Moving and Scaling Graphs

A photo can be stretched tall or squeezed narrow, and the two edits are clearly different. Graphs work the same way. Multiplying the output of a function pulls the graph up and down, multiplying the input squeezes it toward or away from the yy-axis, and the only reliable way to tell which is which is to watch where specific points go.

Key terms

Point mapping

Definition A point mapping for a new function gg built from ff is a rule that sends each point (u,f(u))(u, f(u)) of the graph of ff to a point of the graph of gg, and that reaches every point of the graph of gg this way. To find it, solve for the input of gg whose inside equals uu and then compute the output.

In plain words Pick a point you know on the old graph and work out exactly where it lands on the new one. A handful of such points draws the new graph for you.

Example For f(x)=x2f(x) = x^2 and g(x)=3x2g(x) = 3x^2 the input stays the same and the output triples, so (u,u2)(u, u^2) maps to (u,3u2)(u, 3u^2). The point (2,4)(2, 4) goes to (2,12)(2, 12).

Output scaling

Definition For a real number A≠0A \ne 0, the function g(x)=Af(x)g(x) = A f(x) is an output scaling of ff. It has the same domain as ff, and each point (u,f(u))(u, f(u)) maps to

(u,Af(u)).(u, A f(u)).

When A>0A > 0 this is a vertical scaling of the graph, which multiplies every point’s distance from the xx-axis by AA. When A<0A < 0 it is a vertical scaling by ∣A∣\lvert A \rvert followed by a reflection in the xx-axis.

In plain words The function does its usual work and then you multiply the answer. Only heights change. Points on the xx-axis stay put.

Example Compare f(x)=x2f(x) = x^2 with g(x)=2x2g(x) = 2x^2.

xx−2-2−1-1001122
x2x^24411001144
2x22x^28822002288

Each input keeps its place and each height doubles.

Input scaling

Definition For a real number B≠0B \ne 0, the function g(x)=f(Bx)g(x) = f(Bx) is an input scaling of ff. Its domain is the set of xx with BxBx in the domain of ff. The inside equals uu when x=u/Bx = u/B, so each point (u,f(u))(u, f(u)) maps to

(uB,f(u)).\left(\frac{u}{B}, f(u)\right).

When B>0B > 0 this is a horizontal scaling of the graph, which multiplies every point’s distance from the yy-axis by 1B\frac{1}{B}. In particular, when B>1B > 1 horizontal distances from the yy-axis shrink.

In plain words Multiplying the input by BB means the old output now appears at the input u/Bu/B instead of uu, which for B>1B > 1 is closer to the yy-axis. That is why multiplying by 22 squeezes the graph rather than widening it. There is no mysterious opposite rule, just the question of which input gives the old output.

Example Let h(x)=4xh(x) = \sqrt{4x}, with domain [0,∞)[0, \infty). The inside 4x4x equals uu when x=u4x = \frac{u}{4}.

Point on y=xy = \sqrt{x}Image on y=4xy = \sqrt{4x}
(0,0)(0, 0)(0,0)(0, 0)
(4,2)(4, 2)(1,2)(1, 2)
(16,4)(16, 4)(4,4)(4, 4)

Check one of them. The value h(1)=4=2h(1) = \sqrt{4} = 2 matches the image (1,2)(1, 2).

Scale factor

Definition The scale factor of a scaling is the number that every distance in the scaled direction is multiplied by. For y=Af(x)y = A f(x) the vertical scale factor is ∣A∣\lvert A \rvert, measured from the xx-axis. For y=f(Bx)y = f(Bx) the horizontal scale factor is 1∣B∣\frac{1}{\lvert B \rvert}, measured from the yy-axis.

In plain words The vertical factor is the number in front. The horizontal factor is one over the number multiplying xx inside.

Example Suppose (6,9)(6, 9) is on the graph of ff, and let g(x)=12f(3x)g(x) = \frac{1}{2} f(3x). The vertical factor is 12\frac{1}{2} and the horizontal factor is 13\frac{1}{3}. Solving 3x=63x = 6 gives x=2x = 2, and the output is 12⋅9\frac{1}{2} \cdot 9, so the image is (2,92)\left(2, \frac{9}{2}\right).

Stretch

Definition A stretch is a scaling whose scale factor is greater than 11. The graph of y=Af(x)y = A f(x) is a vertical stretch when ∣A∣>1\lvert A \rvert > 1, and the graph of y=f(Bx)y = f(Bx) is a horizontal stretch when 0<∣B∣<10 < \lvert B \rvert < 1. A negative AA or BB adds a reflection, described below.

In plain words A stretch pulls points farther from the axis they are measured from, taller for a vertical stretch and wider for a horizontal one.

Example For y=3xy = 3\sqrt{x} the point (4,2)(4, 2) goes to (4,6)(4, 6), a vertical stretch by 33. For y=x/2y = \sqrt{x/2}, where B=12B = \frac{1}{2}, the inside equals 44 when x=8x = 8, so (4,2)(4, 2) goes to (8,2)(8, 2), a horizontal stretch by 22.

Compression

Definition A compression is a scaling whose scale factor lies strictly between 00 and 11. The graph of y=Af(x)y = A f(x) is a vertical compression when 0<∣A∣<10 < \lvert A \rvert < 1, and the graph of y=f(Bx)y = f(Bx) is a horizontal compression when ∣B∣>1\lvert B \rvert > 1, again with a reflection added when AA or BB is negative.

In plain words A compression pulls points closer to the axis they are measured from, flatter for a vertical compression and narrower for a horizontal one.

Example For y=12x2y = \frac{1}{2}x^2 the point (2,4)(2, 4) goes to (2,2)(2, 2), a vertical compression by 12\frac{1}{2}. The graph of y=4xy = \sqrt{4x} from above is a horizontal compression by 14\frac{1}{4}.

Negative factors

Definition For B>0B > 0 the graph of y=f(−Bx)y = f(-Bx) is the horizontal scaling by 1B\frac{1}{B} of the graph of ff followed by a reflection in the yy-axis, and each point (u,f(u))(u, f(u)) maps to (−uB,f(u))\left(-\frac{u}{B}, f(u)\right). For A>0A > 0 the graph of y=−Af(x)y = -A f(x) is the vertical scaling by AA followed by a reflection in the xx-axis.

In plain words Handle the size first with a positive factor, then let the minus sign flip the graph.

Example Take g(x)=−2xg(x) = \sqrt{-2x}, defined for x≤0x \le 0. The inside −2x-2x equals 44 when x=−2x = -2, so (4,2)(4, 2) goes to (−2,2)(-2, 2), and indeed g(−2)=4=2g(-2) = \sqrt{4} = 2. The graph of x\sqrt{x} has been squeezed by 12\frac{1}{2} and flipped to the left side.

When two scalings coincide

Definition For some special parent functions, an input scaling and an output scaling produce the same graph. Two examples are

4x=2x for x≥0,(2x)2=4x2 for every real x.\begin{gathered} \sqrt{4x} = 2\sqrt{x} \text{ for } x \ge 0, \\[0.4em] (2x)^2 = 4x^2 \text{ for every real } x. \end{gathered}

These identities come from properties of roots and powers. They do not hold for functions in general, so f(Bx)f(Bx) and Af(x)A f(x) must be treated as different operations unless you have checked the equality for the specific ff.

In plain words Sometimes squeezing sideways happens to look exactly like stretching upward. That is a feature of the particular function, not a rule.

Example For f(x)=x+1f(x) = x + 1 the input scaling gives f(2x)=2x+1f(2x) = 2x + 1, while the output scaling gives 2f(x)=2x+22f(x) = 2x + 2. At x=0x = 0 they give 11 and 22, so the two graphs differ.

Check yourself

  1. The point (3,5)(3, 5) lies on the graph of ff. Find the corresponding point on the graphs of y=4f(x)y = 4f(x), y=f(3x)y = f(3x) and y=f(x2)y = f\left(\frac{x}{2}\right).
Show the answer

For y=4f(x)y = 4f(x) the input stays and the output becomes 2020, giving (3,20)(3, 20). For y=f(3x)y = f(3x) solve 3x=33x = 3 to get (1,5)(1, 5). For y=f(x2)y = f\left(\frac{x}{2}\right) solve x2=3\frac{x}{2} = 3 to get (6,5)(6, 5).

  1. Find the images of (−2,4)(-2, 4), (0,0)(0, 0) and (2,4)(2, 4) on the graph of y=12x2y = \frac{1}{2}x^2, and say whether it is a stretch or a compression.
Show the answer

The inputs stay and the outputs halve, so the images are (−2,2)(-2, 2), (0,0)(0, 0) and (2,2)(2, 2). This is a vertical compression with scale factor 12\frac{1}{2}.

  1. Find the domain of g(x)=9xg(x) = \sqrt{9x} and the images of (0,0)(0, 0), (1,1)(1, 1) and (9,3)(9, 3) on y=xy = \sqrt{x}.
Show the answer

The condition 9x≥09x \ge 0 gives the domain [0,∞)[0, \infty). Solving 9x=u9x = u gives x=u9x = \frac{u}{9}, so the images are (0,0)(0, 0), (19,1)\left(\frac{1}{9}, 1\right) and (1,3)(1, 3). This is a horizontal compression by 19\frac{1}{9}, and it happens to equal the vertical stretch 3x3\sqrt{x}.

How this lesson connects

Resources for this lesson