Skip to content
LoveToCalc

Definition — what does that mean?

Absolute value, the definition

Two rows, each with a condition: the sign of x decides which one applies.

In Swedish: Absolutbelopp, definitionen

Absolute value, the definition

The relation

|x|=x,x≥0−x,x<0

The absolute value is defined in two rows: |x| is x when x is 0 or positive, and −x when x is negative.

|x|=3

|x| equals −3 if −3 is at least 0, minus (−3) if −3 is less than 0, −3 is less than 0, so the second row, equals minus (−3), equals 3

Working3 steps

Practice questions

You are given

  • x=-12

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

The same function solved both ways, and the equation |x| = a with its two solutions, are on the page for the absolute value.

Looking for another letter? The formula solved for each one
Solved for each letter
Solve forRearrangedWith the numbersComes to
|x|x,x≥0−x,x<0−3,−3≥0−(−3),−3<03

Last reviewed October 12, 2026 ·How pages are reviewed

ArithmeticAll formulas

Put this formula on your site

Copy the code into your page where the formula card should appear. It loads from lovetocalc.com, so it stays current on its own — all we ask is that the credit line comes with it.