Unit 3 Lesson 1

Monotonicity

When the values of a function rise (or fall) as the input rises, we call the function monotonic. We give the definitions, see why strict monotonicity forces injectivity, and discuss what it means for a function to be monotonic only on certain intervals.

Learning Objectives

  • State the definitions of (strictly) increasing and (strictly) decreasing functions.
  • Decide whether a function is monotonic on its domain or on a given interval.
  • Prove that a strictly monotonic function is injective.
  • Identify the intervals of monotonicity of standard reference functions.

Motivation

In Course 2 we called a sequence \((a_n)\) monotonic if its values either never decrease as the index grows (an increasing sequence) or never increase (a decreasing one). Since a sequence is a function \(\mathbb{N} \to \mathbb{R}\), this was secretly a definition about a special kind of function.

The same idea makes sense for any real-valued function: ask whether the values rise — or fall — as the input rises. This is the property of monotonicity. It is one of the first things we want to know about a new function, because monotonic functions are easier to reason about and have several pleasant consequences, including a clean criterion for injectivity that we can verify by inspection.

Increasing function

Let \(f \colon D \to \mathbb{R}\) be a function with \(D \subseteq \mathbb{R}\). We say \(f\) is:

  • (weakly) increasing on \(D\) if

    \[\forall a_1, a_2 \in D, \quad a_1 < a_2 \implies f(a_1) \leq f(a_2).\]

  • strictly increasing on \(D\) if

    \[\forall a_1, a_2 \in D, \quad a_1 < a_2 \implies f(a_1) < f(a_2).\]

Strict increase forbids any "plateau" — different inputs always give different outputs (in increasing order). The weak version allows the function to stay constant over stretches of the domain.

Decreasing function

Symmetrically, \(f\) is:

  • (weakly) decreasing on \(D\) if

    \[\forall a_1, a_2 \in D, \quad a_1 < a_2 \implies f(a_1) \geq f(a_2).\]

  • strictly decreasing on \(D\) if

    \[\forall a_1, a_2 \in D, \quad a_1 < a_2 \implies f(a_1) > f(a_2).\]

A function is monotonic if it is either increasing or decreasing on the whole domain (in the weak sense), and strictly monotonic if it is strictly so.

Two basic examples

x y a₁ a₂
\(f(x) = x\) — strictly increasing
x y a₁ a₂
\(f(x) = -x\) — strictly decreasing

Strictly increasing. The identity function \(f \colon \mathbb{R} \to \mathbb{R},\; f(x) = x\) is strictly increasing: if \(a_1 < a_2\), then \(f(a_1) = a_1 < a_2 = f(a_2)\).

Strictly decreasing. The function \(g \colon \mathbb{R} \to \mathbb{R},\; g(x) = -x\) is strictly decreasing: if \(a_1 < a_2\), multiplying both sides by \(-1\) flips the inequality, giving \(-a_1 > -a_2\), i.e. \(g(a_1) > g(a_2)\).

Constant functions. Any constant function \(c \colon \mathbb{R} \to \mathbb{R},\; c(x) = k\) is both weakly increasing and weakly decreasing: it satisfies both \(c(a_1) \leq c(a_2)\) and \(c(a_1) \geq c(a_2)\) (with equality, in fact). It is not strictly monotonic in either direction.

Functions of the form \(f(x) = ax + b\)

Consider a function \(f \colon \mathbb{R} \to \mathbb{R},\; f(x) = ax + b\), with \(a \neq 0\). We will study this family of functions in detail in the next course; for now, we can already classify its monotonicity by the value of the coefficient \(a\).

If \(a_1 < a_2\), then \(a_2 - a_1 > 0\), so

\[f(a_2) - f(a_1) = (a a_2 + b) - (a a_1 + b) = a(a_2 - a_1).\]

The sign of the difference \(f(a_2) - f(a_1)\) is the sign of \(a\). So:

  • If \(a > 0\), the function is strictly increasing.

  • If \(a < 0\), it is strictly decreasing.

  • If \(a = 0\), the function is constant — weakly monotonic in both directions, strictly monotonic in neither.

This observation lets us classify any function of this form by reading the sign of \(a\): for instance, \(f(x) = 3x - 2\) is strictly increasing (since \(3 > 0\)) and \(g(x) = -5x + 1\) is strictly decreasing (since \(-5 < 0\)).

Monotonicity on intervals

Many useful functions are not monotonic on their whole domain but are monotonic on certain subintervals. The standard example is the squaring function.

x y decreasing increasing

The function \(g \colon \mathbb{R} \to \mathbb{R},\; g(x) = x^2\):

  • is strictly decreasing on \((-\infty, 0]\);

  • is strictly increasing on \([0, +\infty)\);

  • is not monotonic on all of \(\mathbb{R}\): the values fall, then rise.

When we say a function is "monotonic on an interval \(I\)", we simply mean its restriction to \(I\) is monotonic by the definitions above. The same function can be monotonic in different directions on different intervals, as the parabola illustrates.

Strictly monotonic ⇒ injective

Let \(f \colon D \to \mathbb{R}\) be strictly monotonic on \(D\). Then \(f\) is injective.

Suppose \(f\) is strictly increasing (the decreasing case is symmetric). Take \(a_1, a_2 \in D\) with \(a_1 \neq a_2\). Then either \(a_1 < a_2\) or \(a_2 < a_1\).

If \(a_1 < a_2\), strict monotonicity gives \(f(a_1) < f(a_2)\), so \(f(a_1) \neq f(a_2)\).

If \(a_2 < a_1\), the same reasoning gives \(f(a_2) < f(a_1)\), again \(f(a_1) \neq f(a_2)\).

In either case, different inputs give different outputs — so \(f\) is injective.

This theorem is a workhorse: to prove a function is injective, it is often easiest to show it is strictly monotonic, instead of arguing the contrapositive of injectivity directly. Note: the converse fails — an injective function need not be monotonic. (Can you sketch one? The function that swaps \(0\) and \(1\) and fixes every other real number is one such; you will meet "non-monotonic injective functions" again in trigonometry.)

Consequence: strictly monotonic functions are invertible (on their image)

Strictly monotonic ⇒ injective (Theorem) and a strictly monotonic function maps onto its image, so it is bijective when viewed as a function \(D \to \mathrm{Im}(f)\). By the previous unit, it therefore has an inverse on its image.

This is one of the standard tools for showing that a function is invertible: prove it is strictly monotonic. We will use it repeatedly in the courses that follow — for the functions \(f(x) = ax + b\) (always invertible when \(a \neq 0\)), for the square-root function (the inverse of \(x^2\) restricted to \([0, +\infty)\)), and for the trigonometric functions on appropriate intervals.

Connection to Computer Science

Monotonicity shows up wherever a program compares values in order. A sorted array is exactly a sequence indexed by position that is (weakly) increasing — and the efficiency of binary search depends on this property: each comparison eliminates half the array because the values are monotonic. The link between monotonicity and uniqueness (Theorem) is also why a strictly increasing key function never produces duplicate keys.

Weak vs. strict — does the distinction matter?

For many concrete functions, weak and strict monotonicity coincide: the function \(f(x) = ax + b\) with \(a \neq 0\) is strictly monotonic, and there is no extra subtlety. But the distinction matters in two places.

First, for functions with plateaus — like a step function that is constant on intervals and jumps between them. Such a function can be weakly monotonic without being strictly so, and the "strictly monotonic ⇒ injective" theorem genuinely needs the strict version: weakly monotonic functions can be very far from injective (a constant function is the extreme case).

Second, when stating monotonicity on a closed interval like \([0, +\infty)\) for \(x^2\): we include the endpoint \(0\) because the strict inequality \(0 < a\) still gives \(0 = 0^2 < a^2\). The endpoint is the start of the increasing range, not a counterexample to it.

Exercises

Exercise 1

For each statement, decide whether it is true or false.

a)

\(f \colon \mathbb{R} \to \mathbb{R},\; f(x) = -2x + 5\) is strictly decreasing.

b)

\(g \colon \mathbb{R} \to \mathbb{R},\; g(x) = x^2\) is monotonic.

c)

Any constant function is weakly increasing.

d)

\(f \colon \mathbb{R} \to \mathbb{R},\; f(x) = x^3\) is strictly increasing.

Exercise 2

Recall the reference graphs from Unit 1. Choose the correct classification.

a)

The absolute value function \(f \colon \mathbb{R} \to \mathbb{R},\; f(x) = |x|\).

On which intervals is \(f\) strictly monotonic?

b)

The cube function \(f \colon \mathbb{R} \to \mathbb{R},\; f(x) = x^3\).

On which interval is \(f\) strictly monotonic?

Exercise 3

Let \(f \colon \mathbb{R} \to \mathbb{R},\; f(x) = -3x + 7\). Take \(a_1, a_2 \in \mathbb{R}\) with \(a_1 < a_2\). Fill in the steps to conclude \(f\) is strictly decreasing. In your answers, write \(a_1, a_2\) as a1, a2.

a)

Exercise 4

Apply the theorem that strict monotonicity implies injectivity.

a)

Suppose \(f \colon [0, 10] \to \mathbb{R}\) is known to be strictly increasing. Which of the following must be true?

Choose the most accurate statement:

Exercise 5

Each statement is about a function \(f \colon \mathbb{R} \to \mathbb{R}\).

a)

If \(f\) is injective, then \(f\) is strictly monotonic.

b)

If \(f\) and \(g\) are both strictly increasing on \(\mathbb{R}\), then \(g \circ f\) is strictly increasing.

c)

If \(f\) is strictly increasing and \(g\) is strictly decreasing, then \(g \circ f\) is strictly decreasing.

Summary

  • \(f\) is strictly increasing on \(D\) if \(a_1 < a_2 \implies f(a_1) < f(a_2)\) for all \(a_1, a_2 \in D\); weakly increasing if the conclusion is \(f(a_1) \leq f(a_2)\). Decreasing versions flip the inequality on the right.

  • A function is monotonic on an interval \(I\) if its restriction to \(I\) is monotonic. The same function may be monotonic on different intervals in different directions (e.g. \(x^2\) decreases on \((-\infty, 0]\) and increases on \([0, +\infty)\)).

  • For \(f(x) = ax + b\): strictly increasing if \(a > 0\), strictly decreasing if \(a < 0\), constant if \(a = 0\).

  • Theorem. Strictly monotonic implies injective. So a strictly monotonic function on \(D\) is bijective onto its image and admits an inverse there.