Skip to main content
Logo image

Section 3.6 Monotone functions and continuity

Note: 1 lecture (optional, can safely be omitted unless Section 4.4 is also covered, requires Section 3.5)

Definition 3.6.1.

Let \(S \subset \R\text{.}\) We say \(f \colon S \to \R\) is increasing (resp. strictly increasing) if \(x,y \in S\) with \(x < y\) implies \(f(x) \leq f(y)\) (resp. \(f(x) < f(y)\)). We define decreasing and strictly decreasing in the same way by switching the inequalities for \(f\text{.}\)
If a function is either increasing or decreasing, we say it is monotone. If it is strictly increasing or strictly decreasing, we say it is strictly monotone.
Sometimes nondecreasing (resp. nonincreasing) is used for increasing (resp. decreasing) function to emphasize it is not strictly increasing (resp. strictly decreasing).
If \(f\) is increasing, then \(-f\) is decreasing and vice versa. Therefore, many results about monotone functions can just be proved for, say, increasing functions, and the results follow easily for decreasing functions.

Subsection 3.6.1 Continuity of monotone functions

One-sided limits for monotone functions are computed by computing infima and suprema.
Namely, all the one-sided limits exist whenever they make sense. Therefore, for monotone functions, when we say the left-hand limit \(x \to c^-\) exists, we mean that \(c\) is a cluster point of \(S \cap (-\infty,c)\text{,}\) and same for the right-hand limit.

Proof.

Let us assume \(f\) is increasing, and we will show the first equality. The rest of the proof is very similar and is left as an exercise.
Let \(a \coloneqq \sup \{ f(x) : x < c, x \in S \}\text{.}\) If \(a = \infty\text{,}\) then given an \(M \in \R\text{,}\) there exists an \(x_M \in S\text{,}\) \(x_M < c\text{,}\) such that \(f(x_M) > M\text{.}\) As \(f\) is increasing, \(f(x) \geq f(x_M) > M\) for all \(x \in S\) with \(x > x_M\text{.}\) Take \(\delta \coloneqq c-x_M > 0\) to satisfy the definition of the limit being infinity.
Next suppose \(a < \infty\text{.}\) Let \(\epsilon > 0\) be given. Because \(a\) is the supremum and \(S \cap (-\infty,c)\) is nonempty, \(a \in \R\) and there exists an \(x_\epsilon \in S\text{,}\) \(x_\epsilon < c\text{,}\) such that \(f(x_\epsilon) > a-\epsilon\text{.}\) As \(f\) is increasing, if \(x \in S\) and \(x_\epsilon < x < c\text{,}\) we have \(a-\epsilon < f(x_\epsilon) \leq f(x) \leq a\text{.}\) Let \(\delta \coloneqq c-x_\epsilon\text{.}\) Then for \(x \in S \cap (-\infty,c)\) with \(\sabs{x-c} < \delta\text{,}\) we have \(\babs{f(x)-a} < \epsilon\text{.}\)
Suppose \(f \colon S \to \R\) is increasing, \(c \in S\text{,}\) and that both one-sided limits exist. Since \(f(x) \leq f(c) \leq f(y)\) whenever \(x < c < y\text{,}\) taking the limits we obtain
\begin{equation} \lim_{x \to c^-} f(x) \leq f(c) \leq \lim_{x \to c^+} f(x) . \end{equation}
Then \(f\) is continuous at \(c\) if and only if both limits are equal to each other (and hence equal to \(f(c)\)). See also Proposition 3.1.17. See Figure 3.11 to get an idea of what a discontinuity looks like.
Assuming \(f\) is not constant is to avoid the technicality that \(f(I)\) is a single point: \(f(I)\) is a single point if and only if \(f\) is constant. A constant function is continuous.

Proof.

Without loss of generality, suppose \(f\) is increasing.
First suppose \(f\) is continuous. Take two points \(f(x_1), f(x_2)\) in \(f(I)\) and suppose \(f(x_1) < f(x_2)\text{.}\) As \(f\) is increasing, \(x_1 < x_2\text{.}\) By the intermediate value theorem, given \(y\) with \(f(x_1) < y < f(x_2)\text{,}\) we find a \(c \in (x_1,x_2) \subset I\) such that \(f(c) = y\text{,}\) so \(y \in f(I)\text{.}\) Hence, \(f(I)\) is an interval.
Let us prove the reverse direction by contrapositive. Suppose \(f\) is not continuous at \(c \in I\text{,}\) and that \(c\) is not an endpoint of \(I\text{.}\) Let
\begin{equation} \begin{aligned} a & \coloneqq \lim_{x \to c^-} f(x) = \sup \bigl\{ f(x) : x \in I, x < c \bigr\} , \\ b & \coloneqq \lim_{x \to c^+} f(x) = \inf \bigl\{ f(x) : x \in I, x > c \bigr\} . \end{aligned} \end{equation}
As \(c\) is a discontinuity, \(a < b\text{.}\) If \(x < c\text{,}\) then \(f(x) \leq a\text{,}\) and if \(x > c\text{,}\) then \(f(x) \geq b\text{.}\) Therefore, no point in \((a,b) \setminus \bigl\{ f(c) \bigr\}\) is in \(f(I)\text{.}\) There exists \(x_1 \in I\) with \(x_1 < c\text{,}\) so \(f(x_1) \leq a\text{,}\) and there exists \(x_2 \in I\) with \(x_2 > c\text{,}\) so \(f(x_2) \geq b\text{.}\) Both \(f(x_1)\) and \(f(x_2)\) are in \(f(I)\text{,}\) but there are points in between them that are not in \(f(I)\text{.}\) So \(f(I)\) is not an interval. See Figure 3.11.
When \(c \in I\) is an endpoint, the proof is similar and is left as an exercise.

A diagram of a graph of a function with a jump discontinuity and the effect on the image of the function. The function is defined on an interval marked I. Points x sub 1, c, and x sub 2 are marked inside I and come in that order from left to right. The function increases continuously until x equals c, where the function approaches a, that is, the limit of f of x as x approaches c from below is a. The value of f at c is f of c, which is larger than a and smaller than b, where b is the limit of f of x as x approaches c from above. Then the function keeps rising continuously until the end of the interval I. The image of f is split in three pieces. The lowest piece is an interval whose upper bound is a, and this interval contains f of x sub 1. The next piece is simply the point f of c. The third, the highest, piece is an interval starting at b and this interval contains f of x sub 2.
Figure 3.11. Increasing function \(f \colon I \to \R\) discontinuity at \(c\text{.}\)

A striking property of monotone functions is that they cannot have too many discontinuities.

Proof.

Let \(E \subset I\) be the set of all discontinuities that are not endpoints of \(I\text{.}\) As there are only two endpoints, it is enough to show that \(E\) is countable. Without loss of generality, suppose \(f\) is increasing. We will define an injection \(h \colon E \to \Q\text{.}\) For each \(c \in E\text{,}\) both one-sided limits of \(f\) exist as \(c\) is not an endpoint. Let
\begin{equation} \begin{aligned} a & \coloneqq \lim_{x \to c^-} f(x) = \sup \bigl\{ f(x) : x \in I, x < c \bigr\} , \\ b & \coloneqq \lim_{x \to c^+} f(x) = \inf \bigl\{ f(x) : x \in I, x > c \bigr\} . \end{aligned} \end{equation}
As \(c\) is a discontinuity, \(a < b\text{.}\) There exists a rational number \(q \in (a,b)\text{,}\) so let \(h(c) \coloneqq q\text{.}\) Suppose \(d \in E\) is another discontinuity. If \(d > c\text{,}\) there exists an \(x \in I\) with \(c < x < d\text{,}\) and so \(\lim_{x \to d^-} f(x) \geq b\text{.}\) Hence, the rational number we choose for \(h(d)\) is different from \(q\text{,}\) since \(q=h(c) < b\) and \(h(d) > b\text{.}\) Similarly if \(d < c\text{.}\) After making such a choice for every element of \(E\text{,}\) we have a one-to-one (injective) function into \(\Q\text{.}\) Therefore, \(E\) is countable.

Example 3.6.5.

Denote the largest integer less than or equal to \(x\) by \(\lfloor x \rfloor\text{.}\) Define \(f \colon [0,1] \to \R\) by
\begin{equation} f(x) \coloneqq x + \sum_{n=0}^{\lfloor 1/(1-x) \rfloor} 2^{-n} , \end{equation}
for \(x < 1\) and \(f(1) \coloneqq 3\text{.}\) It is an exercise to show that \(f\) is strictly increasing, bounded, and has a discontinuity at all points \(1-\nicefrac{1}{k}\) for \(k \in \N\text{.}\) In particular, there are countably many discontinuities, but the function is bounded and defined on a closed bounded interval. See Figure 3.12.

A graph of a function on the interval from 0 to 1 that is composed of straight line segments sloped upwards. There is a first segment going across half the graph starting at y equal to 1.5 and ending at y equal to 2. Then there is an upward jump discontinuity and another much shorter line segment also sloped upwards. This set of smaller and smaller upward jumps and shorter and shorter upward sloped line segments keeps going until at x equal to 1 we get to y equal to 3.
Figure 3.12. Strictly increasing function on \([0,1]\) with countably many discontinuities.

Similarly, one can find an example of a monotone function discontinuous on a dense set such as the rational numbers. See the exercises.

Subsection 3.6.2 Continuity of inverse functions

A strictly monotone function \(f\) is one-to-one (injective). To see this fact, notice that if \(x \neq y\text{,}\) then we can assume \(x < y\text{.}\) Either \(f(x) < f(y)\) if \(f\) is strictly increasing or \(f(x) > f(y)\) if \(f\) is strictly decreasing, so \(f(x) \neq f(y)\text{.}\) Hence, \(f\) must have an inverse \(f^{-1}\) defined on its range.

Proof.

Suppose \(f\) is strictly increasing. The proof is almost identical for a strictly decreasing function. Since \(f\) is strictly increasing, so is \(f^{-1}\text{.}\) That is, if \(f(x) < f(y)\text{,}\) then we must have \(x < y\) and therefore \(f^{-1}\bigl(f(x)\bigr) < f^{-1}\bigl(f(y)\bigr)\text{.}\)
Take \(c \in f(I)\text{.}\) If \(c\) is not a cluster point of \(f(I)\text{,}\) then \(f^{-1}\) is continuous at \(c\) automatically. So let \(c\) be a cluster point of \(f(I)\text{.}\) Suppose both of the following one-sided limits exist, that is, they both make sense:
\begin{equation} \begin{aligned} x_0 & \coloneqq \lim_{y \to c^-} f^{-1}(y) = \sup \bigl\{ f^{-1}(y) : y < c, y \in f(I) \bigr\} = \sup \bigl\{ x \in I : f(x) < c \bigr\} , \\ x_1 & \coloneqq \lim_{y \to c^+} f^{-1}(y) = \inf \bigl\{ f^{-1}(y) : y > c, y \in f(I) \bigr\} = \inf \bigl\{ x \in I : f(x) > c \bigr\} . \end{aligned} \end{equation}
We have \(x_0 \leq x_1\) as \(f^{-1}\) is increasing. For all \(x \in I\) where \(x > x_0\text{,}\) we have \(f(x) \geq c\text{.}\) As \(f\) is strictly increasing, we must have \(f(x) > c\) for all \(x \in I\) where \(x > x_0\text{.}\) Therefore,
\begin{equation} \{ x \in I : x > x_0 \} \subset \bigl\{ x \in I : f(x) > c \bigr\}. \end{equation}
The infimum of the left-hand set is \(x_0\text{,}\) and the infimum of the right-hand set is \(x_1\text{,}\) so we obtain \(x_0 \geq x_1\text{.}\) So \(x_1 = x_0\text{,}\) and \(f^{-1}\) is continuous at \(c\text{.}\)
If one of the one-sided limits does not exist (that is, when it does not make sense to take the limit from that side), the argument is similar and is left as an exercise.

Example 3.6.7.

The proposition does not require \(f\) itself to be continuous. Let \(f \colon \R \to \R\) be defined by
\begin{equation} f(x) \coloneqq \begin{cases} x & \text{if } x < 0, \\ x+1 & \text{if } x \geq 0. \\ \end{cases} \end{equation}
The function \(f\) is not continuous at \(0\text{.}\) The image of \(I = \R\) is the set \((-\infty,0)\cup [1,\infty)\text{,}\) not an interval. Then \(f^{-1} \colon (-\infty,0)\cup [1,\infty) \to \R\) can be written as
\begin{equation} f^{-1}(y) = \begin{cases} y & \text{if } y < 0, \\ y-1 & \text{if } y \geq 1. \end{cases} \end{equation}
It is not difficult to see that \(f^{-1}\) is a continuous function. See Figure 3.13 for the graphs.

Two graphs. On the left, an upward sloping diagonal line that goes from bottom left to the origin (not including the origin), then jumps up and then continues diagonally up. On the right graph, the first line giving the graph is the same, but then the graph skips a short interval and the line starts again on the horizontal axis going diagonally up again.
Figure 3.13. Graph of \(f\) on the left and \(f^{-1}\) on the right.

Notice what happens with the proposition if \(f(I)\) is an interval. In that case, we could simply apply Corollary 3.6.3 to both \(f\) and \(f^{-1}\text{.}\) That is, if \(f \colon I \to J\) is an onto strictly monotone function and \(I\) and \(J\) are intervals, then both \(f\) and \(f^{-1}\) are continuous. Furthermore, \(f(I)\) is an interval precisely when \(f\) is continuous.

Exercises 3.6.3 Exercises

3.6.1.

Suppose \(f \colon [0,1] \to \R\) is monotone. Prove \(f\) is bounded.

3.6.2.

Finish the proof of Proposition 3.6.2. Hint: You can halve your work by noticing that if \(g\) is decreasing, then \(-g\) is increasing.

3.6.6.

Suppose \(S \subset \R\text{,}\) and \(f \colon S \to \R\) is an increasing function. Prove:
  1. If \(c\) is a cluster point of \(S \cap (c,\infty)\text{,}\) then \(\lim\limits_{x\to c^+} f(x) < \infty\text{.}\)
  2. If \(c\) is a cluster point of \(S \cap (-\infty,c)\) and \(\lim\limits_{x\to c^-} f(x) = \infty\text{,}\) then \(S \subset (-\infty,c)\text{.}\)

3.6.7.

Let \(I \subset \R\) be an interval and \(f \colon I \to \R\) a function. Suppose that for each \(c \in I\text{,}\) there exist \(a, b \in \R\) with \(a > 0\) such that \(f(x) \geq a x + b\) for all \(x \in I\) and \(f(c) = a c + b\text{.}\) Show that \(f\) is strictly increasing.

3.6.8.

Suppose \(I\) and \(J\) are intervals and \(f \colon I \to J\) is a continuous, bijective (one-to-one and onto) function. Show that \(f\) is strictly monotone.

3.6.9.

Consider a monotone function \(f \colon I \to \R\) on an interval \(I\text{.}\) Prove that there exists a function \(g \colon I \to \R\) such that \(\lim\limits_{x \to c^-} g(x) = g(c)\) for all \(c\) in \(I\) except the smaller (left) endpoint of \(I\text{,}\) and such that \(g(x) = f(x)\) for all but countably many \(x \in I\text{.}\)

3.6.10.

  1. Let \(S \subset \R\) be a subset. If \(f \colon S \to \R\) is increasing and bounded, then show that there exists an increasing \(F \colon \R \to \R\) such that \(f(x) = F(x)\) for all \(x \in S\text{.}\)
  2. Find an example of a strictly increasing bounded \(f \colon S \to \R\) such that an increasing \(F\) as above cannot be strictly increasing no matter how we choose it.

3.6.11.

(Challenging)   Find an example of an increasing function \(f \colon [0,1] \to \R\) that has a discontinuity at each rational number. Then show that the image \(f\bigl([0,1]\bigr)\) contains no interval. Hint: Enumerate the rational numbers and define the function with a series.

3.6.12.

Suppose \(I\) is an interval and \(f \colon I \to \R\) is monotone. Show that \(\R \setminus f(I)\) is a countable union of disjoint intervals.

3.6.13.

Suppose \(f \colon [0,1] \to (0,1)\) is increasing. Show that for every \(\epsilon > 0\text{,}\) there exists a strictly increasing \(g \colon [0,1] \to (0,1)\) such that \(g(0) = f(0)\text{,}\) \(f(x) \leq g(x)\) for all \(x\text{,}\) and \(g(1)-f(1) < \epsilon\text{.}\)

3.6.14.

Prove that the Dirichlet function \(f \colon [0,1] \to\R\text{,}\) defined by \(f(x) \coloneqq 1\) if \(x\) is rational and \(f(x) \coloneqq 0\) otherwise, cannot be written as a difference of two increasing functions. That is, there do not exist increasing \(g\) and \(h\) such that \(f(x) = g(x) - h(x)\text{.}\)

3.6.15.

Suppose \(f \colon (a,b) \to (c,d)\) is a strictly increasing onto function. Prove that there exists a \(g \colon (a,b) \to (c,d)\text{,}\) which is also strictly increasing and onto, and \(g(x) < f(x)\) for all \(x \in (a,b)\text{.}\)
For a higher quality printout use the PDF versions: https://www.jirka.org/ra/realanal.pdf,https://www.jirka.org/ra/realanal2.pdf or https://jirilebl.github.io/ra/realanal.pdf,https://jirilebl.github.io/ra/realanal2.pdf