Transformations of Functions

Transformations alter a function while maintaining the original characteristics of that function.

Learning Objectives

Determine whether a given transformation is an example of translation, scaling, rotation, or reflection

Key Takeaways

Key Points

• Transformations are ways that a function can be adjusted to create new functions.
• Transformations often preserve the original shape of the function.
• Common types of transformations include rotations, translations, reflections, and scaling (also known as stretching/shrinking).

Key Terms

• translation: Shift of an entire function in a specific direction.
• Scaling: Changes the size and/or the shape of the function.
• rotation: Spins the function around the origin.
• reflection: Mirror image of a function.

A transformation takes a basic function and changes it slightly with predetermined methods.  This change will cause the graph of the function to move, shift, or stretch, depending on the type of transformation.  The four main types of transformations are translations, reflections, rotations, and scaling.

Translations

A translation moves every point by a fixed distance in the same direction. The movement is caused by the addition or subtraction of a constant from a function.  As an example, let $f(x) = x^3$.  One possible translation of $f(x)$ would be $x^3 + 2$.  This would then be read as, “the translation of $f(x)$ by two in the positive y direction”. Graph of a function being translated: The function $f(x)=x^3$ is translated by two in the positive $y$ direction (up).

Reflections

A reflection of a function causes the graph to appear as a mirror image of the original function.  This can be achieved by switching the sign of the input going into the function.  Let the function in question be $f(x) = x^5$.  The mirror image of this function across the $y$-axis would then be $f(-x) = -x^5$.  Therefore, we can say that $f(-x)$ is a reflection of $f(x)$ across the $y$-axis. Graph of a function being reflected: The function $f(x)=x^5$ is reflected over the $y$-axis.

Rotations

A rotation is a transformation that is performed by “spinning” the object around a fixed point known as the center of rotation.  Although the concept is simple, it has the most advanced mathematical process of the transformations discussed.  There are two formulas that are used:

$x_1 = x_0cos\theta - y_0sin\theta \\ y_1 = x_0sin\theta + y_0cos\theta$

Where $x_1$and $y_1$are the new expressions for the rotated function, $x_0$ and $y_0$ are the original expressions from the function being transformed, and $\theta$ is the angle at which the function is to be rotated.  As an example, let $y=x^2$.  If we rotate this function by 90 degrees, the new function reads:

$[xsin(\frac{\pi}{2}) + ycos(\frac{\pi}{2})] = [xcos(\frac{\pi}{2}) - ysin(\frac{\pi}{2})]^2$

Scaling

Scaling is a transformation that changes the size and/or the shape of the graph of the function.  Note that until now, none of the transformations we discussed could change the size and shape of a function – they only moved the graphical output from one set of points to another set of points.  As an example, let $f(x) = x^3$.  Following from this, $2f(x) = 2x^3$.  The graph has now physically gotten “taller”, with every point on the graph of the original function being multiplied by two. Graph of a function being scaled: The function $f(x)=x^3$ is scaled by a factor of two.

Translations

A translation of a function is a shift in one or more directions. It is represented by adding or subtracting from either y or x.

Learning Objectives

Manipulate functions so that they are translated vertically and horizontally

Key Takeaways

Key Points

• A translation is a function that moves every point a constant distance in a specified direction.
• A vertical translation is generally given by the equation $y=f(x)+b$. These translations shift the whole function up or down the y-axis.
• A horizontal translation is generally given by the equation $y=f(x-a)$. These translations shift the whole function side to side on the x-axis.

Key Terms

• translation: A shift of the whole function by a specified amount.
• vertical translation: A shift of the function along the $y$-axis.
• horizontal translation: A shift of the function along the $x$-axis.

A translation moves every point in a function a constant distance in a specified direction. In algebra, this essentially manifests as a vertical or horizontal shift of a function. A translation can be interpreted as shifting the origin of the coordinate system.

Vertical Translations

To translate a function vertically is to shift the function up or down. If a positive number is added, the function shifts up the $y$-axis by the amount added.  If a positive number is subtracted, the function shifts down the $y$-axis by the amount subtracted.  In general, a vertical translation is given by the equation:

$\displaystyle y = f(x) + b$

where $f(x)$ is some given function and $b$ is the constant that we are adding to cause a translation.

Let’s use a basic quadratic function to explore vertical translations. The original function we will use is:

$\displaystyle y = x^2$.

Translating the function up the $y$-axis by two produces the equation:

$\displaystyle y=x^2 + 2$

And translating the function down the $y$-axis by two produces the equation:

$y=x^2 - 2$. Vertical translations: The function $f(x)=x^2$ is translated both up and down by two.

Horizontal Translations

To translate a function horizontally is the shift the function left or right. While vertical shifts are caused by adding or subtracting a value outside of the function parameters, horizontal shifts are caused by adding or subtracting a value inside the function parameters.  The general equation for a horizontal shift is given by:

$\displaystyle y = f(x-a)$

Where $f(x)$ would be the original function, and $a$ is the constant being added or subtracted to cause a horizontal shift.  When $a$ is positive, the function is shifted to the right.  When $a$ is negative, the function is shifted to the left.

Let’s use the same basic quadratic function to look at horizontal translations. Again, the original function is:

$\displaystyle y = x^2$.

Shifting the function to the left by two produces the equation:

\displaystyle \begin{align} y &= f(x+2)\\ &= (x+2)^2 \end{align}

Shifting the function to the right by two produces the equation:

\displaystyle \begin{align} y &= f(x-2)\\ & = (x-2)^2 \end{align} Horizontal translation: The function $f(x)=x^2$ is translated both left and right by two.

Reflections

Reflections are a type of transformation that move an entire curve such that its mirror image lies on the other side of the $x$ or $y$-axis.

Learning Objectives

Calculate the reflection of a function over the $x$-axis, $y$-axis, or the line $y=x$

Key Takeaways

Key Points

• A reflection swaps all of the $x$ or $y$ values across the $x$ or $y$-axis, respectively. It can be visualized by imagining that a mirror lies across that axis.
• A vertical reflection is given by the equation $y = -f(x)$ and results in the curve being “reflected” across the x-axis.
• A horizontal reflection is given by the equation $y = f(-x)$ and results in the curve being “reflected” across the y-axis.

Key Terms

• Reflection: A mirror image of a function across a given line.

Reflections produce a mirror image of a function.  The reflection of a function can be performed along the $x$-axis, the $y$-axis, or any line.  For this section we will focus on the two axes and the line $y=x$.

Vertical Reflections

A vertical reflection is a reflection across the $x$-axis, given by the equation:

$\displaystyle y=-f(x)$

In this general equation, all $y$ values are switched to their negative counterparts while the $x$ values remain the same. The result is that the curve becomes flipped over the $x$-axis.  As an example, let the original function be:

$\displaystyle y = x^2$

The vertical reflection would then produce the equation:

\displaystyle \begin{align} y &= -f(x)\\ & = -x^2 \end{align} Vertical reflection: The function $y=x^2$ is reflected over the $x$-axis.

Horizontal Reflections

A horizontal reflection is a reflection across the $y$-axis, given by the equation:

$\displaystyle y=f(-x)$

In this general equation, all $x$ values are switched to their negative counterparts while the y values remain the same. The result is that the curve becomes flipped over the $y$-axis. Consider an example where the original function is:

$\displaystyle y = (x-2)^2$

Therefore the horizontal reflection produces the equation:

\displaystyle \begin{align} y &= f(-x)\\ &= (-x-2)^2 \end{align} Horizontal reflection: The function $y=(x-2)^2$ is reflected over the $y$-axis.

Reflections Across a Line

The third type of reflection is a reflection across a line.  Let’s look at the case involving the line $y=x$.  This reflection has the effect of swapping the variables $x$and $y$, which is exactly like the case of an inverse function.  As an example, let the original function be:

$\displaystyle y = x^2$

The reflected equation, as reflected across the line $y=x$, would then be:

$y = \pm \sqrt{x}$ Reflection over $y=x$: The function $y=x^2$ is reflected over the line $y=x$.

Stretching and Shrinking

Stretching and shrinking refer to transformations that alter how compact a function looks in the $x$ or $y$ direction.

Learning Objectives

Manipulate functions so that they stretch or shrink.

Key Takeaways

Key Points

• When by either $f(x)$ or $x$ is multiplied by a number, functions can “stretch” or “shrink” vertically or horizontally, respectively, when graphed.
• In general, a vertical stretch is given by the equation $y=bf(x)$.  If $b>1$, the graph stretches with respect to the $y$-axis, or vertically.  If $b<1$, the graph shrinks with respect to the $y$-axis.
• In general, a horizontal stretch is given by the equation $y = f(cx)$.  If $c>1$, the graph shrinks with respect to the $x$-axis, or horizontally.  If $c<1$, the graph stretches with respect to the $x$-axis.

Key Terms

• scaling: A transformation that changes the size and/or shape of the graph of the function.

In algebra, equations can undergo scaling, meaning they can be stretched horizontally or vertically along an axis. This is accomplished by multiplying either $x$ or $y$ by a constant, respectively.

Vertical Scaling

First, let’s talk about vertical scaling.  Multiplying the entire function $f(x)$ by a constant greater than one causes all the $y$ values of an equation to increase. This leads to a “stretched” appearance in the vertical direction. If the function $f(x)$ is multiplied by a value less than one, all the $y$ values of the equation will decrease, leading to a “shrunken” appearance in the vertical direction.  In general, the equation for vertical scaling is:

$\displaystyle y = bf(x)$

where $f(x)$ is some function and $b$ is an arbitrary constant.  If $b$ is greater than one the function will undergo vertical stretching, and if $b$ is less than one the function will undergo vertical shrinking.

As an example, consider the initial sinusoidal function presented below:

$\displaystyle y = \sin(x)$

If we want to vertically stretch the function by a factor of three, then the new function becomes:

\displaystyle \begin{align} y &= 3f(x) \\ &= 3\sin(x) \end{align} Vertical scaling: The function $y=\sin(x)$ is stretched by a factor of three in the $y$ direction.

Horizontal Scaling

Now lets analyze horizontal scaling. Multiplying the independent variable $x$ by a constant greater than one causes all the $x$ values of an equation to increase. This leads to a “shrunken” appearance in the horizontal direction. If the independent variable $x$ is multiplied by a value less than one, all the x values of the equation will decrease, leading to a “stretched” appearance in the horizontal direction.  In general, the equation for horizontal scaling is:

$\displaystyle y = f(cx)$

where $f(x)$ is some function and $c$ is an arbitrary constant.  If $c$ is greater than one the function will undergo horizontal shrinking, and if $c$ is less than one the function will undergo horizontal stretching.

As an example, consider again the initial sinusoidal function:

$\displaystyle y = \sin(x)$

If we want to induce horizontal shrinking, the new function becomes:

\displaystyle \begin{align} y &= f(3x)\\ &= \sin(3x) \end{align} Horizontal scaling: The function $y=\sin(x)$ is shrunk by a factor of three in the $x$ direction.