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 x , is a nonnegative real number denoted by | x | , and defined as follows

|x|=\begin{cases} x & \text{if }x>0\\ 0 & \text{if }x=0\\ -x & \text{if }x<0 \end{cases}
  • Geometrically the absolute value of a number x is its distance from 0 regardless of the direction.
Example 1.

Find | 2 | , | 2 | , | 0 | , | 3 3 | , | 3 3 |

Solution Because 2 , 0 , 3 3 are nonnegative [ 3 1.73 , so 3 3 1.27 ], we have | 2 | = 2 ,   | 0 | = 0 ,   | 3 3 | = 3 3 but 2 and 3 3 are negative, so we have | 2 | = ( 2 ) = 2 , | 3 3 | = ( 3 3 ) = 3 3 .
  • In computer languages and mathematical packages, the absolute value of x is often denoted by abs(x).
  • We have by definition: | x | x | x | because if x > 0 , then | x | = x 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 x < 0 , then | x | = x , and we have the sign of equality on the left and the sign of inequality on the right.

[Note that a b means a < b or a = b ]

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

  1. | a | 0
  2. | a | = 0 if and only if a = 0
  3. | | a | | = | a | (because | a | 0 )
  4. | a | = | a | .
  5. | a b | = | a |   | b | .
  6. | a b | = | a | | b | (provided b 0 )
  7. If r > 0
|x|\le r\qquad\text{is equivalent to}\qquad-r\le x\le r \tag{i}r\le|x|\qquad\text{is equivalent to}\qquad x\le-r\quad\text{or }\quad r\le x \tag{ii}|x|=r\qquad\text{is equivalent to}\qquad x=r\quad\text{or}\quad x=-r \tag{iii}
Geometric Interpretation Let r > 0 and | x | r . The above relationship implies that x is nearer to 0 than r , and you can see from the following figure that this is possible if and only if x lies between r and r : r x r .
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. | a + b | | a | + | b | (known as triangle inequality)
  • If a and b are either both positive, both negative, or at least one of them is zero, then | a + b | = | a | + | b | . Otherwise, when a and b have opposite signs, | a + b | < | a | + | b | .
Proof of the triangle inequality We know | a | a | a | and | b | b | b | . Adding two inequalities we obtain ( | a | + | b | ) a + b | a | + | b | . Let c = | a | + | b | and x = a + b . Because c x c , it follows from (1) that | x | c or | x | = | a + b | | a | + | b | . This is what we were trying to prove.
Example 2.

Show that

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

Prove that for all real number a and b , we have

| a b | | a | + | b |
Solution This follows directly from the triangle inequality and the fact that | b | = | b | . Applying the triangle inequality to a + ( b ) , we get: | a b | = | a + ( b ) | | a | + | b | = | a | + | b | . Thus, | a b | | a | + | b | holds for all real numbers a and b .
Example 4.

Prove that for all real numbers a and b ,

| a | | b | | a b | .
Solution We start by adding and subtracting b and then applying the triangle inequality. Specifically: | a | = | ( a b ) + b | | a b | + | b | . Subtracting | b | from both sides gives: | a | | b | | a b | . Thus, the inequality | a | | b | | a b | holds for all real numbers a and b .

It follows from (4) that

  1. | a b | = | b a |

Distance Between Points on the Real Line

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

Illustration for Absolute Value and Distance
Figure 1
Definition 2.

If P and Q are two points located on a number line with coordinates a and b , the distance between P and Q , denoted by d ( P , Q ) , is calculated as:

d ( P , Q ) = | b a |

Since | b a | is the same as | a b | , it follows that the distance from P to Q is equal to the distance from Q to P :

d ( P , Q ) = d ( Q , P ) .

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

| x a | < r

is equivalent to

r < x a < r

or

a-r

This means that the distance of x from a is less than r if and only if x is between a r and a + r .

Illustration for Absolute Value and Distance
Figure 2
Example 5.

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

Solution As discussed above \begin{aligned} I & =\{x|\ |x-2|<0.6\} & =\{x|\ -0.6 This set is graphed in the following figure.
Illustration for Absolute Value and Distance
The set of all points whose distance from 2 is less than 0.6

Neighborhoods

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

\begin{aligned} I & =\{x|\ |x-a|<\delta\}\\ & =\{x|\ -\delta

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

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

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

0 < | x a | < δ

or

J = { x |   0 < | x a | < δ }

Here we have two inequalities

0 < | x a | and | x a | < δ

Recall that the absolute value is always nonnegative (that is 0 | t a | for all t ) , so

$ 0<|x-a| $

means

| x a | 0

or equivalently

x a

[Recall that | t | = 0 if and only if t = 0 ]. Therefore,

\begin{aligned} J & =\{x|\quad0<|x-a|<\delta\} & =\{x|\ |x-a|<\delta\quad\text{and}\quad x\neq a\} \end{aligned}

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

The deleted <math xmlns= δ -neighrbood of a is the δ -neighborhood of a minus the midpoint a ." style="max-width: 100%; height: auto; display: block; margin: 0 auto;">
Figure 4 The deleted δ -neighrbood of a is the δ -neighborhood of a minus the midpoint a .