Canonical: https://knowlpedia.com/real-analysis/intermediate-value-theorem/

# Intermediate value theorem

A continuous function on an interval takes all values between its endpoint values.

**Intermediate value theorem:** Let \(f:[a,b]\to\mathbb{R}\) be [continuous](https://knowlpedia.com/real-analysis/continuity-on-a-set/) on \([a,b]\). If \(y\) is any number between \(f(a)\) and \(f(b)\) (that is, \(\min\{f(a),f(b)\}\le y\le \max\{f(a),f(b)\}\)), then there exists \(c\in[a,b]\) such that
\[
f(c)=y.
\]

## Remarks

This is one of the basic consequences of being a [continuous map](https://knowlpedia.com/topology/continuous-map/) on an [interval](https://knowlpedia.com/real-analysis/interval/). A notable application is [Darboux's theorem](https://knowlpedia.com/real-analysis/darboux-theorem/), which shows that derivatives also satisfy an intermediate value property.

## Proof from completeness

It suffices to treat \(f(a)<y<f(b)\); endpoint equalities are immediate, and replacing \(f\) by \(-f\) handles the reversed case. Let \(c\) be the supremum of \(S=\{x\in[a,b]:f(x)\le y\}\). The set is nonempty and bounded. If \(f(c)<y\), continuity provides points of \(S\) strictly to the right of \(c\), a contradiction. If \(f(c)>y\), continuity excludes \(S\) from a left neighborhood of \(c\), also contradicting the definition of supremum. Hence \(f(c)=y\).
