Mathematics

Absolute Value: Formula, Rules & Examples

Absolute value measures a number’s distance from zero on the number line, regardless of direction. Because distance cannot be negative, an absolute value is always zero or positive.

For example:

|7| = 7

and:

|-7| = 7

Both 7 and -7 are exactly 7 units from zero.

The basic absolute value formula is:

|x| = x, if x ≥ 0

|x| = -x, if x < 0

This definition explains why a negative input produces a positive absolute value: multiplying the negative number by -1 reverses its sign.

What Is Absolute Value?

Absolute value is the magnitude or distance of a real number from zero.

The notation is:

|x|

For example:

|12| = 12

|-12| = 12

|0| = 0

Absolute value ignores whether the number lies to the left or right of zero. It measures only how far away the number is.

This makes absolute value useful in arithmetic, algebra basics, differences, error measurements, distances, and many other calculations.

Absolute Value Formula

For real x:

|x| = x, if x ≥ 0

|x| = -x, if x < 0

Consider:

x = 5

Since 5 ≥ 0:

|5| = 5

Now consider:

x = -5

Since -5 < 0:

|-5| = -(-5)

|-5| = 5

The piecewise rule formalizes what the number-line interpretation already shows.

Why Absolute Value Cannot Be Negative

Absolute value measures distance from zero.

A distance cannot be:

-3 units

Therefore:

|x| ≥ 0

for every real x.

For example:

|-100| = 100

not -100.

Similarly:

|0| = 0

Zero is the only number whose absolute value equals zero.

Absolute Value on a Number Line

Imagine zero at the center of a number line.

The numbers:

-4

and:

4

lie on opposite sides of zero, but each is four units away.

Therefore:

|-4| = 4

and:

|4| = 4

This geometric interpretation is often the easiest way to understand the concept before applying symbolic rules.

Positive Number Example

Evaluate:

|18|

Since:

18 ≥ 0

the absolute value remains unchanged:

|18| = 18

For any positive number a:

|a| = a

Negative Number Example

Evaluate:

|-23|

The number -23 is 23 units from zero.

Therefore:

|-23| = 23

Using the piecewise formula:

|-23| = -(-23)

= 23

Absolute Value of Zero

Zero is zero units from itself.

Therefore:

|0| = 0

This gives the important equivalence:

|x| = 0 if and only if x = 0

No positive or negative nonzero number has absolute value zero.

Absolute Value Does Not Mean “Make It Positive”

A common shortcut says absolute value “makes a number positive.” That wording is incomplete.

For:

|-5|

the result is positive:

5

But:

|0| = 0

and zero is neither positive nor negative.

A more accurate rule is:

Absolute value returns the nonnegative distance from zero.

Absolute Value of an Expression

Absolute value can contain an entire expression.

For example:

|3 – 8|

First evaluate inside the bars:

3 – 8 = -5

Then take the absolute value:

|-5| = 5

Therefore:

|3 – 8| = 5

The expression inside the bars should normally be simplified before deciding which absolute-value branch applies.

Example: |7 – 12|

Calculate:

7 – 12 = -5

Then:

|-5| = 5

So:

|7 – 12| = 5

Notice that:

|7 – 12| = |12 – 7|

because both represent the distance between 7 and 12.

Distance Between Two Numbers

The distance between real numbers a and b is:

Distance = |a – b|

For example, the distance between -3 and 5 is:

|-3 – 5|

= |-8|

= 8

Reversing the subtraction gives:

|5 – (-3)|

= |8|

= 8

Both produce the same distance.

Absolute Difference

The absolute difference between two values is:

|a – b|

This is useful whenever direction is irrelevant and only the magnitude of the difference matters.

For example, the difference between actual value 98 and target value 100 has magnitude:

|98 – 100|

= |-2|

= 2

Whether the observation is 2 below the target or the target is 2 above the observation, the absolute difference is 2.

Absolute Value of a Product

For real numbers a and b:

|ab| = |a||b|

Example:

|(-4)(3)|

Calculate directly:

|-12| = 12

Using the property:

|-4||3|

= 4 × 3

= 12

Both methods agree.

Absolute Value of a Quotient

For real a and nonzero b:

|a/b| = |a|/|b|

For example:

|-18/6|

= |-3|

= 3

Using the quotient property:

|-18|/|6|

= 18/6

= 3

Absolute Value of a Negative

For any real x:

|-x| = |x|

For example:

If x = 9:

|-9| = 9

and:

|9| = 9

If x = -9:

|-(-9)| = |9| = 9

while:

|-9| = 9

So the property holds regardless of the sign of x.

Absolute Value and Squaring

For real x:

|x|² = x²

For example:

|-4|² = 4² = 16

and:

(-4)² = 16

A closely related identity is:

√(x²) = |x|

not simply x.

For example:

√((-5)²) = √25 = 5

while x itself is -5.

The absolute-value sign is necessary because the principal square root is nonnegative.

Example: √(x²)

If:

x = -8

then:

√(x²) = √((-8)²)

= √64

= 8

Also:

|x| = |-8| = 8

Therefore:

√(x²) = |x|

The same relationship appears frequently when simplifying roots.

Triangle Inequality

One important absolute-value property is:

|a + b| ≤ |a| + |b|

This is called the triangle inequality.

For example, let:

a = -3

b = 5

Then:

|a + b| = |-3 + 5| = |2| = 2

while:

|a| + |b| = 3 + 5 = 8

Therefore:

2 ≤ 8

The inequality formalizes the idea that a direct distance cannot exceed the total distance traveled in separate stages.

Reverse Triangle Inequality

Another useful relationship is:

||a| – |b|| ≤ |a – b|

For example:

a = 7

b = -2

Left side:

||7| – |-2||

= |7 – 2|

= 5

Right side:

|7 – (-2)|

= |9|

= 9

Therefore:

5 ≤ 9

This property is useful in more advanced analysis of distances and magnitudes.

Absolute Value and Sign

For any real x:

|x| = x

when x is nonnegative.

Also:

|x| = -x

when x is negative.

This distinction means an expression such as:

|x – 3|

changes algebraic form at:

x = 3

If:

x ≥ 3

then:

|x – 3| = x – 3

If:

x < 3

then:

|x – 3| = -(x – 3)

= 3 – x

The sign of the expression inside the bars determines the correct branch.

Piecewise Form of |x – a|

The expression:

|x – a|

can be written:

|x – a| = x – a, if x ≥ a

|x – a| = a – x, if x < a

This has a natural distance interpretation:

|x – a|

is the distance between x and a.

For example:

|x – 5|

measures the distance from x to 5.

Example: Evaluate |x – 5| at x = 2

Substitute:

|2 – 5|

= |-3|

= 3

The number 2 is three units away from 5.

At x = 9:

|9 – 5|

= |4|

= 4

The number 9 is four units away from 5.

Absolute Value Function

The function:

f(x) = |x|

has a V-shaped graph with vertex:

(0, 0)

For negative x:

f(x) = -x

For nonnegative x:

f(x) = x

The graph is symmetric about the y-axis because:

f(-x) = f(x)

That is:

|-x| = |x|

Domain and Range of |x|

For:

f(x) = |x|

the domain is all real numbers:

(-∞, ∞)

because absolute value can be evaluated for every real input.

The range is:

[0, ∞)

because the output can never be negative.

This directly reflects the distance interpretation.

Shifted Absolute Value Function

Consider:

f(x) = |x – 3|

The smallest output occurs when:

x = 3

because:

|3 – 3| = 0

So the vertex is:

(3, 0)

More generally:

f(x) = |x – h| + k

has vertex:

(h, k)

This graphical interpretation is related to the core meaning of absolute value as distance from a reference point.

Absolute Value and Arithmetic Sequences

The terms of an arithmetic sequence can be positive or negative, but taking absolute values changes their magnitudes independently of the original sequence direction.

For example:

-6, -3, 0, 3, 6

is arithmetic with common difference 3.

The absolute values are:

6, 3, 0, 3, 6

which do not form the same arithmetic progression.

Absolute value therefore should not be treated as an operation that automatically preserves linear sequence patterns.

Absolute Value in Other Number Bases

The magnitude represented by a number does not depend on whether it is written in decimal, binary, or another positional notation.

For example, binary:

101₂

represents decimal 5.

Therefore the magnitude of:

-101₂

corresponds to 5.

The specialist binary numbers and base conversions pages cover how such representations translate between numeral systems; absolute value itself concerns the represented number’s distance from zero.

Absolute Value of Large Numbers

The same rule works for very large magnitudes.

For example:

|-1,000,000,000| = 1,000,000,000

The number of digits or scale does not change the operation.

Topics involving digit length and numerical scale are handled under big numbers, while absolute value concerns only magnitude relative to zero.

Absolute Value Equations

When absolute value appears in an equation, the distance interpretation can create multiple cases.

For example:

|x| = 5

means x is five units from zero, so:

x = 5

or:

x = -5

More complicated problems, including equations such as |ax + b| = c and no-solution cases, belong to the dedicated absolute value equation guide rather than the core absolute-value definition covered here.

Absolute Value and Inequalities

The statement:

|x| < 4

means the distance from x to zero is less than 4.

Geometrically:

-4 < x < 4

Likewise:

|x| > 4

describes values farther than 4 units from zero:

x < -4 or x > 4

These examples show how the distance interpretation extends naturally to inequalities, though full inequality-solving rules are a separate algebraic intent.

Absolute Error

Absolute value is often used to express error without regard to whether an estimate is above or below the true value.

If:

Observed value = 49.7

and:

True value = 50

then absolute error is:

|49.7 – 50|

= |-0.3|

= 0.3

The sign of the raw difference disappears because error magnitude is what matters.

Distance From a Target

Suppose a target is:

100

A reading x is:

|x – 100|

units away from the target.

If x = 93:

|93 – 100| = 7

If x = 107:

|107 – 100| = 7

Both readings are equally distant from the target even though one is below and the other above it.

Absolute Value and Decimal Numbers

Absolute value works with decimals exactly as it does with integers.

For example:

|-3.75| = 3.75

and:

|2.408| = 2.408

The decimal representation affects the arithmetic notation, not the absolute-value rule.

If further decimal calculation is required, decimal operations provides the specialist arithmetic rules.

Absolute Value and Fractions

Fractions follow the same principle:

|-3/7| = 3/7

|5/8| = 5/8

Using the quotient property:

|a/b| = |a|/|b|

for b ≠ 0.

For example:

|-12/20|

= 12/20

= 3/5

Comparing Absolute Values

Suppose:

a = -9

and:

b = 6

Numerically:

-9 < 6

but their magnitudes satisfy:

|-9| = 9

|6| = 6

so:

|-9| > |6|

A number that is smaller on the ordinary number line may have a larger absolute value because it lies farther from zero.

When Two Numbers Have the Same Absolute Value

If:

|a| = |b|

then:

a = b

or:

a = -b

For example:

|-7| = |7| = 7

The two numbers can therefore be identical or opposites.

This property follows directly from symmetry around zero.

Absolute Value and Opposite Numbers

A number and its additive inverse always have the same absolute value:

|a| = |-a|

For example:

|25| = |-25|

= 25

This is one reason absolute value is described as magnitude rather than signed value.

Common Absolute Value Mistakes

Keeping a Negative Sign in the Result

Incorrect:

|-8| = -8

Correct:

|-8| = 8

Absolute value is nonnegative.

Treating Zero as Positive

Absolute value can equal zero:

|0| = 0

but zero itself is neither positive nor negative.

Removing the Bars Without Checking the Sign

For:

|x|

you cannot always write x.

The correct rule is:

|x| = x if x ≥ 0

and:

|x| = -x if x < 0

Thinking |a – b| and a – b Are Always Equal

If:

a < b

then a – b is negative, while:

|a – b|

is positive.

Writing √(x²) = x for Every Real x

The correct identity is:

√(x²) = |x|

Confusing Absolute Value With Parentheses

The expression:

|-5|

means magnitude.

The expression:

(-5)

simply groups the signed number and remains -5.

Worked Absolute Value Example

Evaluate:

|4 – 11| + |-3| × 2

First simplify inside the first absolute-value bars:

4 – 11 = -7

Therefore:

|4 – 11| = |-7| = 7

Next:

|-3| = 3

Multiply:

3 × 2 = 6

Then add:

7 + 6 = 13

Therefore:

|4 – 11| + |-3| × 2 = 13

Frequently Asked Questions

What is absolute value?

Absolute value is the nonnegative distance of a number from zero on the number line.

What is the absolute value formula?

For real x:

|x| = x, if x ≥ 0

|x| = -x, if x < 0

What is |-5|?

|-5| = 5

because -5 is five units from zero.

What is |5|?

|5| = 5

What is |0|?

|0| = 0

Can absolute value ever be negative?

No. For every real x:

|x| ≥ 0

Why is |-x| equal to |x|?

x and -x are the same distance from zero, so they have the same magnitude.

What is the distance between two numbers?

The distance between a and b is:

|a – b|

Is √(x²) equal to x?

Not for every real x. The correct identity is:

√(x²) = |x|

What is |ab|?

For real a and b:

|ab| = |a||b|

What is |a/b|?

For b ≠ 0:

|a/b| = |a|/|b|

What does |x – a| mean?

It represents the distance between x and a on the number line.

What is the difference between absolute value and an absolute value equation?

Absolute value is the magnitude operation itself. An absolute value equation, such as |x – 2| = 5, asks for variable values satisfying an equality and requires its own equation-solving rules.

Mehran Khan

Mehran Khan is the primary author at The Logic Library and CEO & Founder of One Digit Media. With 10+ years of experience in software engineering, SEO, and digital publishing, he uses a research-led approach to Logics, Maths, Tech, Formulas, Science, and AI.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button