Article
Absolute Value: How to Find |x| (Definition, Formula and Examples)
The absolute value of a number x, written |x|, is its distance from zero on the number line, so it is never negative. For x ≥ 0 it equals x, and for x < 0 it equals −x. This article gives the definition, the formula √(x²), the properties, the distance between points, simple equations and inequalities with absolute value and four worked examples. You can check your own number in the absolute value calculator. For x = −7.5 the result is 7.5.
Last updated:
Find the absolute value of a number in the absolute value calculator. The square root is in the square root calculator.
The definition and formula of absolute value
The absolute value (modulus) of a real number x is defined piecewise: for a nonnegative number it is the number itself, and for a negative number it is the opposite number.
|x| = x for x ≥ 0
|x| = −x for x < 0
example: |−7.5| = −(−7.5) = 7.5
|x| = √(x²)
| x | |x| | x² | Branch used |
|---|---|---|---|
| −12 | 12 | 144 | x < 0: |x| = −x |
| −7.5 | 7.5 | 56.25 | x < 0: |x| = −x |
| −3.2 | 3.2 | 10.24 | x < 0: |x| = −x |
| −0.5 | 0.5 | 0.25 | x < 0: |x| = −x |
| 0 | 0 | 0 | x = 0: |x| = 0 |
| 5 | 5 | 25 | x > 0: |x| = x |
| 12.5 | 12.5 | 156.25 | x > 0: |x| = x |
The minus sign in the definition does not mean the result is negative. For x < 0 the expression −x is positive, for example −(−7.5) = 7.5.
Try it with an example
Example: the number x = −7.5. The value is already stored in the link to the calculator.
- Number x
- −7.5
- Result
- |x| = 7.5, x² = 56.25
Open the calculator with these numbers
The calculator reads the values from the page address and shows the result right away. You can change them freely.
How the calculator works
The calculator computes |x| as Math.abs(x), that is x for x ≥ 0 and −x otherwise. Next to the result it shows √(x²), the square x², the opposite number −x, the sign sgn(x) and the branch of the definition that was used, as well as a number line with the distance from zero. It accepts real numbers with a period or a comma. The calculator works on one number, so it does not solve equations or inequalities with absolute value, and the units and currency in the header do not enter the formula.
Absolute value as distance on a number line
The number |x| is the distance of the point x from zero, so −7.5 and 7.5 have the same absolute value, 7.5. The same idea measures the distance between two numbers a and b as |a − b|. The distance between −4 and 3 is |3 − (−4)| = |7| = 7, regardless of the order of subtraction.
For points in a plane the distance comes from a formula with a square root, described by the Pythagorean theorem calculator and the article The Pythagorean Theorem. The square root of the square of a number is always its absolute value. Square roots themselves are covered in Square Root.
Properties of absolute value
The key properties are |x| ≥ 0, |−x| = |x|, |x · y| = |x| · |y| and |x + y| ≤ |x| + |y|, the triangle inequality. For x = −3 and y = 5 we get |x + y| = |2| = 2, while |x| + |y| = 3 + 5 = 8, so 2 ≤ 8. Equality holds when the numbers have the same sign or one of them is zero.
Absolute value changes the sign of a negative number, but it is not the same as the square. For x = −7.5 we have |x| = 7.5, while x² = 56.25. You can find the relative change between two values in the percentage change calculator, and the article Percentage Change covers relative change in more depth.
Equations and inequalities with absolute value
The equation |x| = 5 has two solutions, x = 5 and x = −5, because both numbers lie at a distance of 5 from zero. The equation |x − 2| = 3 says that x lies at a distance of 3 from the number 2, so x = 5 or x = −1. The equation |x| = −2 has no solutions, because an absolute value is never negative.
The inequality |x| < 3 means −3 < x < 3, a distance from zero smaller than 3. The inequality |x| > 3 means x < −3 or x > 3. The calculator on the page finds the absolute value of one number, so for equations enter an expression you worked out first, for example x − 2 for a chosen x. For calculations on many numbers the mean calculator can help.
Four worked examples
You can repeat each example in the absolute value calculator.
1. The absolute value of −7.5
A negative number.
- Enter −7.5.
- Because x < 0, use the branch |x| = −x.
- The result is 7.5.
- Check: √(x²) = √56.25 = 7.5.
2. The absolute value of −3.2
A negative number with a decimal part.
- Enter −3.2.
- Change the sign to the opposite one.
- The result is 3.2.
- The square of the number is 10.24.
3. The distance between −4 and 3
Using the formula |a − b|.
- Compute the difference 3 − (−4) = 7.
- Enter 7 or −7.
- The result is 7.
- The distance does not depend on the order of subtraction.
4. The equation |x − 2| = 3
Two solutions.
- Split the equation into x − 2 = 3 and x − 2 = −3.
- Solve the first: x = 5.
- Solve the second: x = −1.
- Check: |5 − 2| = 3 and |−1 − 2| = |−3| = 3.
Common mistakes when finding absolute value
- Keeping the minus sign — |−7.5| is 7.5, not −7.5, because an absolute value is never negative.
- Changing the sign of a positive number — for x ≥ 0 we have |x| = x, so |7.5| = 7.5.
- Missing one solution of an equation — |x| = 5 has two solutions, 5 and −5.
- Assuming |x + y| = |x| + |y| — equality holds only when the numbers do not have opposite signs.
- Confusing |x| with x² — for x = −7.5 we have |x| = 7.5, while x² = 56.25.
- Putting a negative value on the right side of an equation — |x| = −2 has no solutions.
- Dropping the parentheses when finding a distance — the distance between −4 and 3 is |3 − (−4)| = 7, not |3 − 4| = 1.
Frequently asked questions
How do you find the absolute value?
If the number is nonnegative, leave it as it is, and if it is negative, change its sign. For −7.5 the result is 7.5.
What is the absolute value of a negative number?
It is a positive number, the opposite of the original. For example |−8| = 8, and |−0.5| = 0.5.
What is the absolute value of zero?
The absolute value of zero is 0, because zero is at a distance of 0 from itself.
What does the notation |x| mean?
The notation |x| means the absolute value, or modulus, of the number x. It is the distance of x from zero on the number line.
How do you solve the equation |x − 2| = 3?
Split it into x − 2 = 3 and x − 2 = −3. The solutions are x = 5 and x = −1.
How do you solve the inequality |x| < 3?
The inequality means that x lies between −3 and 3, that is −3 < x < 3.
Can an absolute value be negative?
No. An absolute value is always greater than or equal to zero, and equal to zero only for x = 0.
Does the calculator solve equations with absolute value?
No. The calculator finds the absolute value of one entered number. An equation has to be split into cases first.
Find the absolute value of your own number
Enter a number in the absolute value calculator and read |x|, √(x²), x², the opposite number, the sign and the branch of the definition that was used.
The square root is in the square root calculator, and powers in the exponent calculator.