Compute the absolute value of any real number, understand the geometric interpretation as distance from zero, and explore step‑by‑step reasoning. Perfect for algebra, precalculus, and real‑world problem solving.
The absolute value of a real number x, denoted |x|, is the non‑negative magnitude of x without regard to its sign. Geometrically, it represents the distance from x to the origin (0) on the real number line. Formally: |x| = x if x ≥ 0, and |x| = –x if x < 0. This simple definition underpins countless areas of mathematics, from solving equations and inequalities to defining metrics in higher dimensions.
|x| = \begin{cases} x, & \text{if } x \ge 0 \\ -x, & \text{if } x < 0 \end{cases}
For any real number, |x| ≥ 0, and |x| = 0 if and only if x = 0.
The concept of absolute value emerged gradually. Early mathematicians treated numbers as directed magnitudes, but the modern notation |x| was introduced by Karl Weierstrass in the mid‑19th century. The term "absolute value" was popularized by mathematicians such as Otto Hölder and Jean-Robert Argand. Today, absolute value is a cornerstone of real analysis, complex analysis (where it becomes modulus), and metric spaces. It also appears in the definition of limits, continuity, and the triangle inequality: |a + b| ≤ |a| + |b|.
Given x ∈ ℝ, the absolute value can be computed via the square root of x²: |x| = √(x²). However, the piecewise definition is more direct. Important algebraic properties include:
These properties are used extensively in real analysis, approximation theory, and optimization.
| Field | Application | Example |
|---|---|---|
| Physics & Engineering | Magnitude of displacement, error analysis, tolerance bands | Measurement error: |measured – actual| ≤ tolerance |
| Computer Science | Distance metrics (Manhattan distance), absolute difference in algorithms | abs() function in C, Python, JavaScript |
| Finance | Absolute return, deviation from forecast | |actual revenue – projected revenue| |
| Statistics | Mean absolute deviation (MAD), robust estimators | MAD = (1/n) Σ|xᵢ – μ| |
| Everyday Life | Temperature difference, distance between locations, time delays | |–5°C – 3°C| = 8°C temperature swing |
A manufacturing plant measures the diameter of produced bolts. The target diameter is 12.00 mm. A sample yields measurements: 11.95, 12.02, 12.00, 11.98, 12.05 mm. Instead of averaging signed errors (which cancel out), engineers compute the mean absolute deviation: (|–0.05|+|0.02|+|0.00|+|–0.02|+|0.05|)/5 = 0.028 mm. This provides a clear, non‑negative measure of process precision. Our calculator helps students and professionals quickly verify such computations and see distances from a reference point.
The dynamic canvas above draws a real number line with a clear origin (0). The entered value x is plotted as a red point, and the blue segment connects the origin to x, representing the distance |x|. The canvas automatically adjusts the view to keep the point in context – scaling based on the absolute value to guarantee both visibility and mathematical accuracy.