Absolute Value Calculator
Solve absolute value problems step-by-step with our free calculator. See formulas, worked examples, and clear explanations.
Formula
|x| = x if x >= 0, |x| = -x if x < 0
The absolute value of x equals x when x is non-negative, and equals -x (the negation) when x is negative. Equivalently, |x| = sqrt(x^2). It represents the distance of x from zero on the number line.
Worked Examples
Example 1: Absolute Value of a Negative Number
Problem: Find the absolute value of -7.5 and verify using the squared root method.
Solution: Direct method: |-7.5| = 7.5 (remove the negative sign)\nSquare root method: (-7.5)^2 = 56.25, sqrt(56.25) = 7.5\nDistance from zero: 7.5 units on the number line\nSign: -1 (negative input)\nReciprocal of |x|: 1/7.5 = 0.1333...
Result: |-7.5| = 7.5 | Distance from zero: 7.5 | Sign: -1
Example 2: Comparing Absolute Values
Problem: Compare |12.3| and |-15.8|. Which number is farther from zero?
Solution: |12.3| = 12.3 (positive, unchanged)\n|-15.8| = 15.8 (negative sign removed)\nComparing: 15.8 > 12.3\nSo -15.8 is farther from zero than 12.3\nDifference in distances: |15.8 - 12.3| = 3.5\nThe number -15.8 is 3.5 units farther from the origin.
Result: |-15.8| = 15.8 > |12.3| = 12.3 | -15.8 is farther from zero by 3.5
Frequently Asked Questions
What is absolute value and what does it represent?
Absolute value is a mathematical function that returns the non-negative magnitude of a real number, regardless of its sign. It represents the distance of a number from zero on the number line, which is always positive or zero. The absolute value of a positive number is the number itself, the absolute value of a negative number is its positive counterpart, and the absolute value of zero is zero. Written as |x|, examples include |5| = 5, |-5| = 5, and |0| = 0. This concept is fundamental to mathematics because it provides a way to measure magnitude without regard to direction. In real-world terms, if you walk 5 steps forward or 5 steps backward, the absolute distance traveled is 5 steps either way.
How is absolute value formally defined in mathematics?
Absolute value has a precise piecewise definition: |x| = x when x is greater than or equal to 0, and |x| = -x when x is less than 0. This means for negative numbers, the absolute value negates them (making them positive), while positive numbers and zero remain unchanged. An equivalent definition uses the square root of the square: |x| = sqrt(x squared), which always produces a non-negative result. In the context of complex numbers, absolute value (called modulus) is defined as |a + bi| = sqrt(a squared + b squared), measuring the distance from the origin in the complex plane. The formal properties include: |x| is always greater than or equal to 0, |x| = 0 only when x = 0, |xy| = |x| times |y|, and the triangle inequality |x + y| is less than or equal to |x| + |y|.
What are the key properties of absolute value?
Absolute value has several important mathematical properties. Non-negativity: |x| is always greater than or equal to zero. Identity of indiscernibles: |x| = 0 if and only if x = 0. Symmetry: |-x| = |x|, meaning a number and its negative have the same absolute value. Multiplicativity: |xy| = |x| times |y|, the absolute value of a product equals the product of absolute values. Triangle inequality: |x + y| is less than or equal to |x| + |y|, which is crucial in analysis and metric spaces. Idempotency: ||x|| = |x|, taking absolute value twice gives the same result as once. Preservation of division: |x/y| = |x| / |y| when y is not zero. These properties form the foundation for distance metrics and norm theory in higher mathematics.
How do you solve equations involving absolute value?
To solve absolute value equations like |x - a| = b, you create two separate equations: x - a = b and x - a = -b, then solve each. For example, |x - 3| = 5 gives x - 3 = 5 (so x = 8) and x - 3 = -5 (so x = -2). The solution set is {-2, 8}. For inequalities, |x - a| < b means -b < x - a < b (values close to a), while |x - a| > b means x - a < -b or x - a > b (values far from a). Important: if b is negative, |x| = b has no solution since absolute values cannot be negative. For more complex equations like |2x + 1| = |x - 3|, you can square both sides to eliminate the absolute values: (2x + 1) squared = (x - 3) squared, then solve the resulting polynomial equation.
What is the relationship between absolute value and distance?
Absolute value is fundamentally a distance measure. The expression |a - b| gives the distance between two points a and b on the number line, regardless of which point comes first, since |a - b| = |b - a|. When b = 0, |a - 0| = |a| gives the distance from a to the origin (zero). This distance interpretation extends to higher dimensions: in two dimensions, the distance between points (x1, y1) and (x2, y2) is sqrt((x1-x2) squared + (y1-y2) squared), which can be seen as a generalization of absolute value. This connection makes absolute value essential in defining metrics, norms, and topological concepts. In practical applications, when you need to find how far apart two values are without caring about direction, absolute value of their difference is the tool to use.
How is absolute value used in error analysis and statistics?
In statistics and data science, absolute value is used extensively for measuring errors and deviations. The Mean Absolute Deviation (MAD) calculates the average of |x_i - mean| across all data points, providing a robust measure of spread that is less sensitive to outliers than variance. The Mean Absolute Error (MAE) in regression uses |predicted - actual| to quantify prediction accuracy. The L1 norm (sum of absolute values of components) is used in LASSO regression for feature selection. Absolute residuals help identify outliers in regression analysis. The median absolute deviation, calculated as the median of |x_i - median|, is an extremely robust measure of variability. These absolute-value-based measures are often preferred over squared measures when the data contains outliers because they do not amplify extreme values.