# Slightly changing the formal definition of continuity of $f: \mathbb{R} \to \mathbb{R}$?

I'm curious for some perspectives on why it would be wrong to change the definition of continuity of $$f: \Bbb R \to \Bbb R$$ in the following way:

Original definition. $$f : \Bbb R \to \Bbb R$$ is said to be continuous at $$x \in \Bbb R$$ if $$\forall \epsilon > 0$$ $$\exists \delta > 0$$ such that $$|x - a| < \delta \implies |f(x) - f(a)| < \epsilon$$.

Altered definition. $$f : \Bbb R \to \Bbb R$$ is said to be continuous at $$x \in \Bbb R$$ if $$\forall \delta > 0$$ $$\exists \epsilon > 0$$ such that $$|x - a| < \delta \implies |f(x) - f(a)| < \epsilon$$.

The altered definition is more in line with what I think when I think about continuity intuitively: nearby points are sent to nearby points. It only makes sense to me to be able to choose "nearness" in the domain (i.e., $$\forall \delta > 0$$) and show there is nearness in the codomain (i.e., $$\exists \epsilon > 0$$) to prove intuitively that "nearby points are sent to nearby points".

Similarly, if $$X, Y$$ are topological spaces, we say $$f: X \to Y$$ is continuous if the preimages of open sets are open. What would be wrong about changing the definition to say that a map is continuous if the images of open sets are open (i.e., $$f$$ is continuous if it is an open map)? This is more inline with the intuitive idea of "nearby points being sent to nearby points" -- you pick nearness in the domain (i.e., an arbitrary open set) an show nearness in the codomain (i.e., the image is open).

Does anyone have any useful remarks?

• Your definition is very weak - for example, always taking the witnessing $\epsilon$ to be 200 will show that all functions with range $\subseteq [-100,100]$ are continuous... Mar 20, 2015 at 19:44
• Then all bounded functions are going to be "continuous" by your definition.
– A.Γ.
Nov 2, 2016 at 13:51
• @MauroALLEGRANZA But the positions of $\epsilon$ and $\delta$ have changed only in the quantifiers, so it doesn't look like it is about changing names. Nov 2, 2016 at 13:51
• The definition you propose is the definition of $f$ being bounded on every interval containing $x_0$. But there are functions that are bounded that certainly aren't continuous (see GoodDeeds' answer), but also some functions that are continuous at $x_0$ but not bounded on every interval containing $x_0$ (see Nick's answer). So your definition does not capture continuous functions, because there are discontinuous functions that satisfy it, but also continuous functions that don't.
– kccu
Nov 2, 2016 at 13:54
• This is a really good question since it forces you to think about the meanings of "there exists" and "for all" and the order in which those quantifiers occur. You should be able to learn a lot from the answers. Nov 2, 2016 at 13:58

Your proposed definition would force us to accept as "continuous" functions that are nowhere continuous. An example is

$$f(x) = \begin{cases} 0 & \text{ if x is rational} \\ 1 & \text{ if x is irrational} \end{cases}$$

Pick your favourite $\delta > 0$; we can now choose $\epsilon = 2$. Clearly, for any $x_0$ we have that if $|x-x_0| < \delta$ then $|f(x) - f(x_0)| < \epsilon$.

Your confusion seems to lie in trying to translate the sentence "if two points are close, then their images under $f$ are close" into a formal mathematical statement. Since the sentence mentions the points in the domain first, it seems like the mathematical statement should also "start in the domain".

I'd like to suggest that a better gloss on the meaning of continuity is "if two points are close enough, then their images under $f$ are close". This is because for a continuous function like $f(x) = 100x$, points have to be much closer in the domain to guarantee a level of closeness in the range. That is, to guarantee that $|f(x) - f(y)| < \frac{1}{2}$, we must have $|x-y| < \frac{1}{200}$.

Now to translate. The issue is that "close" is a vague word. Formally, when we say "close", we need to specify how close. So let's change the first instance of "close" to "$\delta$-close" and express it as $|x-y|<\delta$ and change the second instance of "close" to "$\epsilon$-close" and express it as $|f(x) - f(y)|<\epsilon$. Then the sentence becomes $$|x-y|<\delta \implies |f(x) - f(y)|<\epsilon.$$

But we don't want the definition of continuity to depend on $\delta$ and $\epsilon$ - we want to quantify them out. How close should $f(x)$ and $f(y)$ be? Well, as close as we want. So we need to quantify over all $\epsilon > 0$. How close should $x$ and $y$ be? Well, close enough: as close as they need to be to satisfy the conclusion $|f(x) - f(y)|<\epsilon$. This makes it clear that the $\delta$ depends on the $\epsilon$.

• So saying that, intuitively, continuity means nearby points are mapped to nearby points is too vague. If I understand your answer, we should amend the intuitive statement to say "points that are close enough are mapped to close points", which is an intuitive statement that makes clear via the word "enough" that the "closeness" we are choosing is in the range, i.e., $\delta$ depends on the free variable $\epsilon$. Mar 20, 2015 at 21:03
• That's my claim, yes. I wouldn't call $\epsilon$ a free variable, since it's also quantified. But the point whatever $\epsilon$ you pick, you can find a $\delta$ (which depends on the $\epsilon$). Mar 20, 2015 at 21:08
• What's wrong with calling $\epsilon$ a free variable? Mar 20, 2015 at 21:09
• Free variables aren't bound by quantifiers, and $\epsilon$ is quantified in the definition of continuity. Mar 20, 2015 at 21:11
• In the statement $\forall x\forall y |x-y|<\delta \implies |f(x) - f(y)|<\epsilon$, $\epsilon$ and $\delta$ are free variables. So the statement could be true or false depending on the values of $\epsilon$ and $\delta$. If $f(x) = 100x$, then the statement is true if $\epsilon = 1$ and $\delta = \frac{1}{100}$, but false if $\epsilon = 1$ and $\delta = 1$. On the other hand, in the statement $\forall \epsilon \exists \delta \forall x \forall y |x-y|<\delta \implies |f(x) - f(y)|<\epsilon$, $\delta$ and $\epsilon$ are not free variables - for a given $f$ the statement is either true or false. Mar 20, 2015 at 21:20

The definition says that $$\forall\epsilon\gt0\exists\delta\text{ such that } |x-x_0|\lt\delta\implies|f(x)-f(x_0)|\lt\epsilon$$

The version you mention says that

$$\forall\delta\gt0\exists\epsilon\text{ such that } |x-x_0|\lt\delta\implies|f(x)-f(x_0)|\lt\epsilon$$

The two are not the same. The first says that you can get $f(x)$ as close to $f(x_0)$ as you wish by getting $x$ sufficiently close to $x_0$. The second says that however close(or far)$x$ may beto $x_0$, you can find a positive number greater than $|f(x)-f(x_0)|$, which is always true, when $f(x)$ and $f(x_0)$ are finite.

For example, suppose you have the function $$f(x)=\begin{cases}0&x=0\\1&\text{ else}\end{cases}$$

You can prove the function to be continuous at $x=0$ using the second definition. For any $\delta$, if you take $\epsilon\gt1$, the statement holds.

• Many thanks for your clear answer. As kccu's comment says above, your answer and that of Nick are both excellent answers, and I didn't want to flag one and not the other as the best solution. Kindly accept my thanks in this comment instead. Nov 2, 2016 at 21:08
• This answer actually explains why the two are different instead of just giving an example. +1. Nov 2, 2016 at 21:59

Take some piecewise function, like:

$$f(x) = \begin{cases} \frac{1}{x} & \text{if } x \neq 0 \\ 0 & \text{if } x = 0 \end{cases}$$

Now let $x_0 = \frac{1}{10}$ (something really close to $x=0$). I think we would agree that this function is continuous at $x_0 = 1/10$. If your suggested alternative definition worked, then we could pick ANY $\delta$. So let's pick $\delta = 1$. Then your alternative definition would suggest we could find some $\varepsilon$ so that $f(x)$ would be within a distance $\varepsilon$ from $f(1/10) = 10$ for all $x$ within the interval $\left( -\frac{9}{10}, \frac{11}{10} \right)$. But this obviously can't happen (there can be no such $\varepsilon$) since $f(x)$ is unbounded as $x$ approaches $0$.

• Many thanks for your clear answer. As kccu's comment says above, your answer and that of GoodDeeds are both excellent answers, and I didn't want to flag one and not the other as the best solution. Kindly accept my thanks in this comment instead. Nov 2, 2016 at 21:08

It is a bit unconventional but you can do this (and it is even quite useful!). However, you need to have a condition on how to choose epsilon to make it work

Here is a $\delta$-$\epsilon$ definition of continuity of a function $f$ in $x_0$:

$\forall \delta>0, \exists \epsilon = \epsilon(\delta) > 0$ such that

1. $\forall x$ with $|x - x_0| \le \delta$ we have $|f(x) - f(x_0)| \le \epsilon(\delta)$
2. $\inf_{\delta > 0} \epsilon(\delta) = 0$

It is best to think of the $\forall \delta >0 \exists \epsilon(\delta) > 0$ part as the existence of a function $\epsilon(\delta)$ with certain properties. The second property, ensures that the above counterexamples do not work. By replacing $\epsilon(\delta)$ by $\epsilon'(\delta) = \inf_{\delta' \ge \delta} \epsilon(\delta)$ we can w.l.o.g. assume that

1. if $\delta_1 \le \delta_2$ we have $\epsilon(\delta_1) \le \epsilon(\delta_2)$

This makes it much clearer what is going on, and makes it an easy exercise to prove that the $\delta$-$\epsilon$ definition is equivalent to the $\epsilon$-$\delta$ definition (see below). The function $\epsilon(\delta)$ tells you not only that $f(x) \to f(x_0)$ as $x \to x_0$ but how fast this is happening, i.e. $\epsilon(\delta)$ controls how a deviation of $x$ from $x_0$ results in a (maximal) deviation of $f(x)$ from $f(x_0)$. The $\delta$-$\epsilon$ definition makes many standard proofs or explicit computations much more natural without "magic" choices like "choose $\delta = \epsilon^{100}/\pi^2$" often found in proofs using the $\epsilon$-$\delta$ definition. E.g. to show that the product of two functions is continuous suppose that $\epsilon_f(\delta)$ and $\epsilon_g(\delta)$ control the convergence of $f(x) \to f(x_0)$ and $g(x) \to g(x_0)$. Then for $|x - x_0| < \delta \le \delta_0$ (which is all that matters) we have

$|f(x)g(x) - f(x_0)g(x_0)| \le |f(x) - f(x_0)||g(x_0)| + |g(x) - g(x_0)||f(x)| \le |g(x_0)|\epsilon_f(\delta) + (|f(x_0)| + \epsilon_f(\delta_0))\epsilon_g(\delta)$

it is trivial that $\epsilon_{fg}(\delta) := |g(x_0)|\epsilon_f(\delta) + (|f(x_0)| + \epsilon(\delta_0))\epsilon_g(\delta)$ satisfies property 2 and 3 and so controls the convergence of $fg(x) \to fg(x_0)$, showing that $fg$ is continuous in $x_0$.

In fact while the $\delta$-$\epsilon$ is unconventional we often use it when we want stronger notions of continuity and stronger control over the convergence of $f(x) \to f(x_0)$

A function f is Lipschitz continuous in $x_0$ if 1. $\forall x$ with $|x - x_0| \le \delta$ we have $|f(x) - f(x_0)| \le C\delta$ for some constant $C > 0$.

Clearly property 2 and 3 are now trivially fulfilled. Often we want a $C$ to be uniform for the whole domain of $f$. If such a $C$ exists we call $f$ Lipschitz continuous.

likewise: A function is $\alpha$ Hölder continuous for $0 < \alpha$ if 1. $\forall x$ with $|x - x_0| \le \delta$ we have $|f(x) - f(x_0)| \le C\delta^\alpha$ for some constant $C > 0$.

Again property 2 and 3 are trivially fulfilled.

======

Proof that $\delta$-$\epsilon$ continuous $\iff$ $\epsilon$-$\delta$ continuous.

$\implies$: Choose $\epsilon_0 > 0$. By property 2, $\exists \delta_0$ such that $\epsilon(\delta_0) \le \epsilon_0$ hence $\forall x$ with $|x - x_0| \le \delta_0$ we have $|f(x) - f(x_0)| \le \epsilon_0$.

$\Leftarrow$ By the $\epsilon$-$\delta$ definition, there exists a function $\delta(\epsilon)$ such that $\forall x$ with $|x - x_0| \le \delta(\epsilon)$ we have $|f(x) - f(x_0)| \le \epsilon$

For $\delta_0 > 0$, let

$\epsilon(\delta_0) = \inf \{\epsilon >0, 0<\delta_0 \le \delta(\epsilon)\}$ .

Fix $\epsilon_0 > 0$ and assume $\delta_0 \le \delta(\epsilon_0)$. Then $\forall x$ with $|x- x_0| \le \delta_0\le \delta(\epsilon_0)$ we have $|f(x) - f(x_0)| \le \epsilon_0$. Now reversing points of view and taking any $\epsilon_0$ with $\delta(\epsilon_0) \ge \delta_0$ we see that on taking inf's we get $|f(x) - f(x_0)| \le \epsilon(\delta_0)$ as in property 1. We have chosen $\epsilon$ non decreasing as function of $\delta_0$ as in property 3 by construction. In particular for $\delta_0 \le \delta(\epsilon_0)$ we have $\epsilon(\delta_0) \le \epsilon(\delta(\epsilon_0))\le \epsilon_0$, so $0\le \inf_{\delta_0 > 0} \epsilon(\delta_0) \le \inf_{\epsilon_0 > 0} \epsilon(\delta(\epsilon_0)) \le \inf_{\epsilon_0 >0} \epsilon_0 = 0$ proving propery 2.

 We strictly speaking have to assume that $0 < \delta_0 \le \delta(1)$ say, to make sure that the inf is over a non empty set, but that does not matter, we only need control functions in a neighborhood of $\delta_0 = 0$.

• Thank you for this thorough reply. It is interesting to know that such alternative definitions exist. It is also slightly reassuring to know that my question might not have been too absurd/stupid, and that it has occured to others before in other forms. Nov 2, 2016 at 22:06
• In the general $\delta$-$\epsilon$ definition you gave above, my understanding of what you wrote is that you are trying to enforce a condition that we can find valid values of $\epsilon$ that are arbitrarily small at a given $\delta>0$, so that unbounded or discontinuous examples would not occur (such as the examples by Nick and GoodDeeds), but: (1) is stating the infimum in condition 2 like this enough to guarantee this enforcement, and why/how? and (2) could you please explain more why we needed to replace $\epsilon$ by $\epsilon'$ and how would that lead to condition 3? Nov 2, 2016 at 23:46
• I edited in a formal proof of the equivalence. Was a bit more involved than I remembered. Nov 3, 2016 at 12:12
• The reason for changing $\epsilon$ by $\epsilon'$ is simply that there is a priori no reason why $\epsilon(\delta)$ is non increasing.E.g. assume $x_0 = 0$ and that $\epsilon(1) = 1 while$\epsilon(2) = 1/2$. But that is just silly because it means we are guaranteed that Nov 3, 2016 at 12:18 •$|f(x)-f(0)|\le1$for$|x|\le1$and$|f(x) - f(0)|\le 1/2$for$|x|\le2$. I.e. we have a better bound on a larger interval. To avoid the sillyness we just use the best estimate available by taking the infimum over all larger intervals i.e. redefining$\epsilon'(\delta) = \inf_{\delta '\ge \delta}\epsilon(\delta')$. We then necessarily have that on a larger interval we have an estimate that is no better than on a smaller interval i.e.$\epsilon'$is non-decreasing. And yeah, I changed a few inequalities to non strict inequalities in the$\delta$-$\epsilon$definition to make this work smoothly. Nov 3, 2016 at 12:34 Use the function: $$f(x)=0 \quad for \quad x=0$$ $$f(x)=\dfrac{x}{|x|} \quad for \quad x \ne 0$$ You can easely see that$\forall \delta >0$you can find$\epsilon=1+\delta$such that$|x|<\delta \Rightarrow |f(x)|< \epsilon$, but the function has a jump in$x=0$. Clearly the problem is that, with such ''definition'', a small open neighborhood in the domain of the function correspond to a large open neighborhood in the range. With the usual definition this is impossible because the small neighborhood is chosen initially on the range. Said another way: in your Altered Definition we are not sure that$\epsilon$is small enough to translate the intuitive concept of ''nearness''. • Note that your function is the sign or signum function (not to be confused with the sine function), a textbook example of a discontinuous function. Mar 20, 2015 at 20:31 • So why do we intuitively say that "nearby points are mapped to nearby points" (which makes it sound like we initially choose nearness in the domain), while in the actual definition we are saying "if you have nearness in the range, you can find nearby points in the domain mapped into this nearness"? Mar 20, 2015 at 20:32 • Yes. The basic problem is that we traslate the intuitive concept of ''nearness'' in the mathematical concept of ''neighborhood'' and a neighborhood is not necessarly small. Mar 20, 2015 at 20:35 • @columbus: Yes. In this form we can use$\epsilon-\delta$machinery. Mar 20, 2015 at 20:37 Put more informally, since "everyone loves somebody" is not the same thing as "everyone has someone who loves them". Every$\epsilon$has a corresponding$\delta$in the limit definition. Not every$\delta$necessarily has an$\epsilon$. For instance, take the function$x\mapsto\frac1x$where$x=1$and$\delta=2$. Your range covers all the points around$0$, where the function takes arbitrarily large and small values - but$\frac1x$should be continuous! Your definition says it's not continuous.$\newcommand{\Reals}{\mathbf{R}}\newcommand{\eps}{\varepsilon}$Let$f:\Reals \to \Reals$be a function, and$a$a real number. The definition of continuity of$f$at$a$can be viewed as an adversarial game: Player$\eps$chooses a positive real number, which serves as a "challenge" or a "target size": A point$x$"meets the challenge" if$|f(x) - f(a)| < \eps$, namely if$f(x) \in (f(a) - \eps, f(a) + \eps)$. Now the adversary, Player$\delta$, chooses a positive real number, which serves as a "response" to the "challenge". The response "succeeds" if every$x$satisfying$|x - a| < \delta$meets the challenge. We say$f$is continuous at$a$if Player$\delta$has a winning strategy against a perfect opponent. To see what this means, think about how each player strategizes. The smaller$\eps$is, the smaller the target, and the more difficult Player$\delta$'s task. However, if$f$is continuous at$a$, then no matter how small the challenge$\eps > 0$("for every$\eps > 0$"), Player$\delta$can response successfully ("there exists a$\delta > 0$such that...''). That is, no matter how small an interval around$f(a)$is given, Player$\delta$can ensure that$f(x)$lies within this interval merely by restricting$x$to be sufficiently close to$a$. Now let's consider the altered definition: • C2: For every$\delta > 0$, there exists an$\eps > 0$such that$|x - a| < \delta$implies$|f(x) - f(a)| < \eps$. Here, Player$\delta$chooses a positive number, which determines a "challenge" in the form of an interval$(a - \delta, a + \delta)$. Now Player$\eps$tries to "respond" by picking$\eps > 0$so that the "challenge" interval maps into$(f(a) - \eps, f(a) + \eps)$. Metaphorically, Player$\eps$has to "cast a net around" the image of the challenge interval. The function$f$satisfies condition C2 at$a$if Player$\eps$has a winning strategy against a perfect opponent. Again, consider the players' respective strategies. The larger$\delta$is, the larger the image$f(a - \delta, a + \delta)$, and the more difficult Player$\eps$'s task. In fact, it should be easy to see that$f$satisfies C2 if and only if$f$is bounded on every bounded set. The function$f(x) = (1 + x^{2})\chi_{\mathbf{Q}}(x)$, the product of a quadratic polynomial and the Dirichlet function, is C2, but unbounded on$\Reals$, and discontinuous at every point. It's a good exercise to characterize (in familiar terms) functions satisfying the other two analogous conditions. In each "game", work out the "optimal strategy", and try to decide what property allows each player to force a win against a perfect opponent. (Answers hidden.) • C3: There exists an$\eps > 0$such that for every$\delta > 0$,$|x - a| < \delta$implies$|f(x) - f(a)| < \eps$.$f$is bounded. • C4: There exists a$\delta > 0$such that for every$\eps > 0$,$|x - a| < \delta$implies$|f(x) - f(a)| < \eps$.$f$is locally constant, i.e., there is a$\delta > 0$such that$|x - a| < \delta$implies$f(x) = f(a)$. • Wow, nice answer! Mar 20, 2015 at 23:37 • @user46944: Thanks. :) Of course, I can't take credit; these viewpoints and interpretations are "in the folklore". But in my experience, most students find adversarial games a useful counterpoint to the formal definition, so it seemed worth posting this account for posterity. Mar 21, 2015 at 0:33 You've got some good answers about why your new definition doesn't characterize continuous functions. The general point is that$\forall y \exists x P(x,y)$is very different from$\forall x \exists y P(x,y)$. (Here$P(x,y)$is some statement about$x$and$y$. To use a simpler example, suppose$P(x,y)$is the formula$y=x^2$, and let$x$and$y$. Then$\forall y \exists x P(x,y)$means that every number$y$has a square root. But$\forall x \exists y P(x,y)$means that every number$x$can be squared. Consider the function$f(x)$defined as follows: $$f(x) = \begin{cases} 0 & \text{if x < 0} \\ 1 & \text{if x \geq 0} \\ \end{cases}$$ Let$x_0 = 0$. Given any$\delta > 0$,$f(x)$takes on only two values ($0$and$1$) over all values of$x$such that$\lvert x - x_0 \rvert < \delta$. Meanwhile,$f(x_0) = 1$. So let$\epsilon = 2$. Then when$\lvert x - x_0 \rvert < \delta$, then$x = 0$or$x = 1$, so$\lvert f(x) - f(x_0) \rvert = 1$or$\lvert f(x) - f(x_0) \rvert = 0$, so$\lvert f(x) - f(x_0) \rvert < \epsilon$and therefore$f(x)$is "$\delta$-first continuous" at$0$. We can do a similar hack for any function that is defined and bounded over an interval. This shows that the$\delta$-first definition of "continuity" makes a lot of functions "continuous" at points where intuitively they are obviously discontinuous. Nick's answer shows how the same definition can make functions "discontinuous" at points where it is intuitively obvious that they should be continuous. So we end up defining some property of functions, but it's nothing like the idea of "continuous" that we want to define. To give a different flavor of problem with the proposed definition than what others have come up with: Consider the function$1/x$. It's not continuous at$x_0=0$, but it is continuous at$x_0=1$. Now let's try the proposed definition and see if it predicts continuity at$x_0=1$(with$y_0=1/1=1$). Choose$\delta = 2$. So any value of$x$arbitrarily close to$0$satisfies$|x-x_0|<2$. For any$\epsilon$you might choose, I can find a$y$close to$0$such that$|1/y - 1| > \epsilon$. For example, take$1/y = 2+\epsilon$, so$y = 1/(2+\epsilon)$. Then $$|1/y - 1| = 1+ \epsilon > \epsilon$$ So by the proposed definition, we conclude that$1/x$is not continuous at$x_0=1$. More generally, this function would be continuous nowhere. In fact, this definition of "continuity" becomes equivalent to saying that the function is bounded in any finite interval. A good way to think of continuity is as a game: player one selects a vertical interval, and player two selects a horizontal interval and plots the function so that it never leaves the plot across the top or bottom. For player 1 to make it as hard for player 2 as possible, obviously he wants to choose a small interval. If player 2 can always win, then it's a continuous function. In this version, player 1 is selecting a horizontal interval and player 2 is selecting the vertical interval so that the function doesn't leave the plot across the top/bottom. If the function is bounded then player 2 can choose the vertical to exceed the bound. If there is an interval in which the function is unbounded, then player 1 can always choose the horizontal interval to include this interval. If the function is unbounded, but remains bounded in any finite interval, then whatever finite interval player 1 selects player 2 wins by choosing the appropriate bounds. To give a slightly more abstract answer (one other poster alluded to this key point): Saying that: For every$\epsilon>0$there exists a$\delta>0$is not the same thing as saying that: There exists a$\delta>0$for every$\epsilon>0$In the case of the former, what delta is depends on what epsilon is (in the language of formal logic, this is because the "there exists$\delta>0$" is within the scope of the "For all$\epsilon>0$). In the latter statement the claim is that you can find a single$\delta>0$which will work for every$\epsilon>0\$. (A much stronger claim!)