---
tag: P54346XMQQ
kind: proof
name: Proof of the intermediate value theorem by the supremum
msc: [26A15]
proves: 00KAFBR32E
uses: [0P27W9RW0G, 0W8YHHGCJG, 0AXWET80YW, 0BTMQ04556, 0M8TGGP9JP, 0B5H2V4JW8]
sources:
  - url: https://en.wikipedia.org/wiki/Intermediate_value_theorem
    locator: Proof version A
---

## Proof

We take the supremum of the set where $f$ is below $y$.

1. Let $a < b$, let $f \colon [a, b] \to \R$ be [[continuous|0P27W9RW0G]], and let $y$ lie between $f(a)$ and $f(b)$.
2. If $y = f(a)$, take $c = a$. If $y = f(b)$, take $c = b$. So we may assume that $y$ lies strictly between $f(a)$ and $f(b)$.
3. If $f(a) > y > f(b)$, replace $f$ by $-f$ and $y$ by $-y$. Since $\abs{-f(x) - (-f(z))} = \abs{f(x) - f(z)}$, the [[epsilon-delta form|0W8YHHGCJG]] shows that $-f$ is continuous. A point with $-f(c) = -y$ has $f(c) = y$.
4. So we may assume $f(a) < y < f(b)$. Let $S = \set{x \in [a, b] : f(x) < y}$.
5. The set $S$ contains $a$, and $b$ is an [[upper bound|0B5H2V4JW8]] of $S$. By the [[completeness axiom|0AXWET80YW]], $S$ has a [[supremum|0BTMQ04556]] $c$. Since $a \in S$ and $b$ is an upper bound, $a \le c \le b$.
6. Suppose that $f(c) < y$. Then $c \ne b$, since $f(b) > y$. So $c < b$.
7. In this case, the epsilon-delta form with $\varepsilon = y - f(c)$ gives $\delta > 0$ with $f(x) < f(c) + \varepsilon = y$ for all $x \in [a, b]$ with $\abs{x - c} < \delta$.
8. Let $x = \min(c + \delta/2, b)$. Then $c < x \le b$ and $\abs{x - c} < \delta$, so $f(x) < y$ and $x \in S$. This contradicts $x > c = \sup S$. Hence $f(c) \ge y$.
9. Suppose that $f(c) > y$. The epsilon-delta form with $\varepsilon = f(c) - y$ gives $\delta > 0$ with $f(x) > y$ for all $x \in [a, b]$ with $\abs{x - c} < \delta$.
10. By the [[approximation property of the supremum|0M8TGGP9JP]], there is $s \in S$ with $c - \delta < s \le c$. Then $s \in [a, b]$ and $\abs{s - c} < \delta$, so $f(s) > y$.
11. But $s \in S$ means $f(s) < y$. This contradiction shows $f(c) \le y$.
12. By steps 8 and 11, $f(c) = y$, with $c \in [a, b]$.

## Idea

Let $c$ be the last point up to which $f$ can still be below $y$, namely the supremum of the set where $f < y$. If $f(c) < y$, continuity would push the set past $c$. If $f(c) > y$, continuity would keep the set away from $c$. So $f(c) = y$, and completeness of $\R$ is what makes $c$ exist.
