March 28, 20265 min read

Absolute Value Calculator — |x| Properties, Equations & Distance

Calculate absolute values and solve equations with |x|. Covers the definition, distance interpretation, properties, solving |ax+b| = c type equations, and graphing basics.

absolute value math equations number line calchub
Ad 336x280

The absolute value of a number is its distance from zero — always non-negative, regardless of sign. It's a deceptively simple concept that becomes the foundation of error analysis, vector magnitudes, and the definition of distance itself. Calculate and solve absolute value expressions with CalcHub.

Definition

$$|x| = \begin{cases} x & \text{if } x \geq 0 \\ -x & \text{if } x < 0 \end{cases}$$

Examples:
  • |7| = 7
  • |−5| = 5
  • |0| = 0
  • |−3.14| = 3.14
  • |3 − 8| = |−5| = 5

Geometric Interpretation: Distance on a Number Line

|a − b| = the distance between a and b on the number line.

|7 − 3| = 4 → the numbers 7 and 3 are 4 units apart ✓
|−4 − 2| = |−6| = 6 → the numbers −4 and 2 are 6 units apart ✓

This is why the distance formula is built on squared differences (which are always positive): (x₂−x₁)² = |x₂−x₁|².

Properties of Absolute Value

PropertyFormulaExample
Non-negativity\x\≥ 0\−5\= 5 ≥ 0
Identity\x\= 0 ↔ x = 0Only zero hasx= 0
Multiplication\ab\= \a\·\b\\3·(−4)\= 12
Division\a/b\= \a\/\b\\−8/2\= 4
Triangle inequality\a+b\≤ \a\+\b\\3+(−5)\= 2 ≤ 8
Even function\−x\= \x\\−7\= \7\= 7
Power\x²\= x²Always true (x² ≥ 0)
The triangle inequality is particularly important — it says the length of any side of a triangle cannot exceed the sum of the other two sides.

Solving Absolute Value Equations

Type 1: |x| = k (where k ≥ 0)

Split into two cases: x = k or x = −k Solve |x − 3| = 5: x − 3 = 5 → x = 8 x − 3 = −5 → x = −2 Solutions: x = 8 and x = −2

Check: |8−3| = |5| = 5 ✓ and |−2−3| = |−5| = 5 ✓

Type 2: |2x + 1| = 7

2x + 1 = 7 → x = 3 2x + 1 = −7 → x = −4 Solutions: x = 3 and x = −4

Type 3: |x| = negative number

No solution. Absolute value is always ≥ 0, so |x| = −3 has no solution.

Type 4: |x − 2| = |x + 4|

Two cases: Case 1: x − 2 = x + 4 → −2 = 4 (impossible) Case 2: x − 2 = −(x + 4) → x − 2 = −x − 4 → 2x = −2 → x = −1 Solution: x = −1

Absolute Value Inequalities

InequalityEquivalent formGraph
\x\< k−k < x < kBounded interval
\x\> kx < −k or x > kTwo rays outward
\x − a\< ra−r < x < a+rInterval centered at a
Solve |x − 5| < 3: −3 < x − 5 < 3 2 < x < 8 Solution: x ∈ (2, 8)

Applications

Error and Tolerance: |measured − actual| < 0.01 means the error is within 0.01 of the actual value. This is the standard form for specifying tolerances in engineering. Average Deviation: Mean Absolute Deviation (MAD) = (1/n) Σ|xᵢ − x̄| — a robust measure of spread that's less sensitive to outliers than variance. Norm of a vector: |v| = √(v₁² + v₂² + v₃²) — the length (magnitude) of a vector is its "absolute value" in multiple dimensions.

Is absolute value the same as magnitude?

For real numbers, yes — |x| is the magnitude of x on the number line. For complex numbers z = a + bi, the magnitude is |z| = √(a²+b²), which is the distance from the origin in the complex plane. For vectors, the magnitude (length) is the Euclidean norm — the square root of the sum of squared components.

Can you have |x| inside a derivative?

Yes, but carefully. d/dx|x| = 1 for x > 0, and −1 for x < 0. The derivative is undefined at x = 0 because there's a sharp corner. This non-differentiability at zero is why absolute value appears in many robust optimization problems (L1 regularization in machine learning) — the kink at zero promotes sparsity.

How do you remove the absolute value from an expression algebraically?

Replace |f(x)| with f(x) when f(x) ≥ 0 and with −f(x) when f(x) < 0. This case-split approach works for any expression inside absolute value bars. For equations and inequalities, this is how you solve them systematically.

Ad 728x90