What the definition says
|x| = x if x ≥ 0, and −x if x < 0
The absolute value is defined by cases, a piecewise definition. Each row has a value and a condition,
and the condition decides which row to use for a given x. For a number that is zero or positive, |x| is
the number itself. For a negative number, |x| is −x, and −x is positive: the minus sign turns a negative
number into its opposite.
Worked examples
x = 4. 4 ≥ 0, so the first row: |4| = 4.
x = −3. −3 < 0, so the second row: |−3| = −(−3) = 3.
x = 0. 0 ≥ 0, so the first row: |0| = 0. The second row would give −0 = 0 as well, so the two
rows meet at zero without a jump.
x = 2 − 7. Work out the inside first: 2 − 7 = −5, which is negative, so |2 − 7| = −(−5) = 5.
The graph
The graph of y = |x| is the line y = −x to the left of the origin and the line y = x to the right. They
meet at (0, 0) in a corner, at the point where the row changes.
Common mistakes
- Reading −x as a negative number. When x is negative, −x is positive. The minus sign in the second
row changes the sign of x.
- Choosing the row by the look of the expression. The condition is about the value: |a − b| needs
a − b worked out, or compared with 0, before a row can be chosen.
The same function solved both ways, and the equation |x| = a with its two solutions, are on the page for
the absolute value.