# Stretching and Flipping Functions

In the last lesson, you learned how the graphs of \$y=f(x)+k\$ and \$y=f(x-h)\$ compare to the graph of \$y=f(x)\$. We’ll now look at the graphs of \$y=af(x)\$ and \$\$y=f(x/d)\$\$, to see how they compare to the graph of \$y=f(x)\$.

## The graph of \$y=af(x)\$

The table to the right shows the values of \$f(x)\$ for a certain function \$f\$ and a few values of \$x\$.

What are the values of \$3f(x)\$ at these values of \$x\$? Your answers will be plotted on the grid to the left.

\$x\$ \$f(x)\$ \$3f(x)\$
 Are the blue points closer to the \$x\$-axis than the red points, or farther from the \$x\$-axis?

Click to see the graphs of \$y_1=f(x)\$ and \$y_2=3f(x)\$.

 Do the graphs of \$y_1=f(x)\$ and \$y_2=3f(x)\$ cross the \$x\$-axis at the same place, or at different places?
 Do the graphs of \$y_1=f(x)\$ and \$y_2=3f(x)\$ cross the \$y\$-axis at the same place, or at different places?
 At an \$x\$-value where the graphs are not crossing the \$x\$-axis, is the graph of \$y_2=3f(x)\$ closer to the \$x\$-axis or farther from the \$x\$-axis than the graph of \$y_1=f(x)\$?

Now the equation \$y=af(x)\$ is graphed on the grid to the left, with a slider for \$a\$.

 Notice where the green curve crosses the \$x\$-axis. As you slide the slider, do these \$x\$-intercepts change or stay the same?
 Notice where the green curve crosses the \$y\$-axis. As you slide the slider, do these \$y\$-intercepts change or stay the same?
 As \$a\$ increases, does the green curve get closer to the \$x\$-axis, or farther from the \$x\$-axis?

In general:

If \$a\$ is positive, the graph of \$y=af(x)\$ has the same \$x\$-intercepts as the graph of \$y_1=f(x)\$ (it crosses the \$x\$-axis at the same places). At any other point, it is stretched \$a\$ times as far from the \$x\$-axis as the graph of \$y_1=f(x)\$.

Note that if \$a<1\$ (say, if \$\$a=1/2\$\$), the graph of \$y=af(x)\$ is compressed closer to the \$x\$-axis than the graph of \$y_1=f(x)\$. In this situation, we’ll still say that the graph is “stretched \$a\$ times as far from the \$x\$-axis as the graph of \$y_1=f(x)\$.”

Look at the table to the right. What are the values of \$-f(x)\$ at these values of \$x\$? Your answers will be plotted on the grid to the left.
\$x\$ \$f(x)\$ \$-f(x)\$
 At each \$x\$-value, is the blue point on the same side of the \$x\$-axis as the red point, or on the opposite side?
 Are the blue points farther from the \$x\$-axis than the red points, closer to the \$x\$-axis, or the same distance from the \$x\$-axis?

Click to see the graphs of \$y_1=f(x)\$ and \$y_2=-f(x)\$.

 Notice that the graph of \$y_2=-f(x)\$ is a reflection of the graph of \$y_1=f(x)\$. What line is it being reflected across? The -axis

Now the equation \$y=af(x)\$ is again graphed on the grid to the left, with a slider for \$a\$. This time, \$a\$ is allowed to be zero or negative.

 Set \$a\$ to \$0\$. What is a simpler way of writing the equation \$y=0f(x)\$?
 Set \$a\$ to 2, and then watch what happens as you slide it to \$-2\$. As you slide through \$a=0\$, at each value of \$x\$, does the graph of \$y=af(x)\$ stay on the same side of the \$x\$-axis or does it cross to the opposite side of the \$x\$-axis?

You can think of multiplying \$f(x)\$ by a negative number \$a\$ as happening in two steps. First, multiply by the positive number \$|a|\$, which stretches the graph vertically. Then, multiply by \$-1\$, which flips the graph across the \$x\$-axis. This means:

If \$a\$ is negative, the graph of \$y=af(x)\$ has the same \$x\$-intercepts as the graph of \$y_1=f(x)\$ (it crosses the \$x\$-axis at the same places). At any other point, it is flipped across the \$x\$-axis and stretched \$|a|\$ times as far from the \$x\$-axis as the graph of \$y_1=f(x)\$.

## The graph of \$\$y=f(x/d)\$\$

The left-hand table below shows you the values of \$g(x)\$ for a certain function \$\cl"red"g\$, at a few values of \$x\$. We can find the value of \$\$g(x/2)\$\$ when \$x=-4\$ by first noticing that \$\${-4}/2=-2\$\$, and then using the left-hand table to find that \$g(-2)=-3\$. So, when \$x=-4\$, \$\$g(x/2)=-3\$\$.

Using the left-hand table in this way, what is the value of \$\$g(x/2)\$\$ at each value of \$x\$ in the right-hand table below?

\$x\$ \$g(x)\$
\$x\$ \$\$x/2\$\$ \$\$g(x/2)\$\$
 Look at where the blue points given by \$\$g(x/2)\$\$ appear on the grid to the left, compared to the red points given by \$g(x)\$. Except for the points on the \$y\$-axis, is each blue point closer to the \$y\$-axis than the red point with the same \$y\$-coordinate, or farther from the \$y\$-axis?

Click to see the graphs of \$y_1=g(x)\$ and \$\$y_2=g(x/2)\$\$.

 Do the graphs of \$y_1=g(x)\$ and \$\$y_2=g(x/2)\$\$ cross the \$x\$-axis at the same place, or at different places?
 Do the graphs of \$y_1=g(x)\$ and \$\$y_2=g(x/2)\$\$ cross the \$y\$-axis at the same place, or at different places?
 When it is not crossing the \$y\$-axis, is the graph of \$\$y_2=g(x/2)\$\$ closer to the \$y\$-axis or farther from the \$y\$-axis than the graph of \$y_1=g(x)\$?

Now the equation \$\$y=g(x/d)\$\$ is graphed on the grid to the left, with a slider for \$d\$.

 Notice where the green curve crosses the \$x\$-axis. As you slide the slider, do these \$x\$-intercepts change or stay the same?
 Notice where the green curve crosses the \$y\$-axis. As you slide the slider, do these \$y\$-intercepts change or stay the same?
 As \$d\$ increases, does the green curve get closer to the \$y\$-axis, or farther from the \$y\$-axis?

In general:

If \$d\$ is positive, the graph of \$\$y=f(x/d)\$\$ is stretched \$d\$ times as far from the \$y\$-axis as the graph of \$y_1=f(x)\$. The two graphs have the same \$y\$-intercepts (they meet the \$y\$-axis at the same places).

As before, if \$d<1\$, we still say that the graph of \$\$y=f(x/d)\$\$ is “stretched \$d\$ times as far from the \$y\$-axis” as the graph of \$y_1=f(x)\$, even though that means it is actually closer to the \$y\$-axis.

What about when \$d\$ is negative? We’ll start by looking at what happens when \$d=-1\$. In this case, we’re looking at the behavior of \$\$g(x/{-1})\$\$, which can be more simply written as \$g(-x)\$.

The left-hand table below again shows you the values of \$g(x)\$, at a few values of \$x\$. Using this table as in scale-by-2-qn, what is the value of \$g(-x)\$ at each value of \$x\$ in the right-hand table below?

\$x\$ \$g(x)\$
\$x\$ \$-x\$ \$g(-x)\$

Click to see the graphs of \$y_1=g(x)\$ and \$y_2=g(-x)\$.

 Notice that the graph of \$y_2=g(-x)\$ is a reflection of the graph of \$y_1=g(x)\$. What line is it being reflected across? The -axis

Now the functions \$y_1=g(x)\$ and \$\$y=g(x/d)\$\$ are both graphed, with a slider for \$d\$. Notice that \$d\$ is always negative.

 As \$d\$ increases (gets closer to 0), does the graph of \$\$y=g(x/d)\$\$ get closer to the \$y\$-axis or farther from the \$y\$-axis at each \$y\$-coordinate?
 At each \$y\$-coordinate where it is not crossing the \$y\$-axis, is the graph of \$\$y=g(x/d)\$\$ on the same side of the \$y\$-axis as the graph of \$y_1=g(x)\$, or the opposite side?

As in the previous section, you can think of the operation of dividing \$x\$ by the negative number \$d\$ as taking place in two steps. First you divide by the positive number \$|d|\$ (which stretches the graph horizontally). Then you multiply by \$-1\$ (which flips the graph across the \$y\$-axis). So:

If \$d\$ is negative, the graph of \$\$y=f(x / d)\$\$ is stretched \$|d|\$ times as far from the \$y\$-axis as the graph of \$y_1=f(x)\$, and flipped across the \$y\$-axis. The two graphs have the same \$y\$-intercepts (they meet the \$y\$-axis at the same places).

## Simplifying equations for stretched graphs

Now, we’ll look at the function \$h(x)=x^2-2\$. The graph of \$y_1=h(x)\$ is shown on the grid to the left, along with the graph of \$y=ah(x)\$, with a slider for \$a\$. As we saw in the first section above, a graph that is like the graph of \$y_1=h(x)\$, but stretched 3 times as far vertically, would have the equation \$y=3h(x)\$, or \$y=3(x^2-2)=3x^2-6\$.

 What would the equation be for a graph that was like the graph of \$y_1=h(x)\$, but stretched 2 times as far vertically? Write that quadratic equation in standard form \$y=ax^2+c\$ (or \$y=ax^2-c\$) for some numbers \$a\$ and \$c\$, like we just did for \$y=3x^2-6\$. (Remember to write \$x^2\$ as “x^2”.)
 What would the equation be for a graph that was like the graph of \$y_1=h(x)\$, but stretched \$-3\$ times as far vertically? Write that quadratic equation in standard form.
 What would the equation be (in standard form) for a graph that was like the graph of \$y_1=h(x)\$, but stretched \$\$3/2\$\$ times as far vertically?

Click to see the graph of \$y_1=h(x)\$ along with the graph of \$\$y=h(x/d)\$\$, with a slider for \$d\$. As we saw above in the second section of this lesson, a graph that is like the graph of \$y_1=h(x)\$, but stretched 2 times as far horizontally, would have the equation \$\$y=h(x/2)\$\$, or:

\$\$\cl"tight"{\table y, =, (x/2)^2, -, 2; , =, (1/2 x)^2, -, 2; , =, (1/2)^2 x^2, -, 2; , =, 1/4 x^2, -, 2 }\$\$

What would the equation be for a graph that was like the graph of \$y_1=h(x)\$, but stretched 3 times as far horizontally?

## Even and odd functions

We saw above that the graph of \$y=f(-x)\$ can always be obtained by flipping the graph of \$y=f(x)\$ across the \$y\$-axis. Now, let’s see what happens if \$f\$ is a function whose graph doesn’t change when you flip it across the \$y\$-axis: that is, it has the \$y\$-axis as an axis of symmetry. In that case, \$y=f(x)\$ and \$y=f(-x)\$ have the same graph, so \$f(x)=f(-x)\$ for any \$x\$.

The function \$f(x)=x^2\$ is graphed on the grid to the left. Notice that the \$y\$-axis is an axis of symmetry of this graph. For each \$x\$ in the table below, compute \$f(x)\$ and \$f(-x)\$, and say whether they are equal.

\$x\$\$f(x)\$\$f(-x)\$Are they
equal?

In fact,

\$\$ \cl"tight"{\table f(-x), =, (-x)^2; , =, (-1)^2x^2; , =, x^2; , =, f(x)} \$\$

no matter what \$x\$ is, as we expected from looking at the graph of \$\cl"red"f\$. The same sort of calculation shows that \$x^n=(-x)^n\$ whenever \$n\$ is an even number. As a result, we call any function \$f\$ with \$f(x)=f(-x)\$ for all \$x\$ an even function.

Click to see a graph of \$g(x)={|x|}-1\$. This function is also even, because

\$\$ \cl"tight"{\table g(-x), =, {|-x|}-1; , =, {|x|}-1; , =, g(x)} \$\$

no matter what \$x\$ is.

 Does this graph have an axis of symmetry?
 What is its axis of symmetry? The -axis

In fact:

A function \$f\$ will be even precisely when the graph of \$f(x)\$ has the \$y\$-axis as an axis of symmetry.

Remember that flipping the graph of \$y=f(x)\$ across the \$x\$-axis changes it into the graph of \$y=-f(x)\$, while flipping it across the \$y\$-axis changes it into the graph of \$y=f(-x)\$. Let’s see what happens when flipping a graph across the \$x\$-axis has the same effect as flipping it across the \$y\$-axis. That is, what if \$f\$ is a function where the graphs of \$y=-f(x)\$ and \$y=f(-x)\$ are the same? In that case, \$-f(x)=f(-x)\$ for any \$x\$, so \$f(x)\$ and \$f(-x)\$ are always opposites.

The function \$f(x)=2x\$ is graphed on the grid to the left, along with a flipped version in blue. Notice that you could flip the red graph across either the \$x\$-axis or the \$y\$-axis to get the blue graph.

For each \$x\$ in the table below, compute \$f(x)\$ and \$f(-x)\$, and say whether they are opposites.

\$x\$\$f(x)\$\$f(-x)\$ Are they
opposites?

In fact:

\$\$ \cl"tight"{\table f(-x), =, 2(-x); , =, -2x; , =, - f(x)} \$\$

no matter what \$x\$ is, as we expected from looking at the graphs.

Click to see a graph of \$g(x)=x^3\$, along with its flipped version in blue. This function also satisfies \$-g(x)=g(-x)\$, because

\$\$ \cl"tight"{\table g(-x), =, (-x)^3; , =, (-1)^3x^3; , =, -x^3; , =, -g(x)} \$\$

no matter what \$x\$ is. The same sort of calculation shows that \$-x^n=(-x)^n\$ whenever \$n\$ is an odd number. As a result, we call any function \$f\$ with \$-f(x)=f(-x)\$ for all \$x\$ an odd function.

 The blue graph is the graph of \$y=g(-x)\$: that is, the graph of \$g(x)\$ flipped across the \$y\$-axis. Would you also get the blue graph if you flipped the graph of \$f(x)\$ across the \$x\$-axis?

In the last question, we saw that a function is odd if flipping it across either the \$x\$-axis or the \$y\$-axis has the same effect. There’s also another way to see whether a graph is the graph of an odd function, which is usually easier to see if the flipped version of the graph isn’t also shown.

Rotating by 180° around a point means rotating halfway (that is, turning upside-down) while holding that point fixed. For example, the blue graph on the left is the result of rotating the red graph by 180° around the point \$(0,0)\$.

 Click to see a graph of the function \$g(x)=x^3\$ from the previous question. If you rotate this graph by 180° around the point \$(0,0)\$, do you get back the same graph?

If you can rotate a graph by 180° around some point and get back the same graph, we say that point is a point of symmetry of the function.

 Click to see a graph of the function \$f(x)=2x\$ from the previous question. Does this graph have \$(0,0)\$ as a point of symmetry?

In fact:

A function \$f\$ will be odd precisely when the graph of \$f(x)\$ has \$(0,0)\$ as a point of symmetry.

Some functions are neither even nor odd. For example, the function \$f(x)=x^2+x\$ is neither even nor odd. You can see this by looking at the graph of \$f(x)\$: the \$y\$-axis is not an axis of symmetry, and the origin is not a point of symmetry.

For each function in the table below, determine whether it is even, odd, or neither by using its graph.

FormulaIs it even, odd,
or neither?

You can also determine that a function is neither even nor odd by using its formula to find a number \$x\$ where \$f(x)\$ and \$f(-x)\$ are neither equal nor opposite. For example, to see that the function \$f(x)=x^2+x\$ is neither even nor odd, notice that \$f(2)=2^2+2=4+2=6\$, and \$f(-2)=(-2)^2-2=4-2=2\$. So \$f(2)\$ and \$f(-2)\$ are neither equal nor opposite, which means that \$f\$ is neither even nor odd.

Each function in the table below is neither even nor odd. Demonstrate this by giving some value of \$x\$ for which \$f(x)\$ and \$f(-x)\$ are neither equal nor opposite. Use scratch paper.

Formula\$x\$\$f(x)\$\$f(-x)\$