Hersi Maths WhatsApp me

Understand · explore · practise

The modulus function

Understand the modulus (absolute value) function, sketch |ax + b| and solve basic modulus equations. Move the graph yourself and practise with worked solutions.

Before you startNegative numbers, straight-line graphs and solving linear equations

01 / What modulus means

Distance has no negative direction.

The modulus of a real number is its distance from zero on a number line. We write it using vertical bars. Both −6 and 6 are six units from zero, so |−6| = |6| = 6. Also |0| = 0: modulus is nonnegative, not necessarily positive.

|u| = u when u ≥ 0
|u| = −u when u < 0

For a negative u, the expression −u is positive. For example, if u = −6 then −u = 6.

The bars enclose the whole input to the modulus operation, called its argument. Work out that argument first. A minus sign outside the bars is a separate operation.

The placement of the bars mattersWorked example

|4 − 9| = |−5| = 5

Subtract first, then find the distance from zero.

|4| − |9| = 4 − 9 = −5

This is a different expression: two moduli followed by subtraction.

−|4 − 9| = −5

The outer minus remains after evaluating the modulus.

02 / Evaluate a function

Substitute, simplify inside, then take the modulus.

Let f(x) = |2x − 2|. The domain is every real number. Every output is at least zero, and every nonnegative output is possible, so its range is [0, ∞).

Three inputs, two outputsWorked example

f(−1) = |2(−1) − 2|
= |−4| = 4

Keep the negative input in brackets when substituting.

f(1) = |2 − 2| = 0

The argument is zero at x = 1.

f(3) = |6 − 2| = 4

Two different inputs can produce the same output. This is still a function.

03 / Reflect the graph

Negative outputs move above the axis; inputs stay put.

Start with y = 2x − 2. Where the line is already on or above the x-axis, taking modulus leaves its output unchanged. Where it is below the axis, replace the negative output with its positive opposite.

(x, y) → (x, |y|)

The vertex is (1, 0), where the original line crosses the x-axis. The y-intercept is (0, 2). Both arms continue upward without a maximum. The model only shows a finite window of the graph.

Move the input through x = 1. Below 1, the original negative output is reflected; above 1, the two points coincide. This is an output change, not a reflection of the entire original line.

Same input, nonnegative outputExplore
Reflect the negative part of y = 2x − 2The dashed line is y = 2x − 2. The solid V is y = |2x − 2|, with vertex (1, 0). At input −1, the original output −4 is reflected to 4.−20124xy48−4−8

Dashed gold: y = 2x − 2. Solid green: y = |2x − 2|. The vertical guide joins the two outputs at the same input.

x = −1: 2x − 2 = −4, so |2x − 2| = 4.

The original output is negative, so reflect it across the x-axis. The x-coordinate stays the same.

Watch the negative line segment reflect

Pause, replay or seek freely. The notes explain the same idea and stay in view.

04 / Two straight pieces

Use the sign of the argument to choose the rule.

The expression inside the bars, 2x − 2, changes sign at x = 1. Therefore the same graph can be described without modulus bars:

|2x − 2| = 2 − 2x for x < 1
|2x − 2| = 2x − 2 for x ≥ 1

The left arm has slope −2 and the right arm has slope 2. At x = 1 both formulas give zero, so the pieces meet. We include the boundary in just one piece to make the rule easy to read.

Why not replace every x by |x|?

That would form |2x| − 2 or 2|x| − 2, a different function. For example, at x = 0 our original function gives 2, but 2|0| − 2 gives −2. The bars apply to the entire argument 2x − 2.

05 / Any linear argument

Find the zero before drawing the V.

For f(x) = |ax + b| with a ≠ 0, the argument is zero at x = −b/a. The vertex is (−b/a, 0), the y-intercept is (0, |b|), and the range is [0, ∞).

|ax + b| = |a| |x + b/a|

The left arm has slope −|a| and the right arm has slope |a|, even if a is negative. If a = 0, the function is instead the horizontal line y = |b|, with a single-value range; there is no V-shaped vertex.

Sketch y = |5 − x|Worked example

5 − x = 0 ⇒ x = 5

Vertex: (5, 0). The y-intercept is (0, 5).

For x ≤ 5: y = 5 − x
For x > 5: y = x − 5

The descending original line is reflected only after it goes below the x-axis.

Domain: all real x
Range: y ≥ 0

Use the slopes −1 and +1 to complete the sketch.

06 / Basic equations

A distance can point in either direction.

For c > 0, the equation |u| = c means u = c or u = −c. For c = 0, only u = 0 works. For c < 0, there is no real solution. These facts do not require guessing from a drawing.

Solve |4x + 1| = 7Worked example

4x + 1 = 7
or 4x + 1 = −7

The two allowed argument values are 7 and −7.

x = 3/2 or x = −2

Check: |4(3/2) + 1| = 7 and |4(−2) + 1| = 7.

|4x + 1| = 0 ⇒ x = −1/4

A horizontal line at height zero meets the vertex once.

|4x + 1| = −7: no real solution

A modulus cannot equal a negative number.

07 / Your turn

Explain the sign choice as well as the answer.

Attempt these without opening the solution. Label vertices and intercepts on sketches; give both roots when a positive distance permits them.

01 · Inside and outside

Evaluate (a) |3 − 11|, (b) −|3 − 11|, (c) |3| − |11| and (d) ||−8| − 5|.

Hint

For nested bars, begin with the innermost pair.

Worked solution

(a) |−8| = 8. (b) −8. (c) 3 − 11 = −8. (d) |8 − 5| = 3.

02 · Evaluate a shifted function

For g(x) = |3x + 2| − 4, find g(−2), g(0) and g(2).

Hint

The subtraction of 4 happens after the modulus.

Worked solution

g(−2) = |−4| − 4 = 0. g(0) = |2| − 4 = −2. g(2) = |8| − 4 = 4. A negative output is possible because of the outer subtraction.

03 · Negative coefficient

Sketch y = |6 − 2x|, giving its vertex, y-intercept, range and two linear rules.

Hint

The argument changes sign at x = 3.

Worked solution

Vertex (3, 0), y-intercept (0, 6), range y ≥ 0. For x ≤ 3 use 6 − 2x; for x > 3 use 2x − 6. The arms have slopes −2 and +2.

04 · Two roots

Solve |3x − 4| = 8.

Hint

Solve 3x − 4 = 8 and 3x − 4 = −8.

Worked solution

The first equation gives x = 4; the second gives x = −4/3. Both give modulus 8 in the original equation.

05 · Count before calculating

How many real solutions does |5x + 2| = c have when (a) c = −1, (b) c = 0 and (c) c = 3? Find any solutions.

Hint

The graph is a V with minimum height zero.

Worked solution

(a) None. (b) One: x = −2/5. (c) Two: 5x + 2 = ±3 gives x = 1/5 or x = −1.

06 · A false identity

Is |a + b| = |a| + |b| always true? Give a counterexample and one case in which it is true.

Hint

Try numbers with opposite signs first.

Worked solution

With a = −4 and b = 7, the left side is 3 and the right side is 11. With a = 2 and b = 7, both sides are 9. One counterexample disproves the universal claim.

07 · Distance from a point

Explain |x − 4| = 3 using a number line, then solve it.

Hint

|x − 4| is the distance between x and 4.

Worked solution

The input is three units from 4, either to its left or right. Thus x = 1 or x = 7. Algebraically, x − 4 = −3 or 3.

08 · Constant special case

Describe f(x) = |0x − 9| and solve f(x) = 9.

Hint

The argument no longer depends on x.

Worked solution

f(x) = 9 for every real x. The graph is horizontal, its range is {9}, and every real x solves f(x) = 9. The usual two-root claim for |ax + b| = c > 0 assumes a ≠ 0.

08 / Recap

Track what the bars enclose.

  • Modulus is distance from zero: nonnegative, including zero.
  • Evaluate the entire argument before taking its modulus.
  • Reflect negative outputs across the x-axis and leave other outputs unchanged.
  • For a nonconstant linear argument, its zero locates the vertex.
  • For a positive target, solve both signed equations and check the results.

Back to functions and graphs →

Section 1 of 8 · What modulus means