# The Modulus of a function

The modulus of a function represents its positive value excluding the sign. If you’ve ever used a GPS, you may have noticed that the distance from your location to a destination is always a positive number. Behind the scenes, a modulus function is in operation, ensuring the distance remains positive despite any negative calculations along the way. Similarly, in a financial context, if you’re trying to determine the absolute change in a stock price, the modulus function helps depict the sheer magnitude of change, regardless of it being an increase or decrease. Thus, practical uses of the modulus function permeate various real-world scenarios, making it a crucial concept in mathematical computations and problem-solving.

To take the modulus of a function means to take the positive value of that function’s output. Of course, this means that if the function is positive, we do nothing. If it turns out that the value of the function is negative then the modulus is the corresponding positive. We denote the modulus of a function with straight lines, i.e. the modulus of the function is . We sometimes write this as – the absolute value of . Take the modulus of some scalar values, for example, but . It follows that the piecewise definition of the modulus of a function is given by

What does piecewise mean?Â See the Piecewise Definition Example to define the modulus of a linear function in a piecewise fashion. The piecewise definition can be particularly helpful when solving equations. See the other examples.

## Sketching the Modulus of a Function and Solving Equations

Consider the graph of . The piecewise definition of is given by:

It follows that the graph doesn’t change for positive but is reflected for negative . You can see this from the graph, is in dashed blue whereas is in solid red.

We can apply this process to the modulus of any function. All we need to do is sketch the original curve and reflect any negative parts across the -axis. We can then use this to solve equations (or inequalities – see example) that involve the modulus of a linear function.

Consider solving the equation . We can start by sketching the graph of (dashed purple), flipping any negative parts across the -axis to get (solid purple), then plotting it against (solid orange). There are two intersection points and so there are two solutions to the original equation. The piecewise definition of is . It follows that to find the right hand solution we need to solve , that is . To find the left hand solution, we solve or . Hence the solutions are and .

## Sketching |f(x)| and f(|x|)

Given the graph of a function , you should know how to sketch the graphs of and . We obtain the graph of by reflecting any part of graph that falls below the -axis across it. This is because any negative value is made positive. However, the graph of is not so straight forward. In this case, we make the -value positive first before we evaluate the function. This means that we reflect the right hand side of the graph across the -axis and we effectively delete the left hand side of the graph. Â See below for these two transformations.Â A question may also require you to sketch the original curve before performing the above transformations. See the Quadratic Example.

## Examples

### Piecewise Definition Example

Give the piecewise definition of the modulus of the function in its simplest form and sketch the graph of .

Solution:

Using the piecewise definition of the modulus of a function we have:

This simplifies to

We can sketch the curve from this or by reflecting the graph of across the -axis when it is negative:

### Inequality Example

Solve the inequality .

Solution:

Begin by sketching the curves of and on the same graph. This gives us an idea of where the curves intersect and so where the inequality holds.

The piecewise definition of is given by:

To find the intersection points we solve and . It follows that the intersection points are and respectively. The inequality is solved when (the red line) is above (the blue line). Hence, the solution is given by or .

Sketch the graph of . On separate graphs, sketch the curves of and .

Solution:

We can sketch the original quadratic by locating the roots and the -intercept. See more on sketching quadratics.

It follows that the graph of is:

and the graph of is:

## Extra Resources

### Questions by Topic

A2ModdingExamQuestions