# Transformation of Graphs

Graph of function does not remain the same. It changes its shape or position when values are added, subtracted or multiplied by the equation of the graph. This kind of change in the graph is called a transformation of the graph of functions.

You must be familiar with the transformation happens to a graph of function once the equation changes. You should be able to tell the changes in the graph by looking at the new graph of the equation.

Before you begin, learn about graph and graphs of equations, functions, a graph of functions. If you know them already skip ahead and continue reading.

## Types of Graph Transformation

The graph transformation is broadly classified into two types.

1. Transformation of Position
2. Reflection
3. Transformation of the shape of Graph

We shall discuss each of these transformations in more detail in coming sections.

## Transformation of Position

This type of transformation changes the position of the original graph to left, right, top and bottom by a few units. The graph is no longer in its original position.

If $y = f(x)$ is a function and $c$ is a positive real number, then shift in the graph position is represented as

Shift of c units upward (y-axis) : $g(x) = f(x) + c$

Shift of c units downward (y-axis) : $g(x) = f(x) - c$

Shift of c units left (x-axis) : $g(x) = f(x + c)$

Shift of c units right (x-axis) : $g(x) = f(x - c)$

To understand the positional shift in graph, check the examples in following sections.

### Example 1:

Let $f(x) = x^2$ and $c = 3$. Then the function $h(x)$ is given as follows. $h(x) = f(x) + c$

substituting value $f(x)$ and $c$, we get $h(x) = x^2 + 3$

Create a table of values for $(x, h(x))$ to plot the graph of the function.

 x h(x) -2 7 -1 4 0 3 1 4 2 7

Using the above value plot a graph of function for $h(x) = x^2 + 3$.

### Example 2:

Now, we plot the graph of $h(x) = f(x) - c$.

Subsctituting for $f(x)$ and $c$, we get. $h(x) = x^2 - 3$.

Once, again create a table with values for $(x, h(x))$.

 x h(x) -2 1 -1 -2 0 -3 1 -2 2 1

You can plot a graph using the above table.

### Example 3:

The horizontal shift in a graph of a function is different from vertical shift because the value of a range is unaffected, but the value of domain x is increased or decreased. Thus causing right or left shift horizontally.

Suppose $f(x) = x^2$ be the function and $c = 3$ be the positive real constant. Then $h(x) = f(x-c)$  implies $h(x) = (x - c)^2$

In other words, value of $x$ in $h(x)$ is reduced by $c$ units in $f(x)$ to get the output. $h(5) = f(5 - 3)$ $= (5 - 3)^2$ $= 2^2$ $= 4$

Let us now plot the graph of function $h(x)$.

 x f(x – 3) h(x) 3 f(0) 0 2 f(-1) 1 4 f(1) 1 1 f(-2) 4 5 f(2) 4

The graph of function $h(x)$ look like the following.

Clearly, the graph shifted to 3 units right horizontally.

### Example 4:

The left shift transformation is similar to the right shift. Let $h(x) = f(x + c)$. The function $f(x) = x^2$ and $c = 3$.

The graph of this function will look like the following. The procedure to plot the graph is similar to the right shift transformation.

### Combining More Than one Shift

It is possible to combine two or more shifts. Consider the following functions. $f(x) = x^2$ $g(x) = f(x - 3) = (x - 3)^2$ $h(x) = g(x) + 1$

It implies that $h(x) = (x - 3)^2 + 1$

Therefore, the graph will shift 3 units right horizontally and shift 1 unit up vertically.

## Reflection of a Graph

Reflection is another type of graph transformation. It does not change position but uses the x-axis or y-axis to reflect a graph of a function.

Reflection on x-axis: $g(x) = -f(x)$

Reflection on y-axis: $g(x) = f(-x)$

Let us see few examples to find out what reflection of a graph means.

### Example 5:

Let $f(x) = x^2$ be the original equation. If $-f(x)$ represents the reflection of the function $f(x)$ on x-axis, then the graph will look like below diagram.

### Example 6:

Let us take another example for reflection along y-axis. The function $f(-x) = \sqrt -x$ is reflection of $f(x) = \sqrt x$.

For this example, we will plot the graph of both $f(x)$ and $f(-x)$.

## Transformation of the Shape of Graph

The transformation of position or the reflection does not change the shape of the graph itself. It just moves

the graph to a different location in the coordinate system.

If $y = f(x)$ is the graph of function then transformation is represented by $g(x) = cf(x)$ , where it is a vertical stretch if $c > 1$ and vertical shrink if $0 < c < 1$.

If $y = f(x) is the graph of function then its transformation is$latex g(x) = f(cx)\$, where it is a horizontal shrink if $c > 1$ and horizontal stretch if $0 < c < 1$.

### Example 7:

To understand the vertical transformation of shape, consider an example. Let $f(x) = |x|$ be a function and $c$ be a real constant.

You have two cases, case 1 when $c > 1$ and case 2 with $0 < c < 1$. Suppose $c = 2$ then $g(x) = 2|x|$, we know that this is case 1 and result in a vertical stretch.

Find all the points to plot the graph of function $g(x)$.

 x f(x) = |x| g(x) = 2|x| 0 0 0 1 1 2 2 2 4 3 3 6 4 4 8

You can easily plot the graph of function $g(x)$ using the above points, which is given below.

Suppose $0 < c < 1$, then its case 2 – vertical shrink. Let us plot the graph of the equation for case 2 when $c = 1/2$.

 x f(x) = |x| g(x) = 1/2|x| 0 0 0 1 1 1/2 2 2 1 3 3 3/2 4 4 2

The graph of the function $g(x) = 1/2|x|$ is given below.

The graph of function $g(x)$ shows that the vertical shape transformation has happened.

The horizontal shape transformation also happens in the same way. Let $f(x) = x^2$ be the function, and $g(x) = f(cx)$ be the horizontal shrink when $c > 1$ and horizontal stretch when $0 < c < 1$.

Suppose $c = 2$ for horizontal shrink and $c = 1/2$ for horizontal stretch respectively. Then the graph of function $g(x) = f(cx)$ is given below.

 x f(x) = x^2 g(x) = f(2x), c > 1 g(x) = f(1/2x), 0 < c < 1 2 4 16 1 1 1 4 1/4 0 0 0 0 -1 1 4 1/4 -2 4 16 1

### Example 8:

The graph of function g(x) with horizontal shrink.