CAS header


Find this content useful?
Think it should stay ad-free?

The modulus function

The modulus function

The modulus function (over the real numbers) returns the absolute value of a number. For example, $\left|-4.6\right| = 4.6$, $\left|5.9\right| = 5.9$. Given a variable $x$, then, the modulus function can be defined by $$\left|x\right| = \left\{\begin{array}{cc}x & x\geq 0 \\ -x & x\lt 0 \end{array}\right. $$

modulus functionThe graph of the function y = $|x|$ looks like a V, with the point at origin. Note that the point is not differentiable. That is, the derivative of $y= |x|$ doesn't exist at the origin. 

The modulus function is particularly useful in creating families of questions in which graphical approaches tend to be quicker than algebraic ones and consequently are often a feature of examinations. The general consensus is that they test understanding rather than just rigid algebraic algorithms!

Questions 1 - 3 below hopefully highlight some of the issues tested. Later topics in the algebra and functions chapter will highlight some of the more advanced applications of the modulus function.

The modulus function 1

On the same axes, sketch the graphs of $y = |x|$ and $y = 4 - 2x$ hence or otherwise solve the equation $$ |x| = 4 - 2x $$

solution - press button to display
intersection of modulus function and straight lineThis is a classic example in which effective representation of the gradients of the various lines is crucial. We see that $y = 4 - 2x$ has a gradient of $-2$ and so will never intersect the negative branch of the modulus function (that part corresponding to $x\lt 0$)

The solution lies on the positive branch of the modulus function, and so the x-value will be given by $$4-2x = +(x) \Rightarrow 4 = 3x \Rightarrow x = \frac{4}{3}$$

The modulus function 2

Solve the equation below. $$ |2x - 4| = |x+6| $$
solution - press button to display

two modulus functionsThe simplest method is to again sketch the graphs of the functions $y = |2x-4|$ and $y |x+6|$ on the same axes. This will present us with additional information to enable a simpler algebraic solution.

From the graph we can see that the solutions arise from the intersections of $|2x-4|$ with the positive branch of $|x+6|$.

It follows then that the solutions to the original equations are the solutions to $$ +(2x -4) = +(x+6),\;-(2x-4) = +(x+6) $$ Solving the first equation gives $x = 10$, the second gives $x = -\frac{2}{3}$

There exist algebraic techniques to directly solve the equations, but these can result in a number of false solutions that require elimination. To proceed in a purely algebraic manner, we assert that $|f(x)| = |g(x)| \Rightarrow (f(x))^2 = (g(x))^2$

In this case, we have a quadratic, $(2x-4)^2 = (x+6)^2 \Rightarrow 3x^2 - 28x -20 = 0$. In this case, this yields the same pair of solutions, $x = 10$ or $x = -\frac{2}{3}$