Absolute Value and Distance

Absolute Value

It is frequently desirable to measure how large a quantity is, regardless of its sign. In such cases, we use merely the absolute value of the quantity.

Definition 1.

The absolute value (or modulus) of a real number , is a nonnegative real number denoted by , and defined as follows

  • Geometrically the absolute value of a number is its distance from 0 regardless of the direction.
Example 1.

Find

Solution Because are nonnegative [, so ], we have but and are negative, so we have
  • In computer languages and mathematical packages, the absolute value of is often denoted by abs(x).
  • We have by definition:because if , then and we have the sign of equality on the right and the sign of inequality on the left (a positive number is larger than a negative one). If , then , and we have the sign of equality on the left and the sign of inequality on the right.

[Note that means or ]

From the above definition, it follows that for every real numbers and we have:

  1. if and only if
  2. (because )
  3. .
  4. .
  5. (provided )
  6. If
Geometric Interpretation Let and The above relationship implies that is nearer to 0 than , and you can see from the following figure that this is possible if and only if lies between and :
Number line showing that |x| ≤ r means x lies between −r and r, with the interval [−r, r] highlighted and |x| marked as the distance from 0 to x.
Geometric interpretation of |x| ≤ r: the value x lies within distance r from the origin, i.e., −r ≤ x ≤ r.
You can show the significance of the other two statements geometrically.
  1. (known as triangle inequality)
  • If and are either both positive, both negative, or at least one of them is zero, then . Otherwise, when and have opposite signs, .
Proof of the triangle inequality We know and Adding two inequalities we obtain Let and . Because , it follows from (1) that or This is what we were trying to prove.
Example 2.

Show that

Solution This result follows from the triangle inequality and the fact that (Property 4). Using the triangle inequality, we have: By subtracting from both sides of the inequality, we obtain: Combining the above inequality with the standard triangle inequality , we conclude that:
Example 3.

Prove that for all real number and , we have

Solution This follows directly from the triangle inequality and the fact that . Applying the triangle inequality to , we get: Thus, holds for all real numbers and .
Example 4.

Prove that for all real numbers and ,

Solution We start by adding and subtracting and then applying the triangle inequality. Specifically: Subtracting from both sides gives: Thus, the inequality holds for all real numbers and .

It follows from (4) that

Distance Between Points on the Real Line

Look at the following figure. The distance between and is units. The distance can be calculated as the difference , which involves subtracting the smaller value from the larger one. However, since the absolute value of equals , and similarly, , we can use the absolute value function to find the distance between two points without worrying about which number is larger or smaller.

Figure 1
Definition 2.

If and are two points located on a number line with coordinates and , the distance between and , denoted by , is calculated as:

Since is the same as , it follows that the distance from to is equal to the distance from to :

It follows from Equation (ii) that for any real number and any positive number ,

is equivalent to

or

_to_each_side">

This means that the distance of from is less than if and only if is between and .

Figure 2
Example 5.

Find the set , if it consists of all points whose distance from the point 2 is less than 0.6.

Solution As discussed above This set is graphed in the following figure.
The set of all points whose distance from 2 is less than 0.6

Neighborhoods

Let be the set of all points whose distance from a fixed point is less than a number . Then

Such a set is called a neighborhood (or more precisely the -neighborhood) of and is called the radius of the neighborhood. {The -neighborhood of is shown in the following figure.}

The <mjx-container aria-label=-neighborhood of is the set of all points whose distance from is less than . The radius of this neighborhood is ." style="max-width: 100%; height: auto; display: block; margin: 0 auto;">
Figure 3 The -neighborhood of is the set of all points whose distance from is less than . The radius of this neighborhood is .

Now let's consider the set of all points such that

or

Here we have two inequalities

Recall that the absolute value is always nonnegative (that is for all ) , so

means

or equivalently

[Recall that if and only if ]. Therefore,

That is is the -neighborhood of with the midpoint removed. The set is called the deleted neighborhood or punctured neighborhood of . The deleted -neighborhood of is shown in the following figure.

The deleted <mjx-container aria-label=-neighrbood of is the -neighborhood of minus the midpoint ." style="max-width: 100%; height: auto; display: block; margin: 0 auto;">
Figure 4 The deleted -neighrbood of is the -neighborhood of minus the midpoint .