# Graph Transformations (Drawing Graphs Without Plotting)

This post is also available in: العربية (Arabic)

Students always need to manually plot the graphs while solving many problems, which is a lengthy and time-consuming process. In this article, we will discuss an approach to draw graphs without actually plotting the points. It is like the fast way to draw graphs for given equations.

## Graph Transformations

Knowledge of graphs helps a lot in computer graphics. The graphs are a visual representation of functions. Many times when you know what the graph of a particular function looks like, and you want to know what the graph of a very similar function looks like. For example, if you know the graph of f(x) = x2, and want to know the graph of functions – f(x) = x2 + 3 or f(x) x2 – 5 or f(x) = (x + 1)2 or f(x) = (x – 2)2, etc. In the following text, we will look into 3 Basic Graph Transformations for awesome graphics.

The graphs of all these functions have the same shape and they differ with respect to their position in the Cartesian plane.

It means that you can plot a number of graphs quickly and easily if you know the shape of the graphs of basic functions.

## Graphs of Basic Functions

Following are some of the basic functions and their graphs. If you know the shape of graphs of these basic functions, you can easily plot the graphs of other related and similar functions.

By applying transformations to these basic graphs, you are able to obtain new graphs that still have all the properties of the old ones. By understanding the basic graphs and the way transformations apply to them, you will recognize each new graph as a small variation in an old one, not as a completely different graph that you have never seen before. Understanding these transformations will allow you to quickly recognize and sketch a new function without having to resort to plotting points.

## 3 Basic Graph Transformations Rules

There are three types of transformations through which the graphs go through when a function is changed. These transformations are:

• Translation
• Reflection
• Stretching

### 1. Translation

Translation is a process of shifting the graph of a function either left, right, up, or down. To understand how it works, let’s consider an example of basic quadratic function – f(x) = x2. The graph of f(x) = x2 is

#### A. Translating the Graph Upward

Function f(x) + a translates the graph of a function f(x) upwards by ‘a’ units. For example, f(x) = x2 + 3 will shift the graph of f(x) = x2 , 3 units upwards.

#### B. Translating the Graph Downward

Function f(x) – a translates the graph of a function f(x) downwards by ‘a’ units. For example, f(x) = x2 – 5 will shift the graph of f(x) = x2 , 5 units downwards.

#### C. Translating the Graph Leftward

Function f(x + a) translates the graph of a function f(x) leftwards by ‘a’ units. For example, f(x) = (x + 1)2 will shift the graph of f(x) = x2 , 1 units leftwards.

#### D. Translating the Graph Rightward

Function f(x – a) translates the graph of a function f(x) rightwards by ‘a’ units. For example, f(x) = (x – 2)2 will shift the graph of f(x) = x2 , 2 units rightwards.

### 2. Reflection

Reflection of a graph is a process of flipping the graph about one of the coordinate axes – x-axis or y-axis. To understand this, let’s consider the base function f(x) = ex.

#### A. Reflecting the Graph About X-Axis

The first, flipping upside down (reflection about x-axis), is found by taking the negative of the original function, that is the function -f(x) flips the graph of f(x) about x-axis. For example, f(x) = -ex will flip the graph of f(x) = ex about x-axis.

#### B. Reflecting the Graph About Y-Axis

The second, is flipping laterally (reflection about y-axis), is found by taking the changing x to -x, that is the function f(-x) flips the graph of f(x) about y-axis. For example, f(x) = e-x will flip the graph of f(x) = ex about y-axis.

### 3. Stretching

The stretching of a graph is of two types – vertical and horizontal. To understand this concept, let’s again consider the function f(x) = x2.

#### A. Vertical Stretching

A vertical stretching is the stretching of the graph away from the x-axis. And a vertical compression (or shrinking) is the squeezing of the graph towards the x-axis. A function k.f(x) stretches the graph of the function f(x) vertically.

• If k > 1, the graph of k.f(x) is the graph of f(x) vertically stretched by a factor k.
• If 0 < k < 1, (a fraction), the graph of k.f(x) is the graph of f(x) vertically shrunk (or compressed) by a factor k.

#### B. Horizontal Stretching

A horizontal stretching is the stretching of the graph away from the y-axis. A horizontal compression (or shrinking) is the squeezing of the graph towards the y-axis. A function f(k.x) stretches the graph of the function f(x) horizontally.

If k > 1, the graph of f(k.x) is the graph of f(x) horizontally shrunk (or compressed) by dividing each of its x-coordinates by k.

If 0 < k < 1 (a fraction), the graph is f(x) horizontally stretched by dividing each of its x-coordinates by k.

## Combination of Transformations

A function can be formed by applying two or more of the above combinations. For example again taking f(x) = x2 as a basic function, graph of f(x) = (x + 2)2 – 3 is obtained by translating graph of f(x) = x2,  2 units leftwards and the again translating the graph 3 units downwards.