Quick answer

|x| equals x when x ≥ 0, and −x when x < 0. The result is never negative.

Formula

  • |x| = distance from 0 on the number line
  • |x| ≥ 0 for every real x

Introduction

When a problem asks for magnitude without direction, you need absolute value. It turns signed numbers into plain lengths: the size of the number, not whether it lies left or right of zero.

You will see |x| in temperature differences, elevation changes, error margins, and coordinate problems long before advanced math. A clear definition now prevents sign mistakes later.

Use the Absolute Value Calculator on our home page to test any real number after you read the definition. When you want the formal notation next, continue with the absolute value formula guide.

Definition in context

On a number line, |−6| is 6 because −6 lies six units left of zero. |6| is also 6 because it lies six units to the right. Both inputs share the same distance from the origin even though their signs differ.

Zero is special: |0| = 0 because there is no distance to travel. Absolute value never returns a negative number. If your answer inside the bars is negative, recheck the sign rule.

Absolute value is not the same as "making a number positive" in every context. It measures distance. That distinction matters when you compare |x| with |a − b| in word problems about gaps between two locations.

Students often confuse "drop the minus sign" with "ignore negative meaning." The absolute value vs distance article explains when you measure from zero versus between two points.

Piecewise definition

  • |x| = x if x ≥ 0
  • |x| = −x if x &lt; 0
  • |x| ≥ 0 for every real x

Some courses also write |x| = √(x²). All forms describe the same non-negative distance. Pick the version your textbook uses and stay consistent on homework.

The piecewise rule is the bridge to algebra: later you split |expression| into cases when you solve equations. Understanding the two branches now makes that work feel familiar instead of new.

For a repeatable calculation routine after you know the definition, follow the same sign check on every problem: flip negative inputs, keep non-negative inputs, and verify on a number line when time allows.

Step-by-step

  1. Identify x. Write the number inside the vertical bars. If the expression has operations inside, simplify those first unless your teacher says otherwise.
  2. Check the sign. Non-negative inputs stay as they are. Negative inputs flip: |−7| = 7. Zero stays zero.
  3. Report |x|. State the non-negative result with correct notation. Say "|−7| = 7," not "|−7| = −7."
  4. Sanity-check on a number line. Count units from zero. The count should match your answer.

Worked examples

For x = −4.5, |−4.5| = 4.5 because −4.5 is 4.5 units from zero.

For x = 0.003, |0.003| = 0.003 because the value is already non-negative. Small decimals follow the same rule as large integers.

For x = −2/3, |−2/3| = 2/3. Fractions do not change the rule; only the sign of the input matters.