2.6 Transformations of Functions

1. Discussion

Consider a function $f(x)$. Let's think of the new function $g(x) = f(x) + 2$. In fact, we add 2 units to any value of $y = f(x)$, thus the whole graph of $f(x)$ moves 2 units up. We say that this is a vertical translation of the graph.

In a similar way, we can describe other transformations of $f(x)$ not only in a vertical direction (applied on $y$) but also in a horizontal direction (applied on $x$). Let us present the most important transformations in a concise way!

2. The Basic Transformations

Consider the original function $y = f(x)$. In the following rules, we assume $a > 0$ and $b > 1$.

Vertical Transformations (Applied to y)

Translations
$f(x) + a$
$\longrightarrow$
translation $a$ units up
Example:
$y = x^2$ (dashed)
$y = x^2 + 3$ (solid)
$f(x) - a$
$\longrightarrow$
translation $a$ units down
Example:
$y = x^2$ (dashed)
$y = x^2 - 3$ (solid)
Stretches
$bf(x)$
$\longrightarrow$
vertical stretch, scale factor $b$
Example:
$y = \sin(x)$ (dashed)
$y = 3\sin(x)$ (solid)
$\dfrac{f(x)}{b}$
$\longrightarrow$
vertical stretch, scale factor $\frac{1}{b}$
Example:
$y = \sin(x)$ (dashed)
$y = \frac{1}{2}\sin(x)$ (solid)
Reflection
$-f(x)$
$\longrightarrow$
reflection in the x-axis
Example:
$y = e^x$ (dashed)
$y = -e^x$ (solid)

Horizontal Transformations (Applied to x)

Notice: For horizontal transformations, we obtain, perhaps, the opposite of what we expect!

Translations
$f(x + a)$
$\longrightarrow$
translation $a$ units left
Example:
$y = \sqrt{x}$ (dashed)
$y = \sqrt{x + 4}$ (solid)
$f(x - a)$
$\longrightarrow$
translation $a$ units right
Example:
$y = \sqrt{x}$ (dashed)
$y = \sqrt{x - 4}$ (solid)
Stretches
$f(bx)$
$\longrightarrow$
horizontal stretch, scale factor $\frac{1}{b}$
Example:
$y = |x|$ (dashed)
$y = |2x|$ (solid)
$f\left(\dfrac{x}{b}\right)$
$\longrightarrow$
horizontal stretch, scale factor $b$
Example:
$y = |x|$ (dashed)
$y = \left|\frac{x}{2}\right|$ (solid)
Reflection
$f(-x)$
$\longrightarrow$
reflection in the y-axis
Example:
$y = e^x$ (dashed)
$y = e^{-x}$ (solid)

3. Examples of Transformations

EXAMPLE 1

Let us observe the basic transformations of the initial function $f(x) = x^2$, for $0 \le x \le 2$ in connection with the two tables above.

Vertical Transformations
(2,4) (2,6) x²+2 (2,2) x²-2 (2,4) (2,8) 2x² (2,2) x²/2 (2,-4) -x²
Horizontal Transformations
(2,4) (0,4) (x+2)² (4,4) (x-2)² (2,4) (1,4) (2x)² (4,4) (x/2)² (-2,4) (-x)²

EXAMPLE 2

Let $A(6, 10)$ be a point on the curve of $y = f(x)$. Let us present some basic transformations as well as the corresponding images of the point A.

Vertical Transformations
  • $f(x) + 2 \Rightarrow \mathbf{A'(6, 12)}$
  • $f(x) - 2 \Rightarrow \mathbf{A'(6, 8)}$
  • $2f(x) \Rightarrow \mathbf{A'(6, 20)}$
  • $f(x)/2 \Rightarrow \mathbf{A'(6, 5)}$
  • $-f(x) \Rightarrow \mathbf{A'(6, -10)}$
Horizontal Transformations
  • $f(x + 2) \Rightarrow \mathbf{A'(4, 10)}$
  • $f(x - 2) \Rightarrow \mathbf{A'(8, 10)}$
  • $f(2x) \Rightarrow \mathbf{A'(3, 10)}$
  • $f(x/2) \Rightarrow \mathbf{A'(12, 10)}$
  • $f(-x) \Rightarrow \mathbf{A'(-6, 10)}$

4. Translation Vectors and Composite Transformations

The horizontal translation by $a$ units (to the right or to the left) is also denoted by the translation vector $\begin{pmatrix} a \\ 0 \end{pmatrix}$. A vertical translation by $b$ units (up or down) is also denoted by the translation vector $\begin{pmatrix} 0 \\ b \end{pmatrix}$.

The combination of those two translations is denoted by $\begin{pmatrix} a \\ b \end{pmatrix}$.

Composite Transformations:
Of course we may have a combination of several simple transformations. For example, $2f(x-3) + 5$ implies:
  • a vertical stretch with scale factor 2, followed by
  • a horizontal translation 3 units to the right, followed by
  • a vertical translation 5 units up.
Vertex Form of a Quadratic Function:

Remember the vertex form of a quadratic function $y = a(x-h)^2 + k$. This is a combination of transformations of the simple quadratic function $y = x^2$. Indeed, if $a > 0$:

  • $x^2$ (original function)
  • $ax^2$ (vertical stretch by scale factor $a$)
  • $a(x-h)^2$ (horizontal translation by $h$ units)
  • $a(x-h)^2 + k$ (vertical translation by $k$ units)
(If $a < 0$, we also have a reflection about the x-axis).

The two translations by $\begin{pmatrix} h \\ k \end{pmatrix}$ imply that the initial vertex $(0,0)$ of the function $x^2$ moves $h$ units horizontally, and $k$ units vertically, thus its new position is $(h,k)$.

5. The Inverse Function Transformation

We have already seen that $f^{-1}(x)$ causes a reflection in the line $y = x$.

EXAMPLE 3

If $f(x) = x^2$, for $x \ge 0$, then $f^{-1}(x) = \sqrt{x}$.

The image of the point $A(2,4)$ on the initial function becomes $A'(4,2)$ under the reflection.

y = x A(2,4) f(x)=x² A'(4,2) f⁻¹(x)=√x

6. Important: Order of Transformations

Mind the order when applying composite transformations.

  • Vertical Transformations: The transformation $y = 2f(x) + 3$ consists of the following two single transformations:
    $f(x) \rightarrow 2f(x) \rightarrow 2f(x) + 3$
    Be careful! The reverse order will result to: $f(x) \rightarrow f(x) + 3 \rightarrow 2[f(x) + 3] = \mathbf{2f(x) + 6}$.
    Indeed, in a vertical stretch by s.f. 2 we multiply not only $f(x)$ but the whole expression by 2.
  • Horizontal Transformations: Similarly, the transformation $y = f(2x + 6)$ consists of:
    $f(x) \rightarrow f(x + 6) \rightarrow f(2x + 6)$
    Be even more careful now! In horizontal transformations, only $x$ changes from one form to another. The reverse order will result to:
    $f(x) \rightarrow f(2x) \rightarrow f(2(x + 6)) = \mathbf{f(2x + 12)}$ !!!
    Otherwise, if we express $f(2x + 6)$ as $f(2(x + 3))$, the correct order is:
    $f(x) \rightarrow f(2x) \rightarrow f(2(x + 3))$.