Mathematics Learning Centre
Absolute values
Jackie Nicholas
Jacquie Hargreaves
Janet Hunter
2006
c University of Sydney
Mathematics Learning Centre, University of Sydney 1
1 The absolute value function
Before we define the absolute value function we will review the definition of the absolute
value of a number.
The Absolute value of a number x is written |x| and is defined as
|x| = x if x ≥ 0 or |x| = −x if x < 0.
That is, |4| = 4 since 4 is positive, but | − 2| = 2 since −2 is negative.
We can also think of |x| geometrically as the distance of x from 0 on the number line.
|–2|=2 |4|=4
–2 0 4
More generally, |x − a| can be thought of as the distance of x from a on the numberline.
| a – x | = |x – a |
a x
Note that |a − x| = |x − a|.
The absolute value function is written as y = |x|.
We define this function as
⎧
⎪
⎨ +x if x ≥ 0
y=⎪
⎩ −x if x < 0
From this definition we can graph the function by taking each part separately. The graph
of y = |x| is given below.
y
2
y = –x x<0 1 y=x x≥0
x
–2 –1 0 1 2
The graph of y = |x|.
Mathematics Learning Centre, University of Sydney 2
Example
Sketch the graph of y = |x − 2|.
Solution
For y = |x − 2| we have
⎧
⎪
⎨ +(x − 2) when x − 2 ≥ 0 or x≥2
y=
⎪
⎩ −(x − 2) when x − 2 < 0 or x<2
That is,
⎧
⎪
⎨ x−2 for x ≥ 2
y=
⎪
⎩ −x + 2 for x < 2
Hence we can draw the graph in two parts.
y
2
1
y = –x + 2 x < 2 y=x–2 x≥2
x
0 1 2 3 4
The graph of y = |x − 2|.
We could have sketched this graph by first of all sketching the graph of y = x − 2 and
then reflecting the negative part in the x-axis.
Example
Find the values of x for which |x + 3| = 6.
Mathematics Learning Centre, University of Sydney 3
Solution
First of all note that
⎧
⎪
⎨ +(x + 3) when x + 3 ≥ 0 or x ≥ −3
|x + 3| =
⎪
⎩ −(x + 3) when x + 3 < 0 or x < −3.
Taking each of these separately.
When x ≤ −3, |x + 3| = −x − 3 = 6, so x = −9.
When x ≥ −3, |x + 3| = x + 3 = 6, so x = 3.
Therefore |x + 3| = 6 when x = −9 or x = 3. You can check this by substitution.
Example
For what values of x is |x − 4| = |2x − 1|.
Solution
We know that the values x = 12 and x = 4 are important x values here, so we will use
them to divide the x axis into three sections and will consider them in turn.
Case 1. For x < 12 , |x − 4| = −(x − 4) = |2x − 1| = −(2x − 1), so −x + 4 = −2x + 1.
Therefore, x = −3.
Case 2. For 1
2
≤ x < 4, |x − 4| = −(x − 4) = |2x − 1| = 2x − 1, so −x + 4 = 2x − 1.
Therefore, x = 53 .
Case 3. For x ≥ 4, |x − 4| = x − 4 = |2x − 1| = 2x − 1, so x − 4 = 2x − 1.
Therefore, x = −3, but this does not satisfy the assumption x ≥ 4 so this case does not
give us a solution.
The solutions are x = −3 and x = 53 .