4.9 The modulus function
The modulus function is a very happy function1414 14 Sorry.. This is because it’s always positive, and never takes on any negative values!
We can write it as . For example, all of these expressions are true
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 , the graph of 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!1515 15 Ok, I’ll stop, I promise. Using the quadratic formula to find the roots, we get that they are at and . Therefore, everything to the left of and to the right of needs to be reflected it the -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 (the input to the modulus function) is bigger than zero, we just return . If is smaller than zero, we multiply it by 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 1616 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 when we square , both and 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 . 1717 17 This question came from the OCR A June 2019 Single Maths Pure and Mechanics Paper
Solution: We can use the definition 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 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 , we can use the quadratic formula, and thus obtain an equation for the values of .
Subtracting a positive number from a positive number (note that 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 is and the larger value of is , 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).
(4.79) | |||
(4.80) | |||
(4.81) |
This is just a quadratic 1919 19 Review the section on hidden quadratics if you’re not sure what this is. TODO: write this section, and we can substitute to get that
(4.82) | |||
(4.83) |
We can sketch this graph to work out where the inequality is true 2020 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 error-prone method.
From the graph, the inequality is true whenever (i.e. is between the roots).
Thus we have . This means that both of these inequalities are true:
(4.84) | |||
(4.85) |
If we square both sides, we get that
(4.86) | |||
(4.87) |
Here’s a time to be careful; 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 times , and thus we need to flip the inequality.
Overall then we have these four inequalities.
(4.88) | |||
(4.89) | |||
(4.90) | |||
(4.91) |
Which can all be arranged to obtain that the following four inequalities must all be true for the inequality to hold
(4.92) | |||
(4.93) | |||
(4.94) | |||
(4.95) |
Examining these, it is clear that there are two regions in which this is true: and . This is the complete set of regions which satisfy the inequality. We can write it using set theory notation as
where denotes the "union" operator (which means that overall we have the set of objects in either , , 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 , 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 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 ), as we can just multiply both sides by to get from one to the other.
Thus solving Equation 4.101, we have
(4.103) | |||
(4.104) | |||
(4.105) | |||
(4.106) | |||
(4.107) |
And solving Equation 4.102 we have
(4.108) | |||
(4.109) | |||
(4.110) | |||
(4.111) | |||
(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 (that is, is a real number). Prove that .
We would like to show that 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 or . If these cases suspiciously mirror the definition2121 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 but only in specific cases, so we must proceed case-by-case to prove this in general).
We can begin with the first case - the one where . First, we can consider what we know about in this case, which is that . This is enough to prove the inequality as
As it is certainly less than or equal to the value of | (4.113) | ||||
Which is what we wanted to prove! | (4.114) |
We must then consider the other case, i.e. when in this case , that is , therefore in this case which implies that and thus that