4.9 The modulus function
The modulus function is a very happy function^{14}^{14} 14 Sorry.. This is because it’s always positive, and never takes on any negative values!
We can write it as $\left\lvert x\right\rvert$. For example, all of these expressions are true
$\displaystyle\left\lvert 12\right\rvert=12$  
$\displaystyle\left\lvert12\right\rvert=12$  
$\displaystyle\left\lvert 126\right\rvert=\left\lvert 612\right\rvert$  
$\displaystyle\left\lvertx\right\rvert=x$ 
4.9.1 Graphically
When graphing a value inside a modulus function, it is often helpful to first sketch the function without the modulus. For example, when graphing $y=\left\lvert\left(x5\right)^{2}+1\right\rvert$, the graph of $y=2x8$ would look like this:
As the modulus function must never be unhappy (i.e. take a negative value), we need to turn that frown upside down!^{15}^{15} 15 Ok, I’ll stop, I promise. Using the quadratic formula to find the roots, we get that they are at $x=4$ and $x=6$. Therefore, everything to the left of $4$ and to the right of $5$ needs to be reflected it the $x$axis.
4.9.2 As a function
One way to define the modulus function is, well, as a function. As the function always needs to be positive, we can write that
What this means is that in the case where $x$ (the input to the modulus function) is bigger than zero, we just return $x$. If $x$ is smaller than zero, we multiply it by $1$ in order to make it positive.
4.9.3 Algebraically
To write the modulus function as an algebraic expression, we’re interested in functions which are always positive. The one which (probably?) springs to mind is squaring. Using this, we can define the modulus function as ^{16}^{16} 16 Note that this is just the square root of the magnitude. It is also important to never give into the temptation to say ”oh this is just the square root of a square number, it’s just the original number.” This is wrong. In the expression $\sqrt{x^{2}}$ when we square $x$, both $x$ and $x$ are mapped to the same value, so stating that the square root of the square is just the original value is not true for negative numbers.
This is really helpful for solving some equations.
4.9.4 Some examples
Example 4.9.1
Find the complete set of values satisfying the equation $\left\lvert x2\right\rvert\leqq\left\lvert 2x6\right\rvert$. ^{17}^{17} 17 This question came from the OCR A June 2019 Single Maths Pure and Mechanics Paper
Solution: We can use the definition $\left\lvert x\right\rvert=\sqrt{x^{2}}$ to rewrite the inequality above as
Squaring both sides gives the following result
which can then be expanded to give
and then, being careful not to subtract anything incorrectly (which I always do) the equation can be reduced to this quadratic
We can then sketch this to work out when it would be greater than zero (or zero would be less than the curve).
From the graph, the inequality is true whenever $x$ is less than the first time it is zero, and whenever the inequality is greater than the second time it is zero. To find when $3x^{2}20x+32=0$, we can use the quadratic formula, and thus obtain an equation for the values of $x$.
Subtracting a positive number from a positive number (note that $\sqrt{20^{2}4(3)(32)}$ is a positive number) gives a smaller value than adding something to a positive number. Therefore, we can deduce (with aid from a calculator) that the smaller value of $x$ is $\frac{3}{8}$ and the larger value of $x$ is $4$, leaving us with two regions in which the inequality is satisfied.
A slightly harder example: Find the complete set of values satisfying the inequality
Solution: This question is a bit fiddly. The first step is to square both sides (which is fine, because the values we’re taking square roots of are always positive).
$\displaystyle(\left\lvert x1\right\rvert5)^{2}<3^{2}$  (4.79)  
$\displaystyle(x1)^{2}10\sqrt{(x1)^{2}}+25<9$  (4.80)  
$\displaystyle(x1)^{2}10\sqrt{(x1)^{2}}+16<0$  (4.81) 
This is just a quadratic ^{19}^{19} 19 Review the section on hidden quadratics if you’re not sure what this is. TODO: write this section, and we can substitute $z=\sqrt{(x1)^{2}}$ to get that
$\displaystyle z^{2}10z+16<0$  (4.82)  
$\displaystyle(z8)(z2)<0$  (4.83) 
We can sketch this graph to work out where the inequality is true ^{20}^{20} 20 The other way to do this is to think about where one of the brackets is positive, and the other negative, but in my experience it’s a more errorprone method.
From the graph, the inequality is true whenever $2<z<8$ (i.e. $z$ is between the roots).
Thus we have $2<\sqrt{(x1)^{2}}<8$. This means that both of these inequalities are true:
$\displaystyle\sqrt{(x1)^{2}}<8$  (4.84)  
$\displaystyle\sqrt{(x1)^{2}}>2$  (4.85) 
If we square both sides, we get that
$\displaystyle(x1)^{2}<64$  (4.86)  
$\displaystyle(x1)^{2}>4$  (4.87) 
Here’s a time to be careful; $(x1)^{2}$ is always positive. When we take the square root, however, we can have either the positive or negative square root. Note that the negative square root is just $1$ times $\sqrt{\text{whatever}}$, and thus we need to flip the inequality.
Overall then we have these four inequalities.
$\displaystyle x1<8$  (4.88)  
$\displaystyle x1>8$  (4.89)  
$\displaystyle x1>2$  (4.90)  
$\displaystyle x1<2$  (4.91) 
Which can all be arranged to obtain that the following four inequalities must all be true for the inequality to hold
$\displaystyle x<9$  (4.92)  
$\displaystyle x>7$  (4.93)  
$\displaystyle x>3$  (4.94)  
$\displaystyle x<1$  (4.95) 
Examining these, it is clear that there are two regions in which this is true: $7<x<1$ and $3<x<9$. This is the complete set of regions which satisfy the inequality. We can write it using set theory notation as
where $\cup$ denotes the "union" operator (which means that overall we have the set of objects in either $\left\{7<x<1\right\}$, $\left\{3<x<9\right\}$, or in both of them  which in this case is nothing, as the two ranges don’t overlap).
Example 4.9.2
Solve the equation
Solution: this can be solved by using the fact that $\left\lvert x\right\rvert=\sqrt{x^{2}}$, but the numbers are not nice, and I made so many arithmetic errors (it was painful). The other way is to think about the definition of the modulus function.
Instead, we can think about the definition of the modulus function. For each side of the equation we have
Thinking about the cases, the graphs can intersect either

•
Where the argument to the modulus function is less than zero, and thus has been multiplied by negative one, for both functions.

•
Where the argument of one of the functions is less than zero, and the other is greater than zero.

•
Where the argument of both functions is greater than zero.
In the first case, the values of $t$ where the two curves intersect would be when
this is just the same as
Which is the same equation as for case three.
The only other case is when
Note that it doesn’t matter which one is less than zero (and has thus been multiplied by $1$), as we can just multiply both sides by $1$ to get from one to the other.
Thus solving Equation 4.101, we have
$\displaystyle\frac{1}{9}\left(8t9\right)=\frac{1}{3}(2t11)$  (4.103)  
$\displaystyle 8t9=3(2t11)$  (4.104)  
$\displaystyle 8t9=6t33$  (4.105)  
$\displaystyle 2t=24$  (4.106)  
$\displaystyle t=12$  (4.107) 
And solving Equation 4.102 we have
$\displaystyle\frac{1}{9}\left(8t9\right)=\frac{1}{3}(2t11)$  (4.108)  
$\displaystyle(8t9)=3(2t11)$  (4.109)  
$\displaystyle8t+9=6t33$  (4.110)  
$\displaystyle14t=42$  (4.111)  
$\displaystyle t=3$  (4.112) 
4.9.5 Proof that a value is not greater than its modulus
This is not the most exciting proof, but it helps to illustrate a general principle when proving things about the modulus function: consider the positive and negative cases separately.
Example 4.9.3
Let $a\in\mathbb{R}$ (that is, $a$ is a real number). Prove that $a\leqqa$.
We would like to show that $a$ is less than or equal to its modulus. Here we can find two exhaustive cases by the law of the excluded middle (see Section 23.4 for details, but it just means that \sayeither something is true, or it is false), that is that either $a\geqq 0$ or $a<0$. If these cases suspiciously mirror the definition^{21}^{21} 21 See Section 4.9.2 if you can’t remember the definition. of the modulus function, that’s because they do.
Why are these cases useful? Because they allow us to assume more about the structure of the modulus function. This comes at a cost  that we have lost generality (that is, we now know more about $a$ but only in specific cases, so we must proceed casebycase to prove this in general).
We can begin with the first case  the one where $a\geqq 0$. First, we can consider what we know about $a$ in this case, which is that $a=a$. This is enough to prove the inequality as
$\displaystyle a$  $\displaystyle\leqq a$  As $a=a$ it is certainly less than or equal to the value of $a$  (4.113)  
$\displaystyle=a$  Which is what we wanted to prove!  (4.114) 
We must then consider the other case, i.e. when $a<0$ in this case $a=a$, that is $a>0$, therefore in this case $a<0<a$ which implies that $a<a$ and thus that $a\leqqa$