Skip to main content
Logo image

Section 1.3 Absolute value and bounded functions

Note: 0.5–1 lecture
A concept we will encounter over and over is the concept of absolute value. You want to think of the absolute value as the “size” of a real number. Here is the formal definition:
\begin{equation*} \abs{x} \coloneqq \begin{cases} x & \text{if } x \geq 0, \\ -x & \text{if } x < 0 . \end{cases} \end{equation*}
Let us give the main features of the absolute value as a proposition.

Proof.

i: First suppose \(x \geq 0\text{.}\) Then \(\abs{x} = x \geq 0\text{.}\) Also, \(\abs{x} = x = 0\) if and only if \(x=0\text{.}\) On the other hand, if \(x < 0\text{,}\) then \(\abs{x} = -x > 0\text{,}\) and \(\abs{x}\) is never zero.
ii: If \(x > 0\text{,}\) then \(-x < 0\) and so \(\abs{-x} = -(-x) = x = \abs{x}\text{.}\) Similarly when \(x < 0\text{,}\) or \(x = 0\text{.}\)
iii: If \(x\) or \(y\) is zero, then the result is immediate. When \(x\) and \(y\) are both positive, then \(\abs{x}\abs{y} = xy\text{.}\) As \(xy\) is also positive, \(xy = \abs{xy}\text{.}\) If \(x\) and \(y\) are both negative, then \(xy=(-x)(-y)\) is still positive and \(\abs{xy}=xy\text{.}\) Also, \(\abs{x}\abs{y} = (-x)(-y) = xy\text{.}\) If \(x > 0\) and \(y < 0\text{,}\) then \(\abs{x}\abs{y} = x(-y) = -(xy)\text{.}\) Now \(xy\) is negative and \(\abs{xy} = -(xy)\text{.}\) Similarly when \(x < 0\) and \(y > 0\text{.}\)
iv: Immediate if \(x \geq 0\text{.}\) If \(x < 0\text{,}\) then \(\abs{x}^2 = {(-x)}^2 = x^2\text{.}\)
v: Suppose \(\abs{x} \leq y\text{.}\) If \(x \geq 0\text{,}\) then \(x \leq y\text{.}\) It follows that \(y \geq 0\text{,}\) leading to \(-y \leq 0 \leq x\text{.}\) So \(-y \leq x \leq y\) holds. If \(x < 0\text{,}\) then \(\abs{x} \leq y\) means \(-x \leq y\text{.}\) Negating both sides we get \(x \geq -y\text{.}\) Again \(y \geq 0\) and so \(y \geq 0 > x\text{.}\) Hence, \(-y \leq x \leq y\text{.}\)
On the other hand, suppose \(-y \leq x \leq y\) is true. If \(x \geq 0\text{,}\) then \(x \leq y\) is equivalent to \(\abs{x} \leq y\text{.}\) If \(x < 0\text{,}\) then \(-y \leq x\) implies \((-x) \leq y\text{,}\) which is equivalent to \(\abs{x} \leq y\text{.}\)
vi: Apply v with \(y = \abs{x}\text{.}\)
A property used frequently enough to give it a name is the so-called triangle inequality.

Proof.

Proposition 1.3.1 gives \(- \sabs{x} \leq x \leq \sabs{x}\) and \(- \sabs{y} \leq y \leq \sabs{y}\text{.}\) Add these two inequalities to obtain
\begin{equation*} - \bigl(\sabs{x}+\sabs{y}\bigr) \leq x+y \leq \sabs{x}+ \sabs{y} . \end{equation*}
Apply Proposition 1.3.1 again to find \(\sabs{x+y} \leq \sabs{x}+\sabs{y}\text{.}\)
There are other often applied versions of the triangle inequality.

Proof.

Let us plug in \(x=a-b\) and \(y=b\) into the standard triangle inequality to obtain
\begin{equation*} \abs{a} = \abs{a-b+b} \leq \abs{a-b} + \abs{b} , \end{equation*}
or \(\abs{a}-\abs{b} \leq \abs{a-b}\text{.}\) Switching the roles of \(a\) and \(b\) we find \(\abs{b}-\abs{a} \leq \abs{b-a} = \abs{a-b}\text{.}\) Applying Proposition 1.3.1, we obtain the reverse triangle inequality.
The second item in the corollary is obtained from the standard triangle inequality by just replacing \(y\) with \(-y\text{,}\) and noting \(\abs{-y} = \abs{y}\text{.}\)

Proof.

We proceed by induction. The conclusion holds trivially for \(n=1\text{,}\) and for \(n=2\) it is the standard triangle inequality. Suppose the corollary holds for \(n\text{.}\) Take \(n+1\) numbers \(x_1,x_2,\ldots,x_{n+1}\) and first use the standard triangle inequality, then the induction hypothesis
\begin{equation*} \begin{split} \sabs{x_1 + x_2 + \cdots + x_n + x_{n+1}} & \leq \sabs{x_1 + x_2 + \cdots + x_n} + \sabs{x_{n+1}} \\ & \leq \sabs{x_1} + \sabs{x_2} + \cdots + \sabs{x_n} + \sabs{x_{n+1}} . \qedhere \end{split} \end{equation*}
Let us see an example of the use of the triangle inequality.

Example 1.3.5.

Find a number \(M\) such that \(\sabs{x^2-9x+1} \leq M\) for all \(-1 \leq x \leq 5\text{.}\)
Using the triangle inequality, write
\begin{equation*} \sabs{x^2-9x+1} \leq \sabs{x^2}+\sabs{9x}+\sabs{1} = \sabs{x}^2+9\sabs{x}+1 . \end{equation*}
The expression \(\sabs{x}^2+9\sabs{x}+1\) is largest when \(\abs{x}\) is largest (why?). In the interval provided, \(\abs{x}\) is largest when \(x=5\) and so \(\abs{x}=5\text{.}\) One possibility for \(M\) is
\begin{equation*} M = 5^2+9(5)+1 = 71 . \end{equation*}
There are, of course, other \(M\) that work. The bound of 71 is much higher than it need be, but we didn’t ask for the best possible \(M\text{,}\) just one that works.
The last example leads us to the concept of bounded functions.

Definition 1.3.6.

Suppose \(f \colon D \to \R\) is a function. We say \(f\) is bounded if there exists a number \(M\) such that \(\abs{f(x)} \leq M\) for all \(x \in D\text{.}\)
In the example, we proved \(x^2-9x+1\) is bounded when considered as a function on \(D = \{ x : -1 \leq x \leq 5 \}\text{.}\) On the other hand, if we consider the same polynomial as a function on the whole real line \(\R\text{,}\) then it is not bounded.

Figure 1.4. Example of a bounded function, a bound \(M\text{,}\) and its supremum and infimum.

For a function \(f \colon D \to \R\text{,}\) we write (see Figure 1.4 for an example)
\begin{equation*} \sup_{x \in D} f(x) \coloneqq \sup\, f(D) \qquad \text{and} \qquad \inf_{x \in D} f(x) \coloneqq \inf\, f(D) . \end{equation*}
We also sometimes replace the “\(x \in D\)” with an expression. For example if, as before, \(f(x) = x^2-9x+1\text{,}\) for \(-1 \leq x \leq 5\text{,}\) a little bit of calculus shows
\begin{equation*} \sup_{x \in D} f(x) = \sup_{-1 \leq x \leq 5} ( x^2 -9x+1 ) = 11, \qquad \inf_{x \in D} f(x) = \inf_{-1 \leq x \leq 5} ( x^2 -9x+1 ) = \nicefrac{-77}{4} . \end{equation*}
Be careful with the variables. The \(x\) on the left side of the inequality in (1.1) is different from the \(x\) on the right. You should really think of, say, the first inequality as
\begin{equation*} \sup_{x \in D} f(x) \leq \sup_{y \in D} g(y) . \end{equation*}
Let us prove this inequality. If \(b\) is an upper bound for \(g(D)\text{,}\) then \(f(x) \leq g(x) \leq b\) for all \(x \in D\text{,}\) and hence \(b\) is also an upper bound for \(f(D)\text{,}\) or \(f(x) \leq b\) for all \(x \in D\text{.}\) Take the least upper bound of \(g(D)\) to get that for all \(x \in D\)
\begin{equation*} f(x) \leq \sup_{y \in D} g(y) . \end{equation*}
Therefore, \(\sup_{y \in D} g(y)\) is an upper bound for \(f(D)\) and thus greater than or equal to the least upper bound of \(f(D)\text{.}\)
\begin{equation*} \sup_{x \in D} f(x) \leq \sup_{y \in D} g(y) . \end{equation*}
The second inequality (the statement about the inf) is left as an exercise (Exercise 1.3.4).
A common mistake is to conclude
\begin{equation} \sup_{x \in D} f(x) \leq \inf_{y \in D} g(y) .\tag{1.2} \end{equation}
The inequality (1.2) is not true given the hypothesis of the proposition above. For this stronger inequality we need the stronger hypothesis
\begin{equation*} f(x) \leq g(y) \qquad \text{for all } x \in D \text{ and } y \in D. \end{equation*}
The proof as well as a counterexample is left as an exercise (Exercise 1.3.5).

Exercises Exercises

1.3.1.

Show that \(\abs{x-y} < \epsilon\) if and only if \(x-\epsilon < y < x+\epsilon\text{.}\)

1.3.2.

Show:        a) \(\max \{x,y\} = \frac{x+y+\abs{x-y}}{2}\)        b) \(\min \{x,y\} = \frac{x+y-\abs{x-y}}{2}\)

1.3.3.

Find a number \(M\) such that \(\sabs{x^3-x^2+8x} \leq M\) for all \(-2 \leq x \leq 10\text{.}\)

1.3.4.

Finish the proof of Proposition 1.3.7. That is, prove that given a set \(D\text{,}\) and two bounded functions \(f \colon D \to \R\) and \(g \colon D \to \R\) such that \(f(x) \leq g(x)\) for all \(x \in D\text{,}\) then
\begin{equation*} \inf_{x\in D} f(x) \leq \inf_{x\in D} g(x) . \end{equation*}

1.3.5.

Let \(f \colon D \to \R\) and \(g \colon D \to \R\) be functions (\(D\) nonempty).
  1. Suppose \(f(x) \leq g(y)\) for all \(x \in D\) and \(y \in D\text{.}\) Show that
    \begin{equation*} \sup_{x\in D} f(x) \leq \inf_{x\in D} g(x) . \end{equation*}
  2. Find a specific \(D\text{,}\) \(f\text{,}\) and \(g\text{,}\) such that \(f(x) \leq g(x)\) for all \(x \in D\text{,}\) but
    \begin{equation*} \sup_{x\in D} f(x) > \inf_{x\in D} g(x) . \end{equation*}

1.3.6.

Prove Proposition 1.3.7 without the assumption that the functions are bounded. Hint: You need to use the extended real numbers.

1.3.7.

Let \(D\) be a nonempty set. Suppose \(f \colon D \to \R\) and \(g \colon D \to \R\) are bounded functions.
  1. Show
    \begin{equation*} \sup_{x\in D} \bigl(f(x) + g(x) \bigr) \leq \sup_{x\in D} f(x) + \sup_{x\in D} g(x) \qquad \text{and} \qquad \inf_{x\in D} \bigl(f(x) + g(x) \bigr) \geq \inf_{x\in D} f(x) + \inf_{x\in D} g(x) . \end{equation*}
  2. Find an example (or examples) where we obtain strict inequalities.

1.3.8.

Suppose \(D\) is nonempty, \(f \colon D \to \R\) and \(g \colon D \to \R\) are bounded functions, and \(\alpha \in \R\text{.}\)
  1. Show that \(\alpha f \colon D \to \R\) defined by \((\alpha f) (x) \coloneqq \alpha f(x)\) is a bounded function.
  2. Show that \(f+g \colon D \to \R\) defined by \((f+g) (x) \coloneqq f(x) + g(x)\) is a bounded function.

1.3.9.

Let \(f \colon D \to \R\) and \(g \colon D \to \R\) be functions with \(D\) nonempty, \(\alpha \in \R\text{,}\) and recall what \(f+g\) and \(\alpha f\) means from the previous exercise.
  1. Prove that if \(f+g\) and \(g\) are bounded, then \(f\) is bounded.
  2. Find an example where \(f\) and \(g\) are both unbounded, but \(f+g\) is bounded.
  3. Prove that if \(f\) is bounded but \(g\) is unbounded, then \(f+g\) is unbounded.
  4. Find an example where \(f\) is unbounded but \(\alpha f\) is bounded.
For a higher quality printout use the PDF versions: https://www.jirka.org/ra/realanal.pdf or https://www.jirka.org/ra/realanal2.pdf