Tutorials › Real Analysis › Continuity of Absolute Value

Continuity · Tutorial 340 of 1000

Continuity of Absolute Value

Learn why absolute value changes outputs by no more than inputs change, and use that estimate to prove continuity at ordinary points and at sign changes.

Intermediate 9 min read

What You'll Learn

  • Prove the reverse triangle inequality and the sharp distance bound for absolute values
  • Establish continuity and uniform continuity of the absolute-value function
  • Prove that the absolute value of a continuous function is continuous
  • Choose explicit delta values for absolute-value examples
  • Distinguish continuity at a sign change from constancy of sign nearby

Absolute Value Controls Changes in Output

The previous tutorial showed how continuity of a numerator and denominator gives continuity of a quotient wherever the denominator is nonzero. Here we examine another basic operation on real numbers: taking absolute value. The key fact is especially useful because it gives a direct bound on how much absolute value can change. That bound will also let us transfer continuity from a function \(f\) to the function \(x\mapsto |f(x)|\).

Definition: The absolute-value function is \(A:\mathbb{R}\to\mathbb{R}\), defined by \(A(t)=|t|\). Given a function \(f:E\to\mathbb{R}\), its absolute-value function is the function \(|f|:E\to\mathbb{R}\) defined by \(|f|(x)=|f(x)|\).

The definition of absolute value gives \(|t|\geq 0\) and \(|t|=t\) when \(t\geq0\), while \(|t|=-t\) when \(t<0\). Continuity, however, is not best established by splitting into these two cases near every input. A single inequality handles both signs.

The Reverse Triangle Inequality

The triangle inequality says that \(|u+v|\leq |u|+|v|\). Applying it to \(u=(u-v)+v\) gives \(|u|\leq |u-v|+|v|\), and hence \(|u|-|v|\leq |u-v|\). Interchanging \(u\) and \(v\) gives \(|v|-|u|\leq |u-v|\). Together, these inequalities give the reverse triangle inequality.

Theorem: For all \(u,v\in\mathbb{R}\), \[ \bigl||u|-|v|\bigr|\leq |u-v|. \] Thus the change in the absolute values of two inputs is no greater than the distance between the inputs.

Proof. The triangle inequality applied to \(u=(u-v)+v\) gives \(|u|\leq |u-v|+|v|\), so \(|u|-|v|\leq |u-v|\). Applied to \(v=(v-u)+u\), it gives \(|v|-|u|\leq |v-u|=|u-v|\). Therefore both \(|u|-|v|\) and its negative are at most \(|u-v|\). By the definition of absolute value, this means \[ \bigl||u|-|v|\bigr|\leq |u-v|. \] \(\square\)

The estimate is sharp: when \(u\) and \(v\) are both nonnegative, the left side is \(|u-v|\). A bound with constant \(1\) is therefore not just convenient; it cannot be reduced to a smaller constant that works for every pair of real numbers.

Continuity of the Absolute-Value Function

The distance estimate immediately supplies a delta for the epsilon-delta definition of continuity. In fact, the same choice works at every point.

Theorem: The absolute-value function \(A(t)=|t|\) is continuous at every \(a\in\mathbb{R}\). More strongly, it is uniformly continuous on \(\mathbb{R}\).

Proof. Fix \(a\in\mathbb{R}\) and \(\varepsilon>0\). If \(|x-a|<\varepsilon\), the reverse triangle inequality gives \[ |A(x)-A(a)|=\bigl||x|-|a|\bigr|\leq |x-a|<\varepsilon. \] Thus \(\delta=\varepsilon\) proves continuity at \(a\). For uniform continuity, fix \(\varepsilon>0\) and take \(\delta=\varepsilon\). For any \(x,y\in\mathbb{R}\), if \(|x-y|<\delta\), the same inequality gives \[ |A(x)-A(y)|=\bigl||x|-|y|\bigr|\leq |x-y|<\varepsilon. \] This choice of \(\delta\) does not depend on a point, so \(A\) is uniformly continuous. \(\square\)

An estimate of the form \(|A(x)-A(y)|\leq |x-y|\) is often called a Lipschitz estimate with constant \(1\). It is stronger than continuity: it gives a direct comparison between output distance and input distance, without first restricting the inputs to a small neighborhood.

Worked Example: Choosing Delta at a Negative Input

Let \(A(x)=|x|\), and verify continuity at \(a=-5\) for \(\varepsilon=0.03\). First, \(A(-5)=5\). For any \(x\in\mathbb{R}\), the reverse triangle inequality gives \[ \bigl||x|-5\bigr|=\bigl||x|-|-5|\bigr|\leq |x-(-5)|=|x+5|. \] Choose \(\delta=0.03\). If \(|x-(-5)|=|x+5|<\delta\), then \[ |A(x)-A(-5)|=\bigl||x|-5\bigr|\leq |x+5|<0.03=\varepsilon. \] This proves the required implication. No separate assumption that \(x\) is negative is needed; the estimate remains valid even if an input crosses zero.

Taking Absolute Value Preserves Continuity

The same inequality applies when the inputs to absolute value are function values. It shows that whenever \(f(x)\) is close to \(f(a)\), the absolute values \(|f(x)|\) and \(|f(a)|\) are at least as close. Consequently, absolute value preserves continuity.

Theorem: Let \(E\subseteq\mathbb{R}\), let \(f:E\to\mathbb{R}\), and let \(a\in E\). If \(f\) is continuous at \(a\), then the function \(|f|:E\to\mathbb{R}\), defined by \(|f|(x)=|f(x)|\), is continuous at \(a\).

Proof. Fix \(\varepsilon>0\). Since \(f\) is continuous at \(a\), there is a \(\delta>0\) such that, for \(x\in E\), \[ |x-a|<\delta\quad\Longrightarrow\quad |f(x)-f(a)|<\varepsilon. \] For any such \(x\), the reverse triangle inequality, with \(u=f(x)\) and \(v=f(a)\), gives \[ \bigl||f(x)|-|f(a)|\bigr|\leq |f(x)-f(a)|<\varepsilon. \] The left side is \(\bigl||f|(x)-|f|(a)\bigr|\), so this is precisely the epsilon-delta condition for \(|f|\) to be continuous at \(a\). \(\square\)

This proof works on any domain \(E\); the point \(a\) need not be an interior point. It also avoids having to determine whether \(f(x)\) is positive or negative near \(a\). In particular, \(f\) may change sign as \(x\) passes through \(a\).

Worked Example: An Absolute Value at a Sign Change

Consider \(h(x)=|3x-2|\) at \(a=2/3\), where the expression inside the absolute value is zero. We have \(h(2/3)=0\). For any \(x\in\mathbb{R}\), \[ |h(x)-h(2/3)|=\bigl||3x-2|-0\bigr|=|3x-2| =3\left|x-\frac{2}{3}\right|. \] Given \(\varepsilon>0\), choose \(\delta=\varepsilon/3\). Whenever \(|x-2/3|<\delta\), it follows that \[ |h(x)-h(2/3)|=3\left|x-\frac{2}{3}\right|<3\delta=\varepsilon. \] Thus \(h\) is continuous at \(2/3\), even though \(3x-2\) changes sign there. The absolute-value expression has a corner at this point, but continuity requires only that its values approach \(h(2/3)\), which the estimate proves.

Worked Example: Absolute Value of a Polynomial at a Zero

Let \(g(x)=|x^2-5|\) and \(a=\sqrt{5}\). Since \(g(\sqrt{5})=0\), factoring the difference of squares gives \[ |g(x)-g(\sqrt{5})|=|x^2-5| =|x-\sqrt{5}|\,|x+\sqrt{5}|. \] We first bound the second factor near \(a\). If \(|x-\sqrt{5}|<1\), then the triangle inequality gives \[ |x+\sqrt{5}| =|(x-\sqrt{5})+2\sqrt{5}| \leq |x-\sqrt{5}|+2\sqrt{5} <1+2\sqrt{5}. \] Now fix \(\varepsilon>0\) and choose \[ \delta=\min\left\{1,\frac{\varepsilon}{1+2\sqrt{5}}\right\}. \] If \(|x-\sqrt{5}|<\delta\), then \(|x+\sqrt{5}|<1+2\sqrt{5}\), and \[ |g(x)-g(\sqrt{5})| =|x-\sqrt{5}|\,|x+\sqrt{5}| <\delta(1+2\sqrt{5}) \leq \varepsilon. \] The last inequality follows from \(\delta\leq \varepsilon/(1+2\sqrt{5})\). This proves continuity at \(\sqrt{5}\) directly. It also illustrates a general strategy: first restrict the input to keep one factor bounded, then choose a smaller delta to control the factor that tends to zero.

Worked Example: Absolute Value of a Continuous Function Away from Zero

Consider \(k(x)=|x^2+2x+4|\) at \(a=0\). The polynomial inside is continuous at \(0\) by the polynomial continuity theorem from earlier in this course. Therefore the theorem for absolute values of continuous functions already implies that \(k\) is continuous at \(0\). An explicit estimate confirms the conclusion. Since \(x^2+2x+4=(x+1)^2+3>0\) for every \(x\), we have \(k(x)=x^2+2x+4\). Also \(k(0)=4\), and \[ |k(x)-k(0)|=|x^2+2x|=|x|\,|x+2|. \] If \(|x|<1\), then \(|x+2|\leq |x|+2<3\). Given \(\varepsilon>0\), take \(\delta=\min\{1,\varepsilon/3\}\). For \(|x|<\delta\), \[ |k(x)-k(0)|\leq 3|x|<3\delta\leq\varepsilon. \] The polynomial is positive here (and everywhere), but the general theorem did not require this sign check.

What the Estimate Does—and Does Not—Say

The reverse triangle inequality gives a reliable way to prove continuity: estimate the difference of absolute values by the difference of the quantities inside them. It is useful both when the inside expression is zero and when it is not. If that inside expression is a continuous function, the theorem applies immediately.

A common mistake is to think that continuity of \(|f|\) requires \(f\) to keep a fixed sign nearby. It does not. The example \(h(x)=|3x-2|\) is continuous at a point where the inside expression changes sign. Another mistake is to infer that continuity of \(|f|\) forces continuity of \(f\). That implication is false: absolute value can discard sign information. The theorem proved here has only the forward direction that is needed: continuity of \(f\) guarantees continuity of \(|f|\).

The constant \(1\) in the reverse triangle inequality is also a useful reminder of the strength of the argument. Absolute value cannot magnify the distance between two real inputs. More generally, when a transformation satisfies a direct bound on output differences, that bound can often be combined with the epsilon-delta definition to establish continuity efficiently.

Check Your Understanding

Use the reverse triangle inequality and the continuity results in this tutorial to answer the following questions.

  1. State the reverse triangle inequality for real numbers \(u\) and \(v\).
  2. Why does \(\delta=\varepsilon\) prove continuity of \(A(x)=|x|\) at any chosen real number?
  3. If \(f:E\to\mathbb{R}\) is continuous at \(a\in E\), what inequality connects \(\bigl||f(x)|-|f(a)|\bigr|\) to \(|f(x)-f(a)|\)?
  4. For \(h(x)=|5x+1|\), find a delta that proves continuity at \(a=-1/5\) for a given \(\varepsilon>0\).
  5. Does proving \(|f|\) continuous at \(a\) by this theorem require \(f\) to have the same sign on both sides of \(a\)? Explain.