# Transforming Graphs of Functions

**Graph transformation** is the process by which an existing graph, or graphed equation, is modified to produce a variation of the proceeding graph. It's a common type of problem in algebra, specifically the modification of algebraic equations.

Sometimes graphs are translated, or moved about the $xy$-plane; sometimes they are stretched, rotated, inverted, or a combination of these transformations. Many problems take the form of "shift the function $f(x)$ by $c$ units in some direction," or "stretch the function $f(x)$ by $c$ units," or "rotate the function $f(x)$ by $x$ units about the $x$-, $y$-, or $z$-axis." In each case, the transformation affects the underlying function in particular ways that can be understood and calculated.

#### Contents

## Translating Graphs

**Vertical Translation**

To move a graph up vertically by 1 unit, we adjust the $y$ value. Every point of the form $(x,y)$ in function $f$ now moves to the point $(x, y + 1)$ in function $f^*$.

How does this point relate under the original function? We want $f^* (x) = y + 1 = f(x) + 1$. Hence, we have $f^* (x) = f(x) + 1$. The graph of $f(x) + 1$ is the graph of $f(x)$ shifted up by $1$ unit.

Thus, to move a function up or down, we add to the outside of the function. $f(x) + d$ is the graph of $f(x)$ shifted up by $d$ units.

$$

**Horizontal Translation**

To move a graph right horizontally by 1 unit, we adjust the $x$ value. Every point of the form $(x,y)$ in function $f$ now moves to the point $(x+1, y )$ in function $f^*$.

How does this point relate under the original function? We want $f^* (x+1) = y = f (x)$. Hence, we have $f^* (x) = f(x-1)$. The graph of $f(x-1)$ is the graph of $f(x)$ shifted right by $1$ unit.

Thus, to move a function right or left, we subtract to the inside of the function. $f(x-b)$ is the graph of $f(x)$ shifted right by $b$ units.

## How is the graph of $y = f(x) - 3$ related to the graph of $y = f(x)$?

We recognize this as a graph of $y = f(x) +d$ with $d= -3$.

The graph of $y = f(x) - 3$ is the graph of $y = f(x)$ moved down by 3 units. $_\square$

## How is the graph of $y = f(x-2)$ related to the graph of $y = f(x)$?

We recognize this as a graph of $y = f(x-b)$ with $b = 2$.

The graph of $y = f(x-2)$ is the graph of $y = f(x)$ moved right by 2 units. $_\square$

## How is the graph of $y = f(x-2) - 3$ related to the graph of $y = f(x)$?

When we move the graph of $y = f(x)$ right by 2 units, we get $y = f(x-2)$.

When we move the graph of $y = f(x-2)$ down by 3 units, we get $y = f(x-2) - 3$.Hence, the graph of $y = f(x-2) - 3$ is located 2 units right, 3 units down, of the graph of $y = f(x)$. The point $(x,y)$ moves to $(x+2, y-3)$. $_\square$

## If we have the graph of $y = x^2$, how do we obtain the graph of $y = x^2 - 4x + 8$?

Let $f(x) = x^2$. Completing the square on $x^2 - 4x + 8$, we get $(x-2) ^2 + 4$. We recognize this as $f(x-2) + 4$.

Hence, to obtain the graph of $x^2 - 4x + 8$, we want to shift it to the right by 2, and then shift it up by 4. $_\square$

## If the graph $y = g(x)$ has a minimum point at $(1,2)$, what is the minimum point of the graph $y = g( x- 3) - 4$?

The graph of $g(x-3) - 4$ is a translation of the graph $y = g(x)$ to the right by 3, and down by 4. Hence, the point $(1,2)$ moves to $(1 + 3, 2 - 4 ) = (4, -2 )$. Thus, the minimum point would now be $(4, -2 )$. $_\square$

## If we move the graph of $y=x^2+4x-3$ to the right by $3$ units, and downward by $2$ units, what is the equation for the resulting graph?

Let $f(x)=x^2+4x-3.$ Completing the square gives $f(x)=(x+2)^2-7$. After moving the graph, the new function will be

$\begin{aligned} y+2&=f(x-3)\\ y+2&=(x-1)^2-7\\ y&=x^2-2x-8.\ _\square \end{aligned}$

## The equation for a circle of radius $r=1$ that is centered at the origin $O$ is given by $$

$x^2+y^2=1.$

## Find the equation for the circle shown in the figure below.

We can get the circle in the figure by moving the circle $x^2+y^2=1$ to the right by $4$ units, and upward by $3$ units. Hence the equation for the new circle would be

$(x-4)^2+(y-3)^2=1.\ _\square$

## Nick and Amy are practicing graph translations by moving $y=2x$ on the coordinate plane. Nick moved the graph $5$ units to the left and $a$ units downward, and obtained $l_1$. Amy moved the graph $b$ units to the right and $3$ units upward, and got $l_2$. Find the value of $a+2b$.

Moving $y=2x$ by 5 units to the left and $a$ units downward gives

$y+a=2(x+5)\Rightarrow y=2x+10-a.$

Since the graph shows that the $y$-intercept of this graph is $(0,7)$, we can obtain $a$ by simply plugging this into the new function as follows:

$7=2\times0+10-a \Rightarrow a=3.$

Now for Amy, moving $y=2x$ by $b$ unit to the right and $3$ units upward gives

$y-3=2(x-b) \Rightarrow y=2x-2b+3.$

Since the graph shows that the $x$-intercept of this graph is $(3,0)$, again, we can obtain $b$ by plugging this into the new function as shown below:

$0=2\times3-2b+3 \Rightarrow b=\frac{9}{2}.$

Therefore the answer is $a+2b=3+9=12.\ _\square$

## Stretching Graphs

When multiplying a function or its independent variable by a constant factor, we introduce a vertical or horizontal stretch in its graph.
$$
**Vertical Stretching**
$$
To stretch a graph vertically by a factor of 2, we adjust the $y$ value. Every point of the form $(x,y)$ in function $f$ now moves to the point $(x, 2y )$ in function $f^*$.

How does this point relate under the original function? We want $f^*(x) = 2y = 2 f(x)$. Hence, we have $f^*(x) = 2f(x)$. The graph of $2f(x)$ is the graph of $f(x)$ stretched vertically by a factor of 2.

In a similar manner, we can see that to stretch a function vertically by $c$, we multiply on the outside of the function. $cf(x)$ is the graph of $f(x)$ stretched vertically by $c$ units.

$$
**Horizontal Stretching**
$$
To stretch a graph horizontally by a factor of 2, we adjust the $x$ value. Every point of the form $(x,y)$ in the function $f$ now moves to the point $( 2x, y )$ in the function $f^*$.

How does this point relate under the original function? We want $f^* (2x) = y = f(x)$, or that $f^* (x) = f \left( \frac{x}{2} \right)$. The graph of $f\left( \frac{x}{2} \right)$ is the graph of $f(x)$ stretched horizontally by a factor of 2.

In a similar manner, we can see that to stretch a function horizontally by $a$, we divide on the inside of the function. $f \left( \frac{x}{a} \right)$ is the graph of $f(x)$ stretched horizontally by $a$ units.

## How is the graph of $y = 3f(x)$ related to the graph of $y = f(x)$?

We recognize this as a graph of $y = c f(x)$ with $c =3$.

The graph of $y = 3 f(x)$ is the graph of $y = f(x)$ stretched vertically by 3 units. $_\square$

## How is the graph of $y = f( -2x)$ related to the graph of $y = f(x)$?

We recognize this as a graph of $y = f\left( \frac{x}{a}\right)$ with $a = - \frac{1}{2}$.

The graph of $y = f(-2x)$ is the graph of $f(x)$ stretched horizontally by $- \frac{1}{2}$. This means that it is first flipped over the $y$-axis, and then shrunk by a factor of $2$. $_ \square$

## How is the graph of $y = 3 f(-2x)$ related to the graph of $y = f(x)$?

When we flip the graph of $f(x)$ over the $x$-axis and shrink it horizontally by a factor of 2, we get the graph $f(-2x)$.

When we stretch the graph of $y = f(-2x)$ vertically by 3, we get the graph of $y = 3 f(-2x)$.Hence, the graph of $y = 3 f(-2x)$ is stretched horizontally by $- \frac{1}{2}$ and stretched vertically by $3$. The point $(x,y)$ moves to the new point of $\left( -\frac{x}{2} , 3y \right)$. $_\square$

## If we have the graph of $y = \ln x$, how do we obtain the graph of $y = \ln x^2 + \ln 9$?

From the Rules of logarithms, we know that $\ln x^2 + \ln 9 = \ln 9x^2 = \ln (3x)^2 = 2 \ln 3x$.

Hence, to obtain the graph of $\ln x^2 + \ln 9$, we want to stretch it horizontally by $\frac{1}{3}$, and then stretch it vertically by $2$. $_\square$

## If the graph $y = g(x)$ has an $x$-intercept at 6 and a $y$-intercept at -6, what are the intercepts of $y = 3 g(2x)$ cutting the $x$-axis?

The graph of $y = 3 g(2x)$ is the graph of $g(x)$ stretched horizontally by $\frac{1}{2}$ and then stretched vertically by $3$.

The $x$-intercept is the point where the $y$-value is 0, so it is not affected by the vertical stretch. It is affected by the horizontal stretch, and thus the new $x$-intercept is $\frac{ 6}{2} = 3$.

The $y$-intercept is the point where the $x$-value is 0, so it is not affected by the horizontal stretch. It is affected by the vertical stretch, and thus the new y-intercept is $-6 \times 3 = -18$. $_\square$

## Combining Translating and Stretching

Now that we know how to translate and stretch graphs, the hard part is to combine that all together, so that we know how the graph of $y = 2 f(3x + 4) + 5$ looks like.

To tackle such questions, we take the following steps:

- Write the function in the form $y = c f \left( \frac{1}{a} ( x - b) \right) + d.$
- Stretch the graph horizontally by $a$.
- Shift the graph to the right by $b$.
- Stretch the graph vertically by $c$.
- Shift the graph up by $d$.

This procedure explains why we chose the variables $a, b, c, d$ in that order.

Note: There are many different orders of the transformation that we could use. I chose this sequence because it is generally easier to stretch than to shift, and it deals with the horizontal and vertical directions separately. At the end of this section, we will look at how different orders affect the process.

Why does this work? How is the graph of $y = c f \left( \frac{1}{a} ( x - b) \right) + d$ related to the graph of $y = f(x)$?

When we stretch the graph of $y = f(x)$ horizontally by $a$, we get the graph of $y = f\left( \frac{1}{a} x\right)$.

When we shift the graph of $y = f\left( \frac{1}{a} x\right)$ to the right by $b$, we get the graph of $y = f\left( \frac{1}{a} ( x - b) \right)$.

When we stretch the graph of $y = f\left( \frac{1}{a} ( x - b) \right)$ vertically by $c$, we get the graph of $y = cf\left( \frac{1}{a} ( x - b) \right)$.

When we shift the graph of $y = cf\left( \frac{1}{a} ( x - b) \right)$ up by $d$, we get the graph of $y = cf\left( \frac{1}{a} ( x - b) \right)+d$.

## How do we draw the graph of $y = -2f(x)+4$ when we are given the graph of $f(x)$?

Writing it in the above form, we have $-2f(x) + 4$ with $a = 1, b = 0, c = -2, d = 4$.

Hence, we want to stretch the graph vertically by $-2$, and then shift the graph up by 4. $_\square$

## How do we draw the graph of $y = f(2x+3)$ when we are given the graph of $f(x)$?

Writing it in the above form, we have $f(2x+3) = f \left( \dfrac{1}{\frac{1}{2} } \Big( x - \big(- \frac{3}{2} \big) \Big) \right)$.

Hence, we want to stretch the graph horizontally by $a = \frac{1}{2}$ and then shift the graph to the right by $b = - \frac{3}{2}$. $_\square$

## Starting with a graph $y = f(x)$, if we shift it to the left by 3 and then stretch it horizontally by 2, what graph do we end up with?

It is very tempting to say that since $a = 2$ and $b = -3$, we will get the graph of $y = f\left( \frac{1}{2} ( x - 3)\right)$. However, because the sequence of steps is now different, we cannot apply the above formula. We need to figure out what happens at each point in time.

When we shift the graph of $y = f(x)$ to the left by 3, we get the graph of $y = f( x + 3 )$.

When we stretch the graph of $y = f(x+3)$ horizontally by 2, we get the graph of $y = f \left( \frac{x}{2} + 3 \right)$. $_\square$

## If we shift a graph up by 4, and then stretch it vertically by 2, this is the same as which of the following transformations?

$$ $\quad \text{A)}$ Stretch it vertically by 2, and then shift it up by 4.

$\quad \text{B)}$ Stretch it vertically by 4, and then shift it up by 4.

$\quad \text{C)}$ Stretch it vertically by 2, and then shift it up by 2.

$\quad \text{D)}$ Stretch it vertically by 2, and then shift it up by 8.

Changing the order of the transformation might not result in the same graph. We have to check each of them to be certain.

First, let us understand the transformation in the question.

If we shift the graph of $y = f(x)$ up by 4, we get the graph $y = f(x) + 4$.

If we stretch the graph of $y = f(x) + 4$ vertically by 2, we get the graph of $y = 2[ f(x) + 4] = 2f(x) + 8$.Hence, this is equivalent to $a = 1, b = 0, c = 2, d = 8$, or we want to stretch it vertically by 2, and then shift it up by 8. Thus the answer is D. $_\square$

## If we take the graph of $y = f(x)$, shift it to the right by 2, stretch it horizontally by 3, shift it down by 4, and then stretch it vertically by 5, what graph do we end up with?

Once again, it is very tempting to say that since $a = 3, b = 2, c = 5, d = -4$, we will get the graph of $y = 5 f \left( \frac{1}{3} ( x -2) \right) - 4$. However, the issue is that these steps are not taken in the sequence of $a, b, c, d$. Thus, we need to figure out what happens at each point in time.

When we shift the graph of $y = f(x)$ to the right by $2$, we get the graph of $y = f(x - 2)$.

When we stretch the graph of $y = f(x-2)$ horizontally by $3$, we get the graph of $y = f\left( \frac{x}{3} - 2 \right)$.

When we shift the graph of $y = f\left( \frac{x}{3} -2 \right)$ down by 4, we get the graph of $y = f\left( \frac{x}{3} -2 \right) - 4$.

When we stretch the graph of $y = f\left( \frac{x}{3} -2 \right) - 4$ vertically by 5, we get the graph of $5 \left[ f\left( \frac{x}{3} -2 \right) - 4 \right]$.Hence, we get the graph of $y = 5 f\left( \frac{ x - 6 } { 3} \right) - 20$. $_\square$

## Figuring out the Shape of a Graph after several Transformations

This aspect often trips people up, because they are confused as to how to approach it. It is best to consider each transformation individually, and think about how each point moves, to come up with the overall transformation.

$y = \ln x$, which of these statements describes the transformations to get the graph of $y = \ln (4x^2 + 4x + 1)$ for $x > - \frac{1}{2}$?

Given the graph$\quad \text{(1)}$ Translate to the left by 1 and up by $\ln 4$, then scale vertically by 2.

$\quad \text{(2)}$ Translate to the left by $\frac{1}{2}$ and up by $\ln 2$, then scale vertically by 2.

$\quad \text{(3)}$ Translate to the left by 1 and up by $\ln 2$, then scale vertically by 2.

$\quad \text{(4)}$ Translate to the left by $\frac{1}{2}$ and up by $\ln 4$, then scale vertically by 2.

**Cite as:**Transforming Graphs of Functions.

*Brilliant.org*. Retrieved from https://brilliant.org/wiki/graph-transformation/