Horizontal and Vertical Translation of a Function with Examples

The horizontal and vertical translation is a transformation that allows us to modify the graph of the original function. Given the function f(x), we can translate the function horizontally with the transformation f(x+a) and vertically with the transformation f+a where a is a value that can be positive or negative.

Here, we will learn everything related to the horizontal and vertical translation of a function. We will look at some examples to illustrate the concepts.

ALGEBRA
Graph of straight line with horizontal transformation

Relevant for...

Learning about the horizontal and vertical translation of functions.

See transformations

ALGEBRA
Graph of straight line with horizontal transformation

Relevant for...

Learning about the horizontal and vertical translation of functions.

See transformations

Determining the horizontal translation of a function

The horizontal translation in a function is a transformation that produces a shift to the left or to the right of the original function. That is, the translation occurs parallel to the x-axis.

We can understand the horizontal translation of a function by taking the function $latex f(x)=2x-1$ as an example. When we graph this function, we get the following line:

Graph of function 2x minus 1

Now, we are going to apply the transformations (i) $latex f(x+2)$ and (ii) $latex f(x-2)$. Therefore, using the original function $latex f(x)=2x-1$ and simplifying the transformations, we have:

(i) $latex f(x+2)=2(x+2)-1~$ and (ii) $latex f(x-2)=2(x-2)-1$

(i) $latex f(x+2)=2x+3~$ and (ii) $latex f(x-2)=2x-5$

We can then graph functions (i) and (ii) using the same coordinate plane as the original function to compare their graphs. Therefore, we have:

Graph of straight line with horizontal transformation

In case (i), the transformation $latex f(x+2)$ produced a translation of 2 units to the left. That is, -2 units parallel to the x-axis.

In case (ii), the transformation $latex f(x-2)$ produced a translation of 2 units to the right. That is, 2 units parallel to the x axis.

In short, we have:

  • The transformation $latex f(x+a)$ results in a shift in the original graph of f of $latex a$ units to the left.
  • The transformation $latex f(x-a)$ results in a shift in the original graph of f of $latex a$ units to the right.

Determining the vertical translation of a function

The vertical translation of a function is a transformation that causes the graph of the original function to be moved up or down. That is, the translation occurs parallel to the y-axis.

To understand the vertical translation of a function, we can consider the function $latex f(x)=x^2$ as an example. If we graph this function, we get the following curve:

Graph of quadratic function

If we now add and subtract 1 unit from the original function, we have the functions (i) $latex f(x)+1$ and (ii) $latex f(x)-1$. Simplifying, we have:

(i) $latex f(x)+1=x^2+1~$ and (ii) $latex f(x)-1=x^2-1$

Using the same Cartesian plane as the original function $latex f(x)$, we can graph functions (i) and (ii) to obtain the following:

Graph of a quadratic function with vertical transformation

We can see that, in case (i), the graph of f has been moved up 1 unit. That is, 1 unit parallel to the y-axis.

On the other hand, the graph of the function (ii) is equal to the graph of f moved down 1 unit. That is, -1 unit parallel to the y-axis.

In short, we have the following:

  • The transformation $latex f(x)+a$ produces a shift in the original graph of $latex f(x)$ of $latex a$ units up.
  • The transformation $latex f(x)-a$ produces a shift in the original graph of $latex f(x)$ of $latex a$ units down.

Examples of horizontal and vertical translation in functions

EXAMPLE 1

Sketch the graph of $latex f(x)=x^2-1$. Then, find the equation of the transformation $latex g(x)=f(x+2)$ and graph it.

Solution

EXAMPLE 2

We have the function $latex f(x)=x^3$. If we have the function $latex g(x)=x^3-3$, get the graphs of g and f.

Solution

EXAMPLE 3

Graph the cosine function in its base form. Then graph two cosine functions that are shifted 1 unit and 2 units to the right from the base shape.

Solution

EXAMPLE 4

Graph the function $latex f(x)=\cos(x)+2$.

Solution

EXAMPLE 5

Obtain the graph of $latex g(x)=|x-2|$.

Solution

EXAMPLE 6

What is the graph of $latex g(x)=|x|-2$?

Solution

EXAMPLE 7

What transformation do we need to apply to shift the function $latex f(x)=\tan(5x-2)$, -4 units parallel to the x-axis?

Solution

EXAMPLE 8

What transformation do we need to apply to the function $latex f(x)=\tan(5x-2)$ if we want to shift it -5 units parallel to the y-axis?

Solution

Horizontal and vertical translation of functions - Practice problems

Horizontal and vertical translation quiz
Logo
You have completed the quiz!

Which function has a translation of 6 units up with respect to the function $latex f(x)=-2x-3$?

Write the answer in the input box.

$latex g(x)=$

To practice shifts together with reflections and stretches, open the function transformations practice.

See also

Interested in learning more about function transformations? Take a look at these pages:

Learn mathematics with our additional resources in different topics

LEARN MORE