We can also stretch and shrink the graph of a function. To stretch or
shrink the graph in the
*y*
direction, multiply or divide the output by a
constant.
2*f* (*x*)
is stretched in the
*y*
direction by a factor of 2, and
*f* (*x*)
is shrunk in the
*y*
direction by a factor of 2 (or stretched
by a factor of
). Here are the graphs of
*y* = *f* (*x*)
,
*y* = 2*f* (*x*)
,
and
*y* =
*x*
. Note that if
(*x*, *y*
_{1})
is a point on the graph of
*f* (*x*)
,
(*x*, *y*
_{2})
is a point on the graph of
2*f* (*x*)
, and
(*x*, *y*
_{3})
is a point
on the graph of
*f* (*x*)
, then
*y*
_{2} = 2*y*
_{1}
and
*y*
_{3} =
*y*
_{1}
.
For example,
(3, 2)
is on the graph of
*f* (*x*)
,
(3, 4)
is on the graph of
2*f* (*x*)
, and
(3, 1)
is on the graph of
*f* (*x*)
.

Graphs of
*f* (*x*)
,
2*f* (*x*)
, and
*f* (*x*)

To stretch or shrink the graph in the
*x*
direction, divide or multiply the
*input* by a constant. As in translating, when we change the input, the function changes
to compensate. Thus, dividing the input by a constant stretches the function in
the
*x*
direction, and multiplying the input by a constant shrinks the function
in the
*x*
direction.
*f* (
*x*)
is stretched in the
*x*
direction by a
factor of 2, and
*f* (2*x*)
is shrunk in the
*x*
direction by a factor of 2 (or
stretched by a factor of
*frac*12
). Here is a graph of
*y* = *f* (*x*)
,
*y* = *f* (
*x*)
, and
*y* = *f* (2*x*)
. Note that if
(*x*
_{1}, *y*)
is a point on the
graph of
*f* (*x*)
,
(*x*
_{2}, *y*)
is a point on the graph of
*f* (
*x*)
, and
(*x*
_{3}, *y*)
is a point on the graph of
*f* (2*x*)
, then
*x*
_{2} = 2*x*
_{1}
and
*x*
_{3} =
*x*
_{1}
. For example,
(- 2, 5)
is on the graph of
*f* (*x*)
,
(- 4, 5)
is
on the graph of
*f* (
*x*)
, and
(- 1, 5)
is on the graph of
*f* (2*x*)
.

Graphs of
*f* (*x*)
,
*f* (
*x*)
, and
*f* (2*x*)

We can understand the difference between altering inputs and altering outputs by
observing the following:

If
*g*(*x*) = 3*f* (*x*)
: For any given input, the output iof
*g*
is three times the
output of
*f*
, so the graph is stretched vertically by a factor of 3.

If
*g*(*x*) = *f* (3*x*)
: For any given output, the input of
*g*
is one-third the input
of
*f*
, so the graph is shrunk horizontally by a factor of 3.