Tutorials › Real Analysis › Continuity of Constant Functions

Continuity · Tutorial 336 of 1000

Continuity of Constant Functions

See why a constant output makes every positive input tolerance sufficient for continuity, even when the domain is restricted.

Intermediate 9 min read

What You'll Learn

  • Apply the epsilon-delta definition to a constant function at any point of its domain
  • Explain why every positive delta works for a constant function
  • Distinguish pointwise continuity from uniform continuity using their quantifiers
  • Verify continuity for constant functions on unusual or restricted domains
  • Identify when continuity claims are vacuous because the domain has no points

When the Output Does Not Change

In the previous tutorial, we chose a positive \(\delta\) by estimating how an output difference depends on an input difference. For a constant function, there is no such dependence to control: the output is the same at every point of the domain. The output difference is therefore zero, no matter how close or far apart the inputs are.

This makes constant functions the simplest test of the epsilon-delta definition. It also highlights an important feature of that definition: a continuity claim concerns only points in the function’s domain. The domain may be an interval, a finite set, or any other subset of \(\mathbb{R}\).

Definition: Let \(E\subseteq\mathbb{R}\), and let \(c\in\mathbb{R}\). The function \(f:E\to\mathbb{R}\) defined by \(f(x)=c\) for every \(x\in E\) is called a constant function. If \(E\) is empty, this condition holds vacuously, since there are no domain points at which it could fail.

At a point \(a\in E\), continuity asks that for every \(\varepsilon>0\), there be a \(\delta>0\) such that every \(x\in E\) with \(|x-a|<\delta\) satisfies \(|f(x)-f(a)|<\varepsilon\). For a constant function, both \(f(x)\) and \(f(a)\) equal \(c\). Thus the output error is zero. The input condition does not need to force \(x\) especially close to \(a\); any positive \(\delta\) is sufficient.

Continuity at Every Point of the Domain

Theorem: Let \(E\subseteq\mathbb{R}\), and let \(f:E\to\mathbb{R}\) be constant. Then \(f\) is continuous at every \(a\in E\).

Proof. Fix \(a\in E\), and let \(\varepsilon>0\). Choose \(\delta=1\), which is positive. If \(x\in E\) and \(|x-a|<\delta\), then \(f(x)=c=f(a)\), so \[ |f(x)-f(a)|=|c-c|=0<\varepsilon. \] This verifies the epsilon-delta condition at \(a\). Since \(a\) was arbitrary, \(f\) is continuous at every point of \(E\). If \(E\) is empty, there are no points at which continuity must be checked, so the assertion that \(f\) is continuous at every point of \(E\) is vacuously true. \(\square\)

The choice \(\delta=1\) is only for convenience. The proof used no property of \(1\) other than its positivity. In fact, for each fixed \(\varepsilon>0\), every positive \(\delta\) works. The definition only requires the existence of a suitable positive number; it does not ask for the largest such number or for a number that is close to optimal.

Worked Example: A Constant on a Disconnected Domain

Let \(E=[-4,-2]\cup[3,5]\), and define \(f:E\to\mathbb{R}\) by \(f(x)=6\). We verify continuity at \(a=-3\), using \(\varepsilon=0.01\). Choose \(\delta=2\). For every \(x\in E\) with \(|x-(-3)|<2\), the function values satisfy \[ f(x)=6=f(-3), \] and therefore \[ |f(x)-f(-3)|=|6-6|=0<0.01. \] The input condition happens to exclude the interval \([3,5]\), but that fact is not needed: even if a domain point were farther away, its output difference would still be zero. More generally, for any \(\varepsilon>0\), the same reasoning works at every \(a\in E\) with any chosen \(\delta>0\). The disconnected shape of the domain has no effect on the proof.

The Same Delta Works Throughout the Domain

Pointwise continuity fixes a point \(a\) before choosing \(\delta\). Uniform continuity asks for a stronger arrangement of the quantifiers: after \(\varepsilon\) is chosen, a single \(\delta\) must work for all pairs of domain points at once. A constant function meets this stronger requirement for the same reason it meets pointwise continuity.

Definition: A function \(f:E\to\mathbb{R}\) is uniformly continuous on \(E\) if for every \(\varepsilon>0\), there exists a \(\delta>0\) such that whenever \(x,y\in E\) and \(|x-y|<\delta\), we have \(|f(x)-f(y)|<\varepsilon\). The chosen \(\delta\) may depend on \(\varepsilon\), but not on \(x\) or \(y\).
Theorem: Every constant function \(f:E\to\mathbb{R}\) is uniformly continuous on \(E\).

Proof. Let \(f(x)=c\) for all \(x\in E\). Fix \(\varepsilon>0\), and choose \(\delta=1\). For any \(x,y\in E\) satisfying \(|x-y|<\delta\), we have \(f(x)=c=f(y)\). Hence \[ |f(x)-f(y)|=|c-c|=0<\varepsilon. \] This one choice of \(\delta\) works for every pair \(x,y\in E\), so \(f\) is uniformly continuous. If \(E\) is empty, there are no pairs to check; the same conclusion holds vacuously. \(\square\)

In this proof, too, any positive \(\delta\) would work. The useful distinction is not the numerical choice but the scope of the statement: for pointwise continuity, the center \(a\) is fixed; for uniform continuity, the same delta must serve all pairs throughout the domain. Constant functions satisfy both requirements without any dependence on the location of the input points.

Worked Example: One Delta for an Unbounded Domain

Define \(g:\mathbb{Z}\to\mathbb{R}\) by \(g(n)=-\sqrt{2}\) for every integer \(n\). We check uniform continuity with \(\varepsilon=10^{-6}\). Take \(\delta=3\). If \(m,n\in\mathbb{Z}\) and \(|m-n|<3\), then \[ |g(m)-g(n)|=|-\sqrt{2}-(-\sqrt{2})|=0<10^{-6}. \] This proves the required implication for every such pair. The domain \(\mathbb{Z}\) is unbounded, but the proof does not depend on its boundedness. Indeed, for any \(\varepsilon>0\), any positive \(\delta\) works for all integer pairs.

Examples on Restricted and Degenerate Domains

The definition of a constant function concerns the values at domain points only. It does not require the domain to contain a neighborhood of any point in \(\mathbb{R}\). This matters when applying the epsilon-delta condition: the implication tests only \(x\in E\), not all real numbers near \(a\).

Worked Example: A Constant on a Sequence with Its Limit

Let \(E=\{0\}\cup\{1/n:n\text{ is a positive integer}\}\), and define \(h:E\to\mathbb{R}\) by \(h(x)=4\). We check continuity at \(a=0\) for \(\varepsilon=1/3\). Choose \(\delta=1/10\). If \(x\in E\) and \(|x-0|<1/10\), then \(h(x)=4=h(0)\), so \[ |h(x)-h(0)|=|4-4|=0<\frac13. \] For example, \(x=1/11\) is a domain point satisfying \(0<1/11<1/10\), and its output difference is exactly zero. The same calculation applies to every domain point meeting the input condition, not just this particular one. Thus the epsilon-delta implication holds. In fact, at \(0\) every positive \(\delta\) works, and the theorem gives continuity at all other points of \(E\) as well.

A singleton domain illustrates the role of the domain even more directly. If \(E=\{a\}\), there is just one input to test at \(a\), namely \(x=a\); its output difference is zero. A constant function on the empty set has no values to test at all. In both cases, the general proofs above remain valid. These cases are not exceptions to continuity; they are consequences of how the definition is quantified over domain points.

Worked Example: A Constant on a Singleton

Let \(E=\{7\}\) and define \(q:E\to\mathbb{R}\) by \(q(7)=-2\). We verify continuity at the only domain point \(a=7\) for \(\varepsilon=0.001\). Choose \(\delta=5\). The only \(x\in E\) is \(x=7\), and it satisfies \(|x-a|=|7-7|=0<5\). Its output difference is \[ |q(x)-q(a)|=|-2-(-2)|=0<0.001. \] Thus the definition holds at \(7\). No claim about values of \(q\) at points outside \(E\) is relevant, since \(q\) is not defined there.

What the Zero Difference Does—and Does Not—Say

For a constant function, the central identity is \[ |f(x)-f(a)|=0 \] whenever \(x,a\in E\). This identity immediately gives the strict output bound for every positive \(\varepsilon\). It also shows why no estimate involving \(|x-a|\) is needed: the output error is already as small as it can be.

A common mistake is to think that continuity requires the domain to contain an open interval around the point. That is not part of the definition for a function \(f:E\to\mathbb{R}\). The condition is tested only for domain points in the specified neighborhood. Another mistake is to claim that a constant function has a useful positive lower bound on its output error. Its output error is exactly zero, so any positive tolerance, however small, is satisfied.

Uniform continuity is also worth separating from continuity at each point. A general function can have a different suitable delta at different points, while uniform continuity requires one delta to work over the entire domain. For constant functions, there is no point-dependence to manage: the output difference is zero for every pair. This is why the result holds even on unbounded domains and domains with complicated shapes.

The conclusion concerns continuity, not the shape or size of the domain. It also does not say that every function with a small output change is constant. A constant function is the particularly simple case in which every output change is exactly zero. In later proofs, recognizing such zero differences can eliminate the need for estimates altogether.

Check Your Understanding

Use the definitions and arguments in this tutorial to answer the following questions.

  1. For a constant function \(f(x)=c\), what is \(|f(x)-f(a)|\) when \(x,a\) both belong to the domain?
  2. Why does the proof of continuity allow any positive choice of \(\delta\), rather than requiring a bound involving \(\varepsilon\)?
  3. What is the quantifier difference between continuity at a fixed point and uniform continuity on the whole domain?
  4. Why does an unbounded domain cause no difficulty for a constant function’s uniform continuity?
  5. What does it mean to say that a continuity claim on the empty domain holds vacuously?