Skip to content Skip to navigation

OpenStax-CNX

You are here: Home » Content » Transformation of graphs by modulus function

Navigation

Recently Viewed

This feature requires Javascript to be enabled.
 

Transformation of graphs by modulus function

Module by: Sunil Kumar Singh. E-mail the author

A function like y=f(x) has different elements. We can apply modulus operator to these elements of the function. There are following different possibilities :

1 : y = f | x | y = f | x |

2 : y = | f x | y = | f x |

3 : | y | = f x | y | = f x

4 : x = | f y | x = | f y |

Plotting concept

The most important point about plotting is to understand that application of modifying operator has different interpretation whether it is applied to independent variable “x” or function definition in x like “f(x)” or it is applied to dependent variable “y” or function definition like “f(y)”. There is a difference in the approach to interpretation.

Clearly, modulus operations have different implications for the graph of f(x). In general, every function can be interpreted to be an operator which operates on its argument, which in itself can be variable like “x”, expression like “ x 2 + 2 x 2 + 2 ” or other functions. This role is more visible for functions like modulus, greatest integer, fraction part and least integer function. For this reason, these functions are represented by symbolic notations like | |, [], {} and () as operators.

When operator is applied to independent variable or function definition, we evaluate operation of the operator on independent variable or function value. Here, interpretation is based on “evaluation” of the expression (independent variable or function definition) and application of operator thereafter. This applies to the transformations enumerated at (i) and (ii) above. Consider for example,

y = | f x | y = | f x |

The function of value at any value x=x is first evaluated. Then, modulus of value is calculated. Finally, it is assigned to y as its value.

This basis of interpretation changes when we apply operator to dependent variable “y” or function definition in “y”. Now the basis of interpretation is that of “assigning” a value to a function and then interpreting the assignment. Such is the case with transformations enumerated at (iii) and (iv) above. Consider for example,

| y | = f x | y | = f x

In this case, value of function evaluated at x=x is assigned to modulus function. We interpret equality of the modulus function [y] to a value in accordance with modulus definition. In this case, we know that :

| y | = a ; a > 0 y = ± a | y | = a ; a > 0 y = ± a

| y | = a ; a = 0 y = 0 | y | = a ; a = 0 y = 0

| y | = a ; a < 0 Modulus can not be equated to negative value. No solution | y | = a ; a < 0 Modulus can not be equated to negative value. No solution

From the point of view of construction of plot, for a single positive value of f(x), say f(x)=4, we have two values of dependent variable i.e. -4 or 4. This needs to be considered while plotting |y|=f(x). In the plot, values of y are plotted against values of x. In this particular instant, there are two points (4,4) and (4,-4) on the graph corresponding to one value of independent variable (4).

Modulus function applied to the independent variable

The form of transformation is depicted as :

y = f x y = f | x | y = f x y = f | x |

It can be seen that modulus operator here modifies independent varaible of the function. In other words, it is like changing input to the function in accordance with nature of modulus function. The input to the function is now either zero or positive number. This has the implication that part of the graph y=f(x) corresponding to negative value of x is not present in the graph of y=f(|x|). Rather, negative value of x is passed as positive value to the function. This means that negative value of independent variable x yields function value which is equal to function value obtained for corresponding positive x whose magnitude is same as that corresponding negative x. It implies that we can obtain function value for negative x by taking image of positive x across y-axis. This is image in y-axis.

From the point of construction of the graph of y=f(|x|), we need to modify the graph of y=f(x) as :

1 : remove left half of the graph

2 : take the mirror image of right half of the graph in y-axis

This completes the construction for y=f(|x|).

Example 1

Problem : Draw graph of y = sin | x | y = sin | x | .

Solution : First we draw graph of sinx. In order to obtain the graph of y=sin|x|, we remove left half of the graph and take the mirror image of right half of the graph of in y-axis.

Figure 1: Modulus operator applied to the argument of sine function.
Modulus operator applied to sine function
 Modulus operator applied to sine function  (mt1.gif)

Example 2

Problem : Draw graph of y = e | x + 1 | y = e | x + 1 | .

Solution : We first draw graph of y = e x y = e x . Then, we shift the graph left by 1 unit to obtain the graph of e x + 1 e x + 1 . At x = 0, y = e 0 + 1 = e x = 0, y = e 0 + 1 = e . In order to obtain the graph of y = e | x + 1 | y = e | x + 1 | , we remove left part of the graph and take the mirror image of right half of the graph of y = e x + 1 y = e x + 1 in y-axis.

Figure 2: Modulus operator applied to the argument of exponential function.
Modulus operator applied to exponential function
 Modulus operator applied to exponential function  (mt2.gif)

In order to obtain the graph of y = e | x + 1 | y = e | x + 1 | , we remove left part of the graph and take the mirror image of right half of the graph of y = e x + 1 y = e x + 1 in y-axis.

Example 3

Problem : Draw graph of y = x 2 2 | x | 3 y = x 2 2 | x | 3

Solution : The given expression f x = x 2 2 | x | 3 f x = x 2 2 | x | 3 is obtained by taking modulus of the independent variable of the corresponding quadratic polynomial in x as given here, f x = x 2 - 2 x - 3 f x = x 2 - 2 x - 3 . Hence, we first draw f x = x 2 - 2 x - 3 f x = x 2 - 2 x - 3 . The corresponding quadratic equation f x = x 2 - 2 x - 3 = 0 f x = x 2 - 2 x - 3 = 0 has real roots -1 and 3. The co-efficient of “ x 2 x 2 ” is positive. Hence, its plot is a parabola which opens upward and intersects x-axis at x=-1 and x=3.

In order to draw the graph of f x = | x | 2 2 | x | 3 = x 2 2 | x | 3 f x = | x | 2 2 | x | 3 = x 2 2 | x | 3 , we remove left half of the graph and take the mirror image of right half of the core graph of quadratic function in y-axis.

Figure 3: Modulus operator applied to the quadratic function.
Modulus operator applied to quadratic function
 Modulus operator applied to quadratic function  (mt3.gif)

Example 4

Problem : Draw graph of function defined as :

y = 1 | x | + 1 y = 1 | x | + 1

Solution : It is clear that we can obtain given function by applying modulus operator to the independent variable of function given here :

y = 1 x + 1 y = 1 x + 1

This function, in tern, can be obtained by applying shifting modification to the argument of the function given as :

y = 1 x y = 1 x

We, therefore, first draw f x = 1 / x f x = 1 / x . Then we draw g x = f x + 1 = 1 / x + 1 g x = f x + 1 = 1 / x + 1 by shifting the graph left by 1 unit. Finally, we draw h x = g | x | = 1 / | x | + 1 h x = g | x | = 1 / | x | + 1 by removing left half of the graph and taking mirror image of right half of the graph in y-axis. .

Figure 4: Modulus operator applied to the argument of rational function.
Modulus operator applied to rational function
 Modulus operator applied to rational function  (mt4a.gif)

Modulus function applied to the function

The form of transformation is depicted as :

y = f x y = | f x | y = f x y = | f x |

It can be seen that modulus operator here modifies the value of the function itself. In other words, it is like changing output of the function in accordance with nature of modulus function. The output of the function is now either zero or positive number. This has the implication that part of the graph y=f(x) corresponding to negative function values is not present in the graph of y=|f(x)|. Rather, negative function value of f(x) is converted to positive function value. This change in the sign of function takes place without changing magnitude of the value. It implies that we can obtain function values, which correspond to negative function value in y=f(x) by taking image of negative function values across x-axis. This is image in x-axis.

From the point of construction of the graph of y=|f(x)|, we need to modify the graph of y=f(x) as :

(i) take the mirror image of lower half of the graph in x-axis

(ii) remove lower half of the graph

This completes the construction for y=|f(x)|.

Example 5

Problem : Draw graph of y = | cos x | y = | cos x | .

Solution : We first draw the graph of y = cos x y = cos x . Then, we take the mirror image of lower half of the graph in x-axis and remove lower half of the graph to complete the construction of graph of y = | cos x | y = | cos x |

Figure 5: Modulus operator applied to cosine function.
Modulus operator applied to cosine function
 Modulus operator applied to cosine function  (mt5.gif)

Example 6

Problem : Draw graph of y = | x 2 2 x 3 | y = | x 2 2 x 3 |

Solution : We first draw graph y = x 2 2 x 3 y = x 2 2 x 3 . The roots of corresponding quadratic equation are -1 and 3. After plotting graph of quadratic function, we take the mirror image of lower half of the graph in x-axis and remove lower half of the graph to complete the construction of graph of y = | x 2 2 x 3 | y = | x 2 2 x 3 |

Figure 6: Modulus operator applied to quadratic function.
Modulus operator applied to quadratic function
 Modulus operator applied to quadratic function  (mt6.gif)

Example 7

Problem : Draw graph of y = | log 10 x | y = | log 10 x | .

Solution : We first draw graph y = log 10 x y = log 10 x . Then, we take the mirror image of lower half of the graph in x-axis and remove lower half of the graph to complete the construction of graph of y = | log 10 x | y = | log 10 x | .

Figure 7: Modulus operator applied to logarithmic function.
Modulus operator applied to logarithmic function
 Modulus operator applied to logarithmic function  (mt7.gif)

Modulus function applied to dependent variable

The form of transformation is depicted as :

y = f x | y | = f x y = f x | y | = f x

As discussed in the beginning of module, value of function is first calculated for a given value of x. The value so evaluated is assigned to the modulus function |y|. We interpret assignment to |y| in accordance with the interpretation of equality of the modulus function to a value. In this case, we know that :

| y | = f x ; f x > 0 y = ± f x | y | = f x ; f x > 0 y = ± f x

| y | = f x ; f x = 0 y = 0 | y | = f x ; f x = 0 y = 0

| y | = f x ; f x < 0 Modulus can not be equated to negative value. No solution | y | = f x ; f x < 0 Modulus can not be equated to negative value. No solution

Clearly, we need to neglect all negative values of f(x). For every positive value of f(x), there are two values of dependent expressions -f(x) and f(x). It means that we need to take image of upper part of the graph across x-axis. This is image in x-axis.

From the point of construction of the graph of |y|=f(x), we need to modify the graph of y=f(x) as :

1 : remove lower half of the graph

2 : take the mirror image of upper half of the graph in x-axis

This completes the construction for |y|=f(x).

Example 8

Problem : Draw graph of | y | = x 1 x 3 | y | = x 1 x 3 .

Solution : We first draw the graph of quadratic function given by y = x 1 x 3 y = x 1 x 3 . Then, we remove lower half of the graph and take mirror image of upper half of the graph in x-axis to complete the construction of graph of | y | = x 1 x 3 | y | = x 1 x 3 .

Figure 8: Modulus operator applied to dependent variable.
Modulus operator applied to dependent variable
 Modulus operator applied to dependent variable  (mt8.gif)

Example 9

Problem : Draw graph of | y | = tan - 1 x | y | = tan - 1 x .

Solution : We first draw the graph of function given by y = tan - 1 x y = tan - 1 x . Then, we remove lower half of the graph and take mirror image of upper half of the graph in x-axis to complete the construction of graph of y = tan - 1 x y = tan - 1 x .

Figure 9: Modulus operator applied to dependent variable.
Modulus operator applied to dependent variable
 Modulus operator applied to dependent variable  (mt9a.gif)

Modulus function applied to inverse function

The form of transformation is depicted as :

y = f x x = | f y | y = f x x = | f y |

The invertible function x= f(y) has its inverse function given by y=f⁻¹(x). Alternatively, if a function is defined as y=f⁻¹(x), then variables x and y are related to each other such that x=f(y). We conclude that graph of y=f⁻¹(x) is same as graph of x=f(y) with the same orientation of x and y axes. It is important to underline here that we transform (change) graph of inverse of given function i.e. y=f⁻¹(x) to get the transformation of graph of x=f(y). Further x and y coordinates on the graph correspond to x and y values.

We interpret assignment of |f(y)| to x in the given graph in accordance with the definition of modulus function. Consider x=|f(y)|. But, modulus can not be equated to negative value. Hence, x can not be negative. It means we need to discard left half of the graph of inverse function y=f⁻¹(x). On the other hand, modulus of negative or positive value is always positive. Hence, positive value of x=a correspond to two values of function in dependent variable, a=±f(y). Corresponding to these two function values in y, we have two values of y i.e. f⁻¹(a) and f⁻¹(-a). In order to plot two values, we need to take mirror image of the left half of the graph of y=f⁻¹(x) across y-axis. This is image in y-axis.

From the point of construction of the graph of x=|f(y)|, we need to modify the graph of y=f⁻¹(x) i.e. x=f(y) as :

1 : take mirror image of left half of the graph in y-axis

2 : remove left half of the graph

This completes the construction for x=|f(y)|.

Example 10

Problem : Draw graph of x = | cosec y | ; x { - π / 2, π / 2 } x = | cosec y | ; x { - π / 2, π / 2 } .

Solution : The inverse of base function is cosec⁻¹x. We first draw the graph of inverse function. Then, we take mirror image of left half of the graph in y-axis and remove left half of the graph to complete the construction of graph of x = | cosec y | x = | cosec y | .

Figure 10: Modulus operator applied to function in dependent variable.
Modulus operator applied to function in dependent variable
 Modulus operator applied to function in dependent variable  (mt10a.gif)

Examples

Example 11

Problem : Find domain of the function given by :

f x = 1 | sin x | + sin x f x = 1 | sin x | + sin x

Solution : The square root gives the condition :

| sin x | + sin x 0 | sin x | + sin x 0

But denominator can not be zero. Hence,

| sin x | + sin x > 0 | sin x | + sin x > 0

| sin x | > sin x | sin x | > sin x

We shall make use of graphing technique to evaluate the interval of x. Since both functions are periodic. It would be indicative of the domain if we confine our consideration to 1 period of sine function (0, 2π) and then extend the result subsequently to other periodic intervals.

We first draw sine function. To draw |sinx|, we take image of lower half in x-axis and remove the lower half. To draw “–sinx”, we take image of y=sinx in x-axis.

Figure 11: Domain of function is evaluated by comparing transformed graphs.
Domain of function
 Domain of function  (m11.gif)

From the graph, we see that |sinx| is greater than “-sinx” in (0,π). Note that end points are not included. The domain is written with general notation as :

x 2 n π , 2 n + 1 π x 2 n π , 2 n + 1 π

Example 12

Problem : Determine graphically the points where graphs of | y | = log e | x | | y | = log e | x | and x - 1 2 + y 2 4 = 0 x - 1 2 + y 2 4 = 0 intersect each other.

Solution : The function | y | = log e | x | | y | = log e | x | is obtained by transforming y = log e x y = log e x . To draw y = log e | x | y = log e | x | , we need to remove left half (but here there is no left half) and take image of right half in y-axis. To draw | y | = log e | x | | y | = log e | x | , we transform the graph of y = log e | x | y = log e | x | . For this, we remove the lower half and take image of upper half in x-axis.

On the other hand, x - 1 2 + y 2 4 = 0 x - 1 2 + y 2 4 = 0 is a circle with center at 1,0 having radius of 2 units. Finally, superposing two graphs, we determine the intersection points.

Figure 12: Intersection points are graphically determined.
Intersection points
 Intersection points  (m12.gif)

Clearly, there are three intersection points as shown by solid circles.

Exercises

Exercise 1

Draw the graph of function given by :

f x = 1 [ x ] 1 f x = 1 [ x ] 1

Hints : Draw 1/x, which is a hyperbola with center at (0,0). Then draw 1/x-1. It is a hyperbola shifted right by 1 unit. Its center is (1,0). Remove left half and take the image of right half in y-axis.

Solution

Figure 13: Transformed graph is shown.
Transformation by modulus operator
 Transformation by modulus operator  (m13.gif)

Exercise 2

2. Draw the graph of function given by :

f x = | | 1 x | 1 | f x = | | 1 x | 1 |

Hints : Draw 1/x, which is a hyperbola with center at (0,0). Then draw |1/x|. Take image of lower half in x-axis. Remove lower half. To draw |1/x|-1, shift down the graph of |1/x| by 1 unit. To draw ||1/x|-1|, Take image of lower half of the graph of |1/x|-1 in x-axis. Remove lower half.

Solution

Figure 14: Transformed graph is shown.
Transformation by modulus operator
 Transformation by modulus operator  (m14.gif)

Content actions

Download module as:

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks